Subversion Repositories HomeAutomation

Rev

Rev 97 | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  1. /*********************************************************************
  2.  *
  3.  *                  CAN.c header file
  4.  *
  5.  *********************************************************************
  6.  * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/branches/modules/EmbeddedSoftware/PIC/canToSerial/Include/CAN.h $
  7.  * Last changed:    $LastChangedDate: 2006-11-14 21:22:17 +0100 (Tue, 14 Nov 2006) $
  8.  * By:              $LastChangedBy: johboh $
  9.  * Revision:        $Revision: 97 $
  10.  ********************************************************************/
  11.  
  12. #ifndef CAN_H
  13. #define CAN_H
  14.  
  15. #include <CANdefs.h>
  16. #include <compiler.h>
  17. #include <typedefs.h>
  18.  
  19.  
  20. typedef struct _CAN_MESSAGE
  21. {
  22.    
  23.     DWORD ident;
  24.     BOOL extended;
  25.     BOOL remote_request;
  26.     BYTE data_length;
  27.     BYTE data[8];
  28. } CAN_MESSAGE;
  29.  
  30.  
  31. typedef enum {PRIO_LOWEST=0,PRIO_LOW=1,PRIO_HIGH=2,PRIO_HIGEST=3} CAN_PRIORITY;
  32.  
  33.  
  34. void canInit(void);
  35. void canISR(void);
  36. void canParse(CAN_MESSAGE cm);
  37. BOOL canSendMessage(CAN_MESSAGE cm, CAN_PRIORITY prio);
  38.  
  39. #endif //CAN.h
  40.