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

@@ -56,16 +56,11 @@ config USB_VENDOR_ID
config USB_DEVICE_ID
default 0x614e
config USB_SERIAL_NUMBER_CHIPID
depends on HAVE_CHIPID
depends on HAVE_CHIPID && USBSERIAL
default y
config USB_SERIAL_NUMBER
default "12345"
# Generic configuration options for CANbus
config CANBUS_FREQUENCY
int "CAN bus speed" if LOW_LEVEL_OPTIONS && CANSERIAL
default 500000
menu "USB ids"
depends on USBSERIAL && LOW_LEVEL_OPTIONS
config USB_VENDOR_ID
@@ -78,6 +73,12 @@ config USB_SERIAL_NUMBER
string "USB serial number" if !USB_SERIAL_NUMBER_CHIPID
endmenu
# Generic configuration options for CANbus
config CANBUS_FREQUENCY
int "CAN bus speed" if LOW_LEVEL_OPTIONS && CANSERIAL
default 500000
# Support setting gpio state at startup
config INITIAL_PINS
string "GPIO pins to set at micro-controller startup"
depends on LOW_LEVEL_OPTIONS