diff --git a/CustomDevices b/CustomDevices new file mode 160000 index 00000000..9d0fc99c --- /dev/null +++ b/CustomDevices @@ -0,0 +1 @@ +Subproject commit 9d0fc99c7229c75df4fc20ff91b5e7a60682601e diff --git a/_Boards/Atmel/Board_Mega/MFBoards.h b/_Boards/Atmel/Board_Mega/MFBoards.h index a5c24a41..efd9d0e2 100644 --- a/_Boards/Atmel/Board_Mega/MFBoards.h +++ b/_Boards/Atmel/Board_Mega/MFBoards.h @@ -35,9 +35,6 @@ #define MF_MUX_SUPPORT 1 #define MF_DIGIN_MUX_SUPPORT 1 #endif -#ifndef MF_CUSTOMDEVICE_SUPPORT -#define MF_CUSTOMDEVICE_SUPPORT 1 -#endif #ifndef MAX_OUTPUTS #define MAX_OUTPUTS 40 @@ -85,9 +82,6 @@ #ifndef MOBIFLIGHT_NAME #define MOBIFLIGHT_NAME "MobiFlight Mega" #endif -#ifndef EEPROM_SIZE -#define EEPROM_SIZE 4096 // EEPROMSizeMega -#endif #ifndef MEMLEN_CONFIG #define MEMLEN_CONFIG 1496 // max. size for config which wil be stored in EEPROM #endif diff --git a/_Boards/Atmel/Board_Nano/MFBoards.h b/_Boards/Atmel/Board_Nano/MFBoards.h index 9b383196..9da771c7 100644 --- a/_Boards/Atmel/Board_Nano/MFBoards.h +++ b/_Boards/Atmel/Board_Nano/MFBoards.h @@ -35,9 +35,6 @@ #define MF_MUX_SUPPORT 1 #define MF_DIGIN_MUX_SUPPORT 1 #endif -#ifndef MF_CUSTOMDEVICE_SUPPORT -#define MF_CUSTOMDEVICE_SUPPORT 2 -#endif #ifndef MAX_OUTPUTS #define MAX_OUTPUTS 18 @@ -85,9 +82,6 @@ #ifndef MOBIFLIGHT_NAME #define MOBIFLIGHT_NAME "MobiFlight Nano" #endif -#ifndef EEPROM_SIZE -#define EEPROM_SIZE 1024 // EEPROMSizeUno -#endif #ifndef MEMLEN_CONFIG #define MEMLEN_CONFIG 286 // max. size for config which wil be stored in EEPROM #endif diff --git a/_Boards/Atmel/Board_ProMicro/MFBoards.h b/_Boards/Atmel/Board_ProMicro/MFBoards.h index 062d4bd4..828c6ad8 100644 --- a/_Boards/Atmel/Board_ProMicro/MFBoards.h +++ b/_Boards/Atmel/Board_ProMicro/MFBoards.h @@ -35,9 +35,6 @@ #define MF_MUX_SUPPORT 1 #define MF_DIGIN_MUX_SUPPORT 1 #endif -#ifndef MF_CUSTOMDEVICE_SUPPORT -#define MF_CUSTOMDEVICE_SUPPORT 2 -#endif #ifndef MAX_OUTPUTS #define MAX_OUTPUTS 18 @@ -85,9 +82,6 @@ #ifndef MOBIFLIGHT_NAME #define MOBIFLIGHT_NAME "MobiFlight Micro" #endif -#ifndef EEPROM_SIZE -#define EEPROM_SIZE 1024 // EEPROMSizeMicro -#endif #ifndef MEMLEN_CONFIG #define MEMLEN_CONFIG 440 // max. size for config which wil be stored in EEPROM #endif diff --git a/_Boards/Atmel/Board_Uno/MFBoards.h b/_Boards/Atmel/Board_Uno/MFBoards.h index cd46350d..442f64c1 100644 --- a/_Boards/Atmel/Board_Uno/MFBoards.h +++ b/_Boards/Atmel/Board_Uno/MFBoards.h @@ -35,9 +35,6 @@ #define MF_MUX_SUPPORT 1 #define MF_DIGIN_MUX_SUPPORT 1 #endif -#ifndef MF_CUSTOMDEVICE_SUPPORT -#define MF_CUSTOMDEVICE_SUPPORT 2 -#endif #ifndef MAX_OUTPUTS #define MAX_OUTPUTS 18 @@ -85,9 +82,6 @@ #ifndef MOBIFLIGHT_NAME #define MOBIFLIGHT_NAME "MobiFlight Uno" #endif -#ifndef EEPROM_SIZE -#define EEPROM_SIZE 1024 // EEPROMSizeUno -#endif #ifndef MEMLEN_CONFIG #define MEMLEN_CONFIG 286 // max. size for config which wil be stored in EEPROM #endif diff --git a/_Boards/RaspberryPi/Pico/MFBoards.h b/_Boards/RaspberryPi/Pico/MFBoards.h index 61dc0831..38fc4e75 100644 --- a/_Boards/RaspberryPi/Pico/MFBoards.h +++ b/_Boards/RaspberryPi/Pico/MFBoards.h @@ -76,9 +76,6 @@ #ifndef MOBIFLIGHT_NAME #define MOBIFLIGHT_NAME "MobiFlight RaspiPico" #endif -#ifndef EEPROM_SIZE -#define EEPROM_SIZE 4096 // EEPROMSizeRaspberryPico -#endif #ifndef MEMLEN_CONFIG #define MEMLEN_CONFIG 1496 // MUST be less than EEPROM_SIZE!! MEM_OFFSET_CONFIG + MEM_LEN_CONFIG <= EEPROM_SIZE, see: eeprom_write_block (MEM_OFFSET_CONFIG, configBuffer, MEM_LEN_CONFIG); #endif diff --git a/platformio.ini b/platformio.ini index 2e67157e..ea18d72b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -66,7 +66,6 @@ board = megaatmega2560 framework = arduino build_flags = ${env.build_flags} - -DMF_CUSTOMDEVICE_SUPPORT=0 '-DMOBIFLIGHT_TYPE="MobiFlight Mega"' -I./_Boards/Atmel/Board_Mega build_src_filter = @@ -85,7 +84,6 @@ board = sparkfun_promicro16 framework = arduino build_flags = ${env.build_flags} - -DMF_CUSTOMDEVICE_SUPPORT=0 '-DMOBIFLIGHT_TYPE="MobiFlight Micro"' -I./_Boards/Atmel/Board_ProMicro build_src_filter = @@ -105,7 +103,6 @@ board = uno framework = arduino build_flags = ${env.build_flags} - -DMF_CUSTOMDEVICE_SUPPORT=0 '-DMOBIFLIGHT_TYPE="MobiFlight Uno"' -I./_Boards/Atmel/Board_Uno build_src_filter = @@ -124,7 +121,6 @@ board = nanoatmega328 framework = arduino build_flags = ${env.build_flags} - -DMF_CUSTOMDEVICE_SUPPORT=0 '-DMOBIFLIGHT_TYPE="MobiFlight Nano"' -I./_Boards/Atmel/Board_Nano build_src_filter = @@ -148,7 +144,6 @@ upload_protocol = mbed ; for debugging upoading can be changed to picopr ;debug_tool = picoprobe ; and uncomment this for debugging w/ picoprobe build_flags = ${env.build_flags} - -DMF_CUSTOMDEVICE_SUPPORT=0 '-DMOBIFLIGHT_TYPE="MobiFlight RaspiPico"' -I./_Boards/RaspberryPi/Pico build_src_filter = diff --git a/src/MF_Modules/MFEEPROM.cpp b/src/MF_Modules/MFEEPROM.cpp index f9585af0..7d63bfd5 100644 --- a/src/MF_Modules/MFEEPROM.cpp +++ b/src/MF_Modules/MFEEPROM.cpp @@ -13,7 +13,7 @@ MFEEPROM::MFEEPROM() {} void MFEEPROM::init(void) { #if defined(ARDUINO_ARCH_RP2040) - EEPROM.begin(EEPROM_SIZE); + EEPROM.begin(4096); #endif _eepromLength = EEPROM.length(); }