diff --git a/firmware/Makefile b/firmware/Makefile index 9c5bc57..92bfbc9 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -131,6 +131,7 @@ CSRC = $(ALLCSRC) $(BOARDDIR)/board.c # setting. CPPSRC = $(ALLCPPSRC) \ $(BOARDDIR)/port.cpp \ + $(BOARDDIR)/port_shared.cpp \ shared/flash.cpp \ can.cpp \ can_helper.cpp \ diff --git a/firmware/boards/f1_dave/port.cpp b/firmware/boards/f1_dave/port.cpp index c556891..15f87d0 100644 --- a/firmware/boards/f1_dave/port.cpp +++ b/firmware/boards/f1_dave/port.cpp @@ -54,12 +54,6 @@ AnalogResult AnalogSample() }; } -const CANConfig canConfig500 = -{ - CAN_MCR_ABOM | CAN_MCR_AWUM | CAN_MCR_TXFP, - 0 // TODO: set bit timing! correctly! -}; - Configuration GetConfiguration() { // TODO: implement me! diff --git a/firmware/boards/f1_dave/port_shared.cpp b/firmware/boards/f1_dave/port_shared.cpp new file mode 100644 index 0000000..f53d7a6 --- /dev/null +++ b/firmware/boards/f1_dave/port_shared.cpp @@ -0,0 +1,9 @@ +#include "port_shared.h" + +// board-specific stuff shared between bootloader and firmware + +const CANConfig canConfig500 = +{ + CAN_MCR_ABOM | CAN_MCR_AWUM | CAN_MCR_TXFP, + 0 // TODO: set bit timing! correctly! +};