Subversion Repositories HomeAutomation

Rev

Rev 86 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 86 Rev 339
Line 2... Line 2...
2
 *
2
 *
3
 *   CAN module header file with prototypes and message typedef
3
 *   CAN module header file with prototypes and message typedef
4
 *
4
 *
5
 *********************************************************************
5
 *********************************************************************
6
 * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canBase/Include/CAN.h $
6
 * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canBase/Include/CAN.h $
7
 * Last changed:    $LastChangedDate: 2006-11-14 10:55:38 +0100 (Tue, 14 Nov 2006) $
7
 * Last changed:    $LastChangedDate: 2007-02-25 20:51:08 +0100 (Sun, 25 Feb 2007) $
8
 * By:              $LastChangedBy: johboh $
8
 * By:              $LastChangedBy: johboh $
9
 * Revision:        $Revision: 86 $
9
 * Revision:        $Revision: 339 $
10
 ********************************************************************/
10
 ********************************************************************/
11
 
11
 
12
#ifndef CAN_H
12
#ifndef CAN_H
13
#define CAN_H
13
#define CAN_H
14
 
14
 
15
#include <CANdefs.h>
15
#include <CANdefs.h>
16
#include <compiler.h>
16
#include <compiler.h>
17
#include <typedefs.h>
17
#include <typedefs.h>
18
 
-
 
19
 
-
 
20
typedef struct _CAN_MESSAGE
-
 
21
{
-
 
22
    BYTE funct; //4
-
 
23
    WORD funcc; //10
18
#include <funcdefs.h>
24
    BYTE nid; //6
-
 
25
    WORD sid; //9
-
 
26
    BYTE data_length;//5
-
 
27
    BYTE data[8];
-
 
28
} CAN_MESSAGE;
-
 
29
 
-
 
30
 
19
 
31
typedef enum {PRIO_LOWEST=0,PRIO_LOW=1,PRIO_HIGH=2,PRIO_HIGEST=3} CAN_PRIORITY;
20
typedef enum {PRIO_LOWEST=0,PRIO_LOW=1,PRIO_HIGH=2,PRIO_HIGEST=3} CAN_PRIORITY;
32
 
21
 
33
 
22
 
34
void canInit(void);
23
void canInit(void);
35
void canISR(void);
24
void canISR(void);
36
void canParse(CAN_MESSAGE cm);
25
void canParse(CAN_PACKET cp);
37
BOOL canSendMessage(CAN_MESSAGE cm, CAN_PRIORITY prio);
26
BOOL canSendMessage(CAN_PACKET cp, CAN_PRIORITY prio);
38
 
27
 
39
#endif //CAN.h
28
#endif //CAN.h