canbus: Move high-level CAN code to new src/generic/canbus.c

Separate out the high-level command processing logic from the
low-level transmission code.  Place the high-level code in
src/generic/canbus.c .

This also removes the CAN dependency on serial_irq.c .

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2021-01-29 18:49:11 -05:00
parent bee544eaca
commit d9f6abdb56
6 changed files with 324 additions and 193 deletions

View File

@@ -176,9 +176,9 @@ config CANSERIAL
bool "Use CAN for communication (instead of serial)"
depends on !USBSERIAL
default n
config SERIAL_BAUD
config CANBUS_FREQUENCY
int "CAN bus speed" if LOW_LEVEL_OPTIONS && CANSERIAL
default 500000 if CANSERIAL
default 500000
choice
depends on CANSERIAL
prompt "CAN pins"