Subversion Repositories HomeAutomation

Rev

Rev 91 | Blame | Last modification | View Log | SVN | RSS feed

  1. /*********************************************************************
  2.  *
  3.  *                  CAN module header file
  4.  *
  5.  *********************************************************************
  6.  * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canBoot/Include/CAN.h $
  7.  * Last changed:    $LastChangedDate: 2006-11-15 09:41:08 +0100 (Wed, 15 Nov 2006) $
  8.  * By:              $LastChangedBy: johboh $
  9.  * Revision:        $Revision: 101 $
  10.  ********************************************************************/
  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_PROTO_MESSAGE
  22. {
  23.     BYTE funct; //4
  24.     WORD funcc; //10
  25.     BYTE nid; //6
  26.     WORD sid; //9
  27.     BYTE data_length;//5
  28.     BYTE data[8];
  29. } CAN_PROTO_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. BOOL canSendMessage(CAN_PROTO_MESSAGE cm, CAN_PRIORITY prio);
  37.  
  38. #endif //CAN.h
  39.