Subversion Repositories HomeAutomation

Rev

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

Rev 244 Rev 250
Line 3... Line 3...
3
 
3
 
4
/*-----------------------------------------------------------------------------
4
/*-----------------------------------------------------------------------------
5
 * Includes
5
 * Includes
6
 *---------------------------------------------------------------------------*/
6
 *---------------------------------------------------------------------------*/
7
#include <inttypes.h>
7
#include <inttypes.h>
8
#include "can_cfg.h"
-
 
9
 
-
 
10
 
-
 
11
/*-----------------------------------------------------------------------------
-
 
12
 * Defines
-
 
13
 *---------------------------------------------------------------------------*/
-
 
14
 
-
 
15
/*
-
 
16
 * The supported CAN controller devices are listed below.
-
 
17
 */
-
 
18
#define CAN_CONTROLLER_NULL     0       /* Virtual null-device */
-
 
19
#define CAN_CONTROLLER_MCP2515  1       /* Microchip MCP2515 via SPI */
-
 
20
 
8
 
21
 
9
 
22
/*-----------------------------------------------------------------------------
10
/*-----------------------------------------------------------------------------
23
 * Type Definitions
11
 * Type Definitions
24
 *---------------------------------------------------------------------------*/
12
 *---------------------------------------------------------------------------*/
25
 
-
 
26
#if 0
-
 
27
/**
-
 
28
 * CAN Bitrate Type. The supported bitrates.
-
 
29
 */
-
 
30
typedef enum {
-
 
31
    CAN_BITRATE_125K = 0,           /* Max cable length: 500m */
-
 
32
    CAN_BITRATE_250K = 1,           /* Max cable length: 250m */
-
 
33
    CAN_BITRATE_500K = 2,           /* Max cable length: 100m */
-
 
34
    CAN_BITRATE_1M = 3              /* Max cable length: 40m */
-
 
35
} Can_Bitrate_t;
-
 
36
#endif
-
 
37
 
13
 
38
 
14
 
39
/**
15
/**
40
 * CAN Return Type. Most CAN functions return one of these.
16
 * CAN Return Type. Most CAN functions return one of these.
41
 */
17
 */
Line 92... Line 68...
92
 
68
 
93
/*-----------------------------------------------------------------------------
69
/*-----------------------------------------------------------------------------
94
 * Public Function Prototypes
70
 * Public Function Prototypes
95
 *---------------------------------------------------------------------------*/
71
 *---------------------------------------------------------------------------*/
96
 
72
 
97
Can_Return_t Can_Init(void);
73
//Can_Return_t Can_Init(void);
98
Can_Return_t Can_Send(Can_Message_t* msg);
74
//Can_Return_t Can_Send(Can_Message_t* msg);
99
void Can_Service(void);
75
//void Can_Service(void);
100
Can_Return_t Can_Receive(Can_Message_t *msg);
76
//Can_Return_t Can_Receive(Can_Message_t *msg);
101
 
77
 
102
#endif
78
#endif