diff --git a/board/drivers/can.h b/board/drivers/can.h index c2786f235db9b4..27cf545a88f2a2 100644 --- a/board/drivers/can.h +++ b/board/drivers/can.h @@ -1,6 +1,3 @@ -#ifndef PANDA_CAN_H -#define PANDA_CAN_H - // IRQs: CAN1_TX, CAN1_RX0, CAN1_SCE // CAN2_TX, CAN2_RX0, CAN2_SCE // CAN3_TX, CAN3_RX0, CAN3_SCE @@ -36,8 +33,6 @@ int can_pop(can_ring *q, CAN_FIFOMailBox_TypeDef *elem); #define ALL_CAN_BUT_MAIN_SILENT 0xFE #define ALL_CAN_LIVE 0 -#include "llcan.h" - int can_live = 0, pending_can_live = 0, can_loopback = 0, can_silent = ALL_CAN_SILENT; // ********************* instantiate queues ********************* @@ -433,5 +428,3 @@ void can_set_forwarding(int from, int to) { can_forwarding[from] = to; } -#endif - diff --git a/board/drivers/gmlan_alt.h b/board/drivers/gmlan_alt.h index 8521100a88083a..d24833a8fb1ff8 100644 --- a/board/drivers/gmlan_alt.h +++ b/board/drivers/gmlan_alt.h @@ -114,8 +114,6 @@ int get_bit_message(char *out, CAN_FIFOMailBox_TypeDef *to_bang) { return len; } -#ifdef PANDA - void setup_timer4() { // setup TIM4->PSC = 48-1; // tick on 1 us @@ -273,4 +271,3 @@ void bitbang_gmlan(CAN_FIFOMailBox_TypeDef *to_bang) { setup_timer4(); } -#endif diff --git a/board/drivers/llgpio.h b/board/drivers/llgpio.h index 7b58301e3f817b..984127631221f7 100644 --- a/board/drivers/llgpio.h +++ b/board/drivers/llgpio.h @@ -1,6 +1,3 @@ -#ifndef PANDA_LLGPIO_H -#define PANDA_LLGPIO_H - #define MODE_INPUT 0 #define MODE_OUTPUT 1 #define MODE_ALTERNATE 2 @@ -45,5 +42,3 @@ int get_gpio_input(GPIO_TypeDef *GPIO, int pin) { return (GPIO->IDR & (1 << pin)) == (1 << pin); } -#endif - diff --git a/board/drivers/spi.h b/board/drivers/spi.h index bfab1fc883b855..970a99869fa0a1 100644 --- a/board/drivers/spi.h +++ b/board/drivers/spi.h @@ -1,6 +1,3 @@ -#ifndef PANDA_SPI_H -#define PANDA_SPI_H - // IRQs: DMA2_Stream2, DMA2_Stream3, EXTI4 void spi_init(); @@ -128,5 +125,3 @@ void EXTI4_IRQHandler(void) { EXTI->PR = pr; } -#endif - diff --git a/board/drivers/usb.h b/board/drivers/usb.h index bd2678b702fde7..707ae109a96766 100644 --- a/board/drivers/usb.h +++ b/board/drivers/usb.h @@ -1,6 +1,3 @@ -#ifndef PANDA_USB_H -#define PANDA_USB_H - // IRQs: OTG_FS typedef union { @@ -1024,6 +1021,3 @@ void OTG_FS_IRQHandler(void) { NVIC_EnableIRQ(OTG_FS_IRQn); } -#endif - - diff --git a/board/main.c b/board/main.c index 9cdb708b03f7fa..1e5f28e487cf77 100644 --- a/board/main.c +++ b/board/main.c @@ -5,10 +5,12 @@ // ********************* includes ********************* + #include "libc.h" #include "safety.h" #include "provision.h" +#include "drivers/llcan.h" #include "drivers/llgpio.h" #include "gpio.h"