18#define CAN_ID_ERROR 0x01
19#define CAN_ID_GAMEOVER 0x02
20#define CAN_ID_GAMESTART 0x03
21#define CAN_ID_JOYPOS 0x04
22#define CAN_ID_RESET 0x05
23#define CAN_ID_READY 0x06
24#define CAN_ID_SCORE 0x07
25#define CAN_ID_DEFAULT 0x08
int can_rxq_add(struct CAN_frame *msg)
Add a CAN frame to the internal receive queue.
int8_t can_write(struct can_device *dev, struct CAN_frame msg)
Write a CAN frame to the MCP2515 transmit buffer.
int8_t can_reset(struct can_device *dev, uint8_t address, struct CAN_frame data_frame)
int8_t MCP2515_read_status(struct can_device *dev, uint8_t *out)
int8_t MCP2515_bit_modify(struct can_device *dev, uint8_t reg, uint8_t mask, uint8_t set_val)
int8_t MCP2515_request_to_send(struct can_device *dev, uint8_t tx_buf_num)
int8_t can_init(struct can_device *dev)
Initialize a CAN device.
int8_t can_read_rx1(struct can_device *dev, struct CAN_frame *out)
Read a message from RX buffer 1.
int8_t MCP2515_read(struct can_device *dev, uint8_t rx_buf_num, uint8_t *out)
int8_t MCP2515_write(struct can_device *dev, uint8_t addr, uint8_t data)
int8_t MCP2515_init(struct can_device *dev)
int can_rxq_pull(struct CAN_frame *out)
Pull a CAN frame from the internal receive queue.
int8_t MCP2515_reset(struct can_device *dev)
int8_t can_read_rx0(struct can_device *dev, struct CAN_frame *out)
Read a message from RX buffer 0.
spi_slave
Identifiers for available SPI slave devices.
Represents a full CAN frame for sending/receiving.
Represents a CAN device, storing the SPI slave controlling the MCP2515.
Represents a simple CAN message with an address, data count, and a single byte of data.