canbus: Rework CAN command protocol

Rework the micro-controller command protocol so that it supports
direct communication with the serialqueue.c code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2021-02-07 15:23:19 -05:00
parent 041692828c
commit 6cb419a90a
5 changed files with 162 additions and 74 deletions

View File

@@ -3,16 +3,14 @@
#include <stdint.h> // uint32_t
#define CANBUS_ID_UUID 0x321
#define CANBUS_ID_SET 0x322
#define CANBUS_ID_UUID_RESP 0x323
#define CANBUS_ID_ADMIN 0x3f0
#define CANBUS_ID_ADMIN_RESP 0x3f1
#define CANBUS_UUID_LEN 6
// callbacks provided by board specific code
int canbus_read(uint32_t *id, uint8_t *data);
int canbus_send(uint32_t id, uint32_t len, uint8_t *data);
void canbus_set_filter(uint32_t id);
void canbus_reboot(void);
// canbus.c
void canbus_notify_tx(void);