diff --git a/board/boards.h b/board/boards.h index 7cf473c..2af4b3e 100644 --- a/board/boards.h +++ b/board/boards.h @@ -1,3 +1,4 @@ +extern uint8_t hw_type; board_t board; void board_detect(void) { diff --git a/board/bootstub.c b/board/bootstub.c index 20e7a79..f75a939 100644 --- a/board/bootstub.c +++ b/board/bootstub.c @@ -29,6 +29,8 @@ #include "flasher.h" +uint8_t hw_type; // type of the board detected(0 - base, 3 - knee) + void __initialize_hardware_early(void) { early_initialization(); } diff --git a/board/defines.h b/board/defines.h index 4b24b24..bb678bd 100644 --- a/board/defines.h +++ b/board/defines.h @@ -172,6 +172,4 @@ typedef struct { } board_t; -uint8_t hw_type; // type of the board detected(0 - base, 3 - knee) - #endif // DEFINES_H diff --git a/board/flasher.h b/board/flasher.h index fea6332..43cfa47 100644 --- a/board/flasher.h +++ b/board/flasher.h @@ -23,6 +23,7 @@ USB_Setup_TypeDef; uint32_t *prog_ptr = NULL; bool unlocked = false; +extern uint8_t hw_type; #define CAN_BL_INPUT 0x1 #define CAN_BL_OUTPUT 0x2 diff --git a/board/main.c b/board/main.c index 4cc4490..c2ee510 100644 --- a/board/main.c +++ b/board/main.c @@ -62,6 +62,7 @@ int16_t board_temp_deg_c; // global variable for calibrated temperature i volatile int16_t cmdL; // global variable for Left Command volatile int16_t cmdR; // global variable for Right Command +uint8_t hw_type; // type of the board detected(0 - base, 3 - knee) uint8_t ignition = 0; // global variable for ignition on SBU2 line uint8_t charger_connected = 0; // status of the charger port uint8_t fault_status = 0; // fault status of the whole system