Subversion Repositories HomeAutomation

Rev

Details | Last modification | View Log | SVN | RSS feed

Rev Author Line No. Line
53 johboh 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;
56 johboh 26
    BOOL remote_request;
53 johboh 27
    BYTE data_length;
28
    BYTE data[8];
29
} CAN_MESSAGE;
30
 
31
 
56 johboh 32
typedef enum {PRIO_LOWEST=0,PRIO_LOW=1,PRIO_HIGH=2,PRIO_HIGEST=3} CAN_PRIORITY;
53 johboh 33
 
34
 
35
void canInit(void);
36
void canISR(void);
37
void canParse(CAN_MESSAGE cm);
56 johboh 38
BOOL canSendMessage(CAN_MESSAGE cm, CAN_PRIORITY prio);
53 johboh 39
 
40
#endif //CAN.h