Subversion Repositories HomeAutomation

Rev

Rev 56 | Rev 97 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  1. /*********************************************************************
  2.  *
  3.  *                  CAN.c header file
  4.  *
  5.  *********************************************************************
  6.  * FileName:        CAN.h
  7.  *
  8.  * Author               Date    Comment
  9.  *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  10.  * Johan Böhlin     21-10-06    Original        (Rev 1.0)
  11.  ********************************************************************/
  12.  
  13. #ifndef CAN_H
  14. #define CAN_H
  15.  
  16. #include <CANdefs.h>
  17. #include <compiler.h>
  18. #include <typedefs.h>
  19.  
  20.  
  21. typedef struct _CAN_MESSAGE
  22. {
  23.    
  24.     DWORD ident;
  25.     BOOL extended;
  26.     BOOL remote_request;
  27.     BYTE data_length;
  28.     BYTE data[8];
  29. } CAN_MESSAGE;
  30.  
  31.  
  32. typedef enum {PRIO_LOWEST=0,PRIO_LOW=1,PRIO_HIGH=2,PRIO_HIGEST=3} CAN_PRIORITY;
  33.  
  34.  
  35. void canInit(void);
  36. void canISR(void);
  37. void canParse(CAN_MESSAGE cm);
  38. BOOL canSendMessage(CAN_MESSAGE cm, CAN_PRIORITY prio);
  39.  
  40. #endif //CAN.h
  41.