blob: 60f2d10c39c455d0b6407eff35636ee24dd3274c [file] [log] [blame]
brians0ab60bb2013-01-31 02:21:51 +00001#ifndef _CAN_H_
2#define _CAN_H_
3
4typedef struct _can_message {
5 unsigned RTR:1;
6 unsigned error:7;
7 uint16_t id;
8 uint8_t priority;
9 uint8_t length;
10 union {
11 uint8_t data[8];
12 uint32_t wdata[2];
13 };
14} can_message;
15
16int CAN_get(can_message *message);
Brian Silverman1dbe3542013-10-31 20:29:11 -070017
18// Sets up PCLKSEL for CAN stuff (errata PCLKSELx.1).
19void CAN_PCLKSEL(void);
brians0ab60bb2013-01-31 02:21:51 +000020void initCAN(void);
21
22#endif