Subversion Repositories HomeAutomation

Rev

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

Rev 85 Rev 86
Line 1... Line 1...
1
/*********************************************************************
1
/*********************************************************************
2
 *
2
 *
3
 *                  CAN.c header file
3
 *   CAN module header file with prototypes and message typedef
4
 *
4
 *
5
 *********************************************************************
5
 *********************************************************************
6
 * FileName:        CAN.h
6
 * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canBase/Include/CAN.h $
7
 *
-
 
8
 * Author               Date    Comment
7
 * Last changed:    $LastChangedDate: 2006-11-14 10:55:38 +0100 (Tue, 14 Nov 2006) $
9
 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8
 * By:              $LastChangedBy: johboh $
10
 * Johan Böhlin     21-10-06    Original        (Rev 1.0)
9
 * Revision:        $Revision: 86 $
11
 ********************************************************************/
10
 ********************************************************************/
12
 
11
 
13
#ifndef CAN_H
12
#ifndef CAN_H
14
#define CAN_H
13
#define CAN_H
15
 
14
 
16
#include <CANdefs.h>
15
#include <CANdefs.h>
17
#include <compiler.h>
16
#include <compiler.h>
18
#include <typedefs.h>
17
#include <typedefs.h>
19
 
18
 
20
 
19
 
21
typedef struct _CAN_MESSAGE
20
typedef struct _CAN_MESSAGE
22
{
21
{
23
   
22
    BYTE funct; //4
24
    DWORD ident;
23
    WORD funcc; //10
25
    BOOL extended;
24
    BYTE nid; //6
26
    BOOL remote_request;
25
    WORD sid; //9
27
    BYTE data_length;
26
    BYTE data_length;//5
28
    BYTE data[8];
27
    BYTE data[8];
29
} CAN_MESSAGE;
28
} CAN_MESSAGE;
30
 
29
 
31
 
30
 
32
typedef enum {PRIO_LOWEST=0,PRIO_LOW=1,PRIO_HIGH=2,PRIO_HIGEST=3} CAN_PRIORITY;
31
typedef enum {PRIO_LOWEST=0,PRIO_LOW=1,PRIO_HIGH=2,PRIO_HIGEST=3} CAN_PRIORITY;