canbus: Move canbus uuid calculation to canbus.c

Move the uuid hash calculation to canbus.c and call canbus_set_uuid()
from src/stm32/chipid.c .  This simplifies the low-level canbus
hardware code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2022-06-12 11:55:46 -04:00
parent 3f7d05dd18
commit fc7838855f
7 changed files with 21 additions and 25 deletions

View File

@@ -5,7 +5,6 @@
#define CANBUS_ID_ADMIN 0x3f0
#define CANBUS_ID_ADMIN_RESP 0x3f1
#define CANBUS_UUID_LEN 6
struct canbus_msg {
uint32_t id;
@@ -28,6 +27,6 @@ void canbus_set_filter(uint32_t id);
// canbus.c
void canbus_notify_tx(void);
void canbus_process_data(struct canbus_msg *msg);
void canbus_set_uuid(void *data);
void canbus_set_uuid(uint8_t *raw_uuid, uint32_t raw_uuid_len);
#endif // canbus.h