diff --git a/speeduino/board_avr2560.h b/speeduino/board_avr2560.h index 400d98e3..34e60d13 100644 --- a/speeduino/board_avr2560.h +++ b/speeduino/board_avr2560.h @@ -11,6 +11,7 @@ */ #define PORT_TYPE uint8_t //Size of the port variables (Eg inj1_pin_port). #define PINMASK_TYPE uint8_t + #define EEPROM_LIB_H void initBoard(); uint16_t freeRam(); diff --git a/speeduino/board_stm32_generic.h b/speeduino/board_stm32_generic.h index 80325828..98cd7f16 100644 --- a/speeduino/board_stm32_generic.h +++ b/speeduino/board_stm32_generic.h @@ -11,6 +11,7 @@ #define micros_safe() micros() //timer5 method is not used on anything but AVR, the micros_safe() macro is simply an alias for the normal micros() #ifndef USE_SERIAL3 #define USE_SERIAL3 + #define EEPROM_LIB_H #endif void initBoard(); uint16_t freeRam(); diff --git a/speeduino/board_stm32_official.h b/speeduino/board_stm32_official.h index d6bb9fc3..d259a545 100644 --- a/speeduino/board_stm32_official.h +++ b/speeduino/board_stm32_official.h @@ -3,6 +3,7 @@ #if defined(CORE_STM32_OFFICIAL) #include +#include /* *********************************************************************************************************** * General @@ -10,6 +11,8 @@ #define PORT_TYPE uint32_t #define PINMASK_TYPE uint32_t #define micros_safe() micros() //timer5 method is not used on anything but AVR, the micros_safe() macro is simply an alias for the normal micros() +#define EEPROM_LIB_H "src/BackupSram/BackupSramAsEEPROM.h" +#define digitalPinToInterrupt(p) (p) #define USE_SERIAL3 void initBoard(); diff --git a/speeduino/board_teensy35.h b/speeduino/board_teensy35.h index fb1f4871..aa6dd4d7 100644 --- a/speeduino/board_teensy35.h +++ b/speeduino/board_teensy35.h @@ -13,6 +13,7 @@ #define BOARD_DIGITAL_GPIO_PINS 34 #define BOARD_NR_GPIO_PINS 34 #define USE_SERIAL3 + #define EEPROM_LIB_H #define micros_safe() micros() //timer5 method is not used on anything but AVR, the micros_safe() macro is simply an alias for the normal micros() diff --git a/speeduino/board_template.h b/speeduino/board_template.h index 337650ac..0b16e6d7 100644 --- a/speeduino/board_template.h +++ b/speeduino/board_template.h @@ -10,6 +10,7 @@ #define PINMASK_TYPE uint32_t #define BOARD_NR_GPIO_PINS 52 //Not sure this is correct #define BOARD_DIGITAL_GPIO_PINS 52 //Pretty sure this isn't right + #define EEPROM_LIB_H //The name of the file that provides the EEPROM class #define micros_safe() micros() //timer5 method is not used on anything but AVR, the micros_safe() macro is simply an alias for the normal micros() void initBoard(); uint16_t freeRam(); diff --git a/speeduino/storage.ino b/speeduino/storage.ino index 198872fe..254f6b72 100644 --- a/speeduino/storage.ino +++ b/speeduino/storage.ino @@ -8,15 +8,7 @@ A full copy of the license may be found in the projects root directory #include "globals.h" #include "table.h" #include "comms.h" -#if defined(CORE_SAMD21) - #include "src/FlashStorage/FlashAsEEPROM.h" -#elif defined(ARDUINO_BLACK_F407VE) - #include "src/BackupSram/BackupSramAsEEPROM.h" -#elif defined(USE_FRAM) - #include -#else - #include -#endif +#include EEPROM_LIB_H //This is defined in the board .h files #include "storage.h" void writeAllConfig()