blob: 60f2d10c39c455d0b6407eff35636ee24dd3274c [file] [log] [blame]
#ifndef _CAN_H_
#define _CAN_H_
typedef struct _can_message {
unsigned RTR:1;
unsigned error:7;
uint16_t id;
uint8_t priority;
uint8_t length;
union {
uint8_t data[8];
uint32_t wdata[2];
};
} can_message;
int CAN_get(can_message *message);
// Sets up PCLKSEL for CAN stuff (errata PCLKSELx.1).
void CAN_PCLKSEL(void);
void initCAN(void);
#endif