diff --git a/general/include/LTC4015.h b/general/include/LTC4015.h index 748fec5..76a59b5 100644 --- a/general/include/LTC4015.h +++ b/general/include/LTC4015.h @@ -10,8 +10,7 @@ #define LTC4015_H_ #include -#include "stm32f4xx_hal.h" -#include "stm32f4xx_hal_i2c.h" +#include "stm32xx_hal.h" //Device address #define LTC4015_ADDR_68 (0x68) diff --git a/general/include/lsm6dso.h b/general/include/lsm6dso.h index 5926596..b49c21d 100644 --- a/general/include/lsm6dso.h +++ b/general/include/lsm6dso.h @@ -9,8 +9,7 @@ #ifndef LSM6DSO_H #define LSM6DSO_H #include -#include "stm32f4xx_hal.h" -#include "stm32f4xx_hal_i2c.h" +#include "stm32xx_hal.h" #define LSM6DSO_I2C_ADDRESS 0x6A << 1 /* Shifted because datasheet said to */ // Not sure if these are all needed, also not sure if more need to be added diff --git a/general/include/ltc68041.h b/general/include/ltc68041.h index b4a25d1..c0256ba 100644 --- a/general/include/ltc68041.h +++ b/general/include/ltc68041.h @@ -50,8 +50,7 @@ Copyright 2013 Linear Technology Corp. (LTC) #ifndef LTC68041_H #define LTC68041_H -#include "stm32f4xx_hal.h" -#include "stm32f4xx_hal_spi.h" +#include "stm32xx_hal.h" #define LTC_MAX_RETRIES 10 #define LTC_BAD_READ 0xFEEEEEEE diff --git a/general/include/m24c32.h b/general/include/m24c32.h index fdd3616..a666e8d 100644 --- a/general/include/m24c32.h +++ b/general/include/m24c32.h @@ -3,8 +3,7 @@ #include #include -#include "stm32f4xx_hal.h" -#include "stm32f4xx_hal_i2c.h" +#include "stm32xx_hal.h" #define M24C32_I2C_ADDR 0x50 #define M24C32_PAGE_SIZE 32 diff --git a/general/include/max7314.h b/general/include/max7314.h index 5419d8f..2464695 100644 --- a/general/include/max7314.h +++ b/general/include/max7314.h @@ -3,8 +3,7 @@ /* Drivers for MAX7314AEG+T */ -#include "stm32f4xx_hal.h" -#include "stm32f4xx_hal_i2c.h" +#include "stm32xx_hal.h" #include typedef enum { diff --git a/general/include/pi4ioe.h b/general/include/pi4ioe.h index bd8bc42..2c7e29f 100644 --- a/general/include/pi4ioe.h +++ b/general/include/pi4ioe.h @@ -10,8 +10,7 @@ #define PI4IOE_H #include -#include "stm32f4xx_hal.h" -#include "stm32f4xx_hal_i2c.h" +#include "stm32xx_hal.h" typedef struct { diff --git a/general/include/sht30.h b/general/include/sht30.h index 5d54eb1..c1af596 100644 --- a/general/include/sht30.h +++ b/general/include/sht30.h @@ -1,7 +1,7 @@ #ifndef sht30_h #define sht30_h -#include "stm32f4xx_hal.h" +#include "stm32xx_hal.h" #include #include diff --git a/general/include/stm32xx_hal.h b/general/include/stm32xx_hal.h new file mode 100644 index 0000000..0d9c798 --- /dev/null +++ b/general/include/stm32xx_hal.h @@ -0,0 +1,16 @@ +#ifndef STM32XX_HAL_H +#define STM32XX_HAL_H + +#ifdef STM32F405xx +#include "stm32f4xx_hal.h" +#endif + +#ifdef STM32H745xx +#include "stm32h7xx_hal.h" +#endif + +#ifdef STM32G431xx +#include "stm32g4xx_hal.h" +#endif + +#endif /* STM32XX_HAL_H*/ diff --git a/platforms/stm32f405/include/can.h b/platforms/stm32f405/include/can.h index 6f78635..0f14480 100644 --- a/platforms/stm32f405/include/can.h +++ b/platforms/stm32f405/include/can.h @@ -5,8 +5,7 @@ #include #include -#include "stm32f4xx_hal.h" -#include "stm32f4xx_hal_can.h" +#include "stm32xx_hal.h" #include "c_utils.h" /* diff --git a/platforms/stm32g431/include/fdcan.h b/platforms/stm32g431/include/fdcan.h index 956217b..a0e6221 100644 --- a/platforms/stm32g431/include/fdcan.h +++ b/platforms/stm32g431/include/fdcan.h @@ -5,8 +5,7 @@ #include #include -#include "stm32g4xx_hal.h" -#include "stm32g4xx_hal_fdcan.h" +#include "stm32xx_hal.h" /* function pointer type for the callback */ typedef void (*can_callback_t)(FDCAN_HandleTypeDef *hcan);