From 5f7a75979f8c1f7cf1f3adbb61e862f17409047b Mon Sep 17 00:00:00 2001 From: randellhodges Date: Tue, 28 Apr 2020 02:27:55 -0500 Subject: [PATCH] LPC176x SPI / I2C PersistentStore (#17651) --- Marlin/src/HAL/DUE/EepromEmulation.cpp | 4 +- Marlin/src/HAL/LPC1768/eeprom_wired.cpp | 86 +++++++++++++++++++ Marlin/src/HAL/STM32/eeprom_wired.cpp | 17 +--- Marlin/src/HAL/STM32/inc/Conditionals_post.h | 2 +- Marlin/src/HAL/STM32_F4_F7/EmulatedEeprom.cpp | 6 +- .../HAL/STM32_F4_F7/inc/Conditionals_post.h | 1 + Marlin/src/HAL/shared/eeprom_i2c.cpp | 54 ++++++------ Marlin/src/HAL/shared/eeprom_spi.cpp | 8 +- Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h | 8 -- Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h | 8 -- Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h | 8 -- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h | 8 -- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 8 -- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 8 -- Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | 4 - Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h | 8 -- Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 8 -- Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 8 -- Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h | 8 -- Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h | 8 -- Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h | 8 -- Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h | 8 -- .../pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h | 8 -- .../pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h | 8 -- .../src/pins/lpc1769/pins_COHESION3D_MINI.h | 8 -- .../src/pins/lpc1769/pins_COHESION3D_REMIX.h | 8 -- Marlin/src/pins/lpc1769/pins_MKS_SGEN.h | 8 -- Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h | 8 -- Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h | 8 -- 29 files changed, 132 insertions(+), 210 deletions(-) create mode 100644 Marlin/src/HAL/LPC1768/eeprom_wired.cpp diff --git a/Marlin/src/HAL/DUE/EepromEmulation.cpp b/Marlin/src/HAL/DUE/EepromEmulation.cpp index 66af50cfd..8be9affa6 100644 --- a/Marlin/src/HAL/DUE/EepromEmulation.cpp +++ b/Marlin/src/HAL/DUE/EepromEmulation.cpp @@ -992,7 +992,7 @@ void eeprom_write_byte(uint8_t* addr, uint8_t value) { ee_Write((uint32_t)addr, value); } -void eeprom_update_block(const void* __src, void* __dst, size_t __n) { +void eeprom_update_block(const void *__src, void *__dst, size_t __n) { uint8_t* dst = (uint8_t*)__dst; const uint8_t* src = (const uint8_t*)__src; while (__n--) { @@ -1002,7 +1002,7 @@ void eeprom_update_block(const void* __src, void* __dst, size_t __n) { } } -void eeprom_read_block(void* __dst, const void* __src, size_t __n) { +void eeprom_read_block(void *__dst, const void *__src, size_t __n) { uint8_t* dst = (uint8_t*)__dst; uint8_t* src = (uint8_t*)__src; while (__n--) { diff --git a/Marlin/src/HAL/LPC1768/eeprom_wired.cpp b/Marlin/src/HAL/LPC1768/eeprom_wired.cpp new file mode 100644 index 000000000..3395601a2 --- /dev/null +++ b/Marlin/src/HAL/LPC1768/eeprom_wired.cpp @@ -0,0 +1,86 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * I2C/SPI EEPROM interface for LPC1768 + */ + +#ifdef TARGET_LPC1768 + +#include "../../inc/MarlinConfig.h" + +#if USE_WIRED_EEPROM + +#include "../shared/eeprom_api.h" +#include + +#ifndef EEPROM_SIZE + #define EEPROM_SIZE 0x8000 // 32kB‬ +#endif + +bool PersistentStore::access_start() { + TERN_(SPI_EEPROM, eeprom_init()); + return true; +} + +bool PersistentStore::access_finish() { return true; } + +bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { + while (size--) { + uint8_t v = *value; + + // EEPROM has only ~100,000 write cycles, + // so only write bytes that have changed! + uint8_t * const p = (uint8_t * const)pos; + if (v != eeprom_read_byte(p)) { + eeprom_write_byte(p, v); + if (eeprom_read_byte(p) != v) { + SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE); + return true; + } + } + + crc16(crc, &v, 1); + pos++; + value++; + }; + + return false; +} + +bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) { + do { + // Read from external EEPROM + const uint8_t c = eeprom_read_byte((uint8_t*)pos); + + if (writing) *value = c; + crc16(crc, &c, 1); + pos++; + value++; + } while (--size); + return false; +} + +size_t PersistentStore::capacity() { return EEPROM_SIZE; } + +#endif // USE_WIRED_EEPROM +#endif // TARGET_LPC1768 diff --git a/Marlin/src/HAL/STM32/eeprom_wired.cpp b/Marlin/src/HAL/STM32/eeprom_wired.cpp index cd0f93e8d..b83a2eb2b 100644 --- a/Marlin/src/HAL/STM32/eeprom_wired.cpp +++ b/Marlin/src/HAL/STM32/eeprom_wired.cpp @@ -28,13 +28,8 @@ #include "../shared/eeprom_api.h" -bool PersistentStore::access_start() { - return true; -} - -bool PersistentStore::access_finish() { - return true; -} +bool PersistentStore::access_start() { return true; } +bool PersistentStore::access_finish() { return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { while (size--) { @@ -84,13 +79,7 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t } size_t PersistentStore::capacity() { - return ( - #if USE_WIRED_EEPROM - E2END + 1 - #else - 4096 // 4kB - #endif - ); + return TERN(USE_WIRED_EEPROM, E2END + 1, 4096); // 4K for emulated } #endif // USE_WIRED_EEPROM || SRAM_EEPROM_EMULATION diff --git a/Marlin/src/HAL/STM32/inc/Conditionals_post.h b/Marlin/src/HAL/STM32/inc/Conditionals_post.h index 32ad3a57b..27e814a0a 100644 --- a/Marlin/src/HAL/STM32/inc/Conditionals_post.h +++ b/Marlin/src/HAL/STM32/inc/Conditionals_post.h @@ -21,7 +21,7 @@ */ #pragma once -// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation +// If no real or emulated EEPROM selected, fall back to SD emulation #if USE_FALLBACK_EEPROM #define SDCARD_EEPROM_EMULATION #endif diff --git a/Marlin/src/HAL/STM32_F4_F7/EmulatedEeprom.cpp b/Marlin/src/HAL/STM32_F4_F7/EmulatedEeprom.cpp index cc1a1bb01..3249ef2b7 100644 --- a/Marlin/src/HAL/STM32_F4_F7/EmulatedEeprom.cpp +++ b/Marlin/src/HAL/STM32_F4_F7/EmulatedEeprom.cpp @@ -80,7 +80,7 @@ void eeprom_write_byte(uint8_t *pos, unsigned char value) { HAL_FLASH_Unlock(); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR |FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR); - uint16_t eeprom_address = unsigned(pos); + const unsigned eeprom_address = (unsigned)pos; if (EE_WriteVariable(eeprom_address, uint16_t(value)) != EE_OK) for (;;) HAL_Delay(1); // Spin forever until watchdog reset @@ -91,7 +91,7 @@ uint8_t eeprom_read_byte(uint8_t *pos) { eeprom_init(); uint16_t data = 0xFF; - uint16_t eeprom_address = unsigned(pos); + const unsigned eeprom_address = (unsigned)pos; (void)EE_ReadVariable(eeprom_address, &data); // Data unchanged on error return uint8_t(data); @@ -101,7 +101,7 @@ void eeprom_read_block(void *__dst, const void *__src, size_t __n) { eeprom_init(); uint16_t data = 0xFF; - uint16_t eeprom_address = unsigned(__src); + const unsigned eeprom_address = (unsigned)__src; LOOP_L_N(c, __n) { EE_ReadVariable(eeprom_address+c, &data); *((uint8_t*)__dst + c) = data; diff --git a/Marlin/src/HAL/STM32_F4_F7/inc/Conditionals_post.h b/Marlin/src/HAL/STM32_F4_F7/inc/Conditionals_post.h index d21624955..a96352376 100644 --- a/Marlin/src/HAL/STM32_F4_F7/inc/Conditionals_post.h +++ b/Marlin/src/HAL/STM32_F4_F7/inc/Conditionals_post.h @@ -26,4 +26,5 @@ #undef SRAM_EEPROM_EMULATION #undef SDCARD_EEPROM_EMULATION #define FLASH_EEPROM_EMULATION + #warning "Forcing use of FLASH_EEPROM_EMULATION." #endif diff --git a/Marlin/src/HAL/shared/eeprom_i2c.cpp b/Marlin/src/HAL/shared/eeprom_i2c.cpp index 8ce3b88c4..cc60c8d19 100644 --- a/Marlin/src/HAL/shared/eeprom_i2c.cpp +++ b/Marlin/src/HAL/shared/eeprom_i2c.cpp @@ -35,44 +35,50 @@ #include "../HAL.h" #include +#ifndef EEPROM_WRITE_DELAY + #define EEPROM_WRITE_DELAY 5 +#endif + // ------------------------ // Private Variables // ------------------------ -static constexpr uint8_t eeprom_device_address = I2C_ADDRESS(0x50); +#ifndef EEPROM_DEVICE_ADDRESS + #define EEPROM_DEVICE_ADDRESS 0x50 +#endif + +static constexpr uint8_t eeprom_device_address = I2C_ADDRESS(EEPROM_DEVICE_ADDRESS); // ------------------------ // Public functions // ------------------------ -static void eeprom_init() { - Wire.begin(); -} +static void eeprom_init() { Wire.begin(); } void eeprom_write_byte(uint8_t *pos, unsigned char value) { - unsigned eeprom_address = (unsigned) pos; - - eeprom_init(); + const unsigned eeprom_address = (unsigned)pos; Wire.beginTransmission(eeprom_device_address); - Wire.write((int)(eeprom_address >> 8)); // MSB - Wire.write((int)(eeprom_address & 0xFF)); // LSB + Wire.write(int(eeprom_address >> 8)); // MSB + Wire.write(int(eeprom_address & 0xFF)); // LSB Wire.write(value); Wire.endTransmission(); // wait for write cycle to complete // this could be done more efficiently with "acknowledge polling" - delay(5); + delay(EEPROM_WRITE_DELAY); } // WARNING: address is a page address, 6-bit end will wrap around // also, data can be maximum of about 30 bytes, because the Wire library has a buffer of 32 bytes -void eeprom_update_block(const void *pos, void* eeprom_address, size_t n) { +void eeprom_update_block(const void *pos, void *__dst, size_t n) { + const unsigned eeprom_address = (unsigned)__dst; + eeprom_init(); Wire.beginTransmission(eeprom_device_address); - Wire.write((int)((unsigned)eeprom_address >> 8)); // MSB - Wire.write((int)((unsigned)eeprom_address & 0xFF)); // LSB + Wire.write(int(eeprom_address >> 8)); // MSB + Wire.write(int(eeprom_address & 0xFF)); // LSB Wire.endTransmission(); uint8_t *ptr = (uint8_t*)pos; @@ -83,37 +89,37 @@ void eeprom_update_block(const void *pos, void* eeprom_address, size_t n) { if (flag) { Wire.beginTransmission(eeprom_device_address); - Wire.write((int)((unsigned)eeprom_address >> 8)); // MSB - Wire.write((int)((unsigned)eeprom_address & 0xFF)); // LSB + Wire.write(int(eeprom_address >> 8)); // MSB + Wire.write(int(eeprom_address & 0xFF)); // LSB Wire.write((uint8_t*)pos, n); Wire.endTransmission(); // wait for write cycle to complete // this could be done more efficiently with "acknowledge polling" - delay(5); + delay(EEPROM_WRITE_DELAY); } } uint8_t eeprom_read_byte(uint8_t *pos) { - unsigned eeprom_address = (unsigned)pos; - - eeprom_init(); + const unsigned eeprom_address = (unsigned)pos; Wire.beginTransmission(eeprom_device_address); - Wire.write((int)(eeprom_address >> 8)); // MSB - Wire.write((int)(eeprom_address & 0xFF)); // LSB + Wire.write(int(eeprom_address >> 8)); // MSB + Wire.write(int(eeprom_address & 0xFF)); // LSB Wire.endTransmission(); Wire.requestFrom(eeprom_device_address, (byte)1); return Wire.available() ? Wire.read() : 0xFF; } // Don't read more than 30..32 bytes at a time! -void eeprom_read_block(void* pos, const void* eeprom_address, size_t n) { +void eeprom_read_block(void* pos, const void *__dst, size_t n) { + const unsigned eeprom_address = (unsigned)__dst; + eeprom_init(); Wire.beginTransmission(eeprom_device_address); - Wire.write((int)((unsigned)eeprom_address >> 8)); // MSB - Wire.write((int)((unsigned)eeprom_address & 0xFF)); // LSB + Wire.write(int(eeprom_address >> 8)); // MSB + Wire.write(int(eeprom_address & 0xFF)); // LSB Wire.endTransmission(); Wire.requestFrom(eeprom_device_address, (byte)n); for (byte c = 0; c < n; c++ ) diff --git a/Marlin/src/HAL/shared/eeprom_spi.cpp b/Marlin/src/HAL/shared/eeprom_spi.cpp index ce7479aed..73602feaa 100644 --- a/Marlin/src/HAL/shared/eeprom_spi.cpp +++ b/Marlin/src/HAL/shared/eeprom_spi.cpp @@ -35,6 +35,10 @@ #define CMD_READ 2 // WRITE #define CMD_WRITE 2 // WRITE +#ifndef EEPROM_WRITE_DELAY + #define EEPROM_WRITE_DELAY 7 +#endif + uint8_t eeprom_read_byte(uint8_t* pos) { uint8_t v; uint8_t eeprom_temp[3]; @@ -90,7 +94,7 @@ void eeprom_write_byte(uint8_t* pos, uint8_t value) { spiSend(SPI_CHAN_EEPROM1, value); WRITE(SPI_EEPROM1_CS, HIGH); - delay(7); // wait for page write to complete + delay(EEPROM_WRITE_DELAY); // wait for page write to complete } void eeprom_update_block(const void* src, void* eeprom_address, size_t n) { @@ -112,7 +116,7 @@ void eeprom_update_block(const void* src, void* eeprom_address, size_t n) { spiSend(SPI_CHAN_EEPROM1, (const uint8_t*)src, n); WRITE(SPI_EEPROM1_CS, HIGH); - delay(7); // wait for page write to complete + delay(EEPROM_WRITE_DELAY); // wait for page write to complete } #endif // SPI_EEPROM diff --git a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h index bba63febd..4561ff016 100644 --- a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h +++ b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h @@ -31,14 +31,6 @@ #define BOARD_INFO_NAME "AZSMZ MINI" -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // Servos // diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h index fa3a2cc84..75dcbe06c 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h @@ -38,14 +38,6 @@ #define BOARD_INFO_NAME "BIQU Thunder B300 V1.0" #endif -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // Limit Switches // diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h index eb384f456..98ce88788 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h @@ -36,14 +36,6 @@ #define BOARD_INFO_NAME "BIQU BQ111-A4" -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // Limit Switches // diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h index 4a029db60..391f475fe 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h @@ -23,14 +23,6 @@ #define BOARD_INFO_NAME "BIGTREE SKR 1.1" -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // Limit Switches // diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index a9d333721..48b971136 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -23,14 +23,6 @@ #define BOARD_INFO_NAME "BIGTREE SKR 1.3" -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // Trinamic Stallguard pins // diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index 5004d166c..85e477a5c 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -25,14 +25,6 @@ #define BOARD_INFO_NAME "BIGTREE SKR 1.4" #endif -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // SD Connection // diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index 63e160d8a..2ca8f86f1 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -32,10 +32,6 @@ // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 -#if DISABLED(SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION -#endif - // // Steppers // diff --git a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h index b272575e1..8ff565fa8 100644 --- a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h +++ b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h @@ -30,14 +30,6 @@ // Ignore temp readings during develpment. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // Enable 12MHz clock output on P1.27 pin to sync TMC2208 chip clocks // diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index 0cd10ebc0..054f15511 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -38,14 +38,6 @@ #define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SBASE" #endif -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - #define LED_PIN P1_18 // Used as a status indicator #define LED2_PIN P1_19 #define LED3_PIN P1_20 diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index f8fd0afcd..5a8e1ad63 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -32,14 +32,6 @@ #define BOARD_INFO_NAME "MKS SGen-L" #define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SGEN_L" -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // Servos // diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index f4acfb7ba..9a7441936 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -42,14 +42,6 @@ #define BOARD_INFO_NAME "Re-ARM RAMPS 1.4" -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // Servos // diff --git a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h index 5e2b10ef6..df7665f0e 100644 --- a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h +++ b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h @@ -32,14 +32,6 @@ #define BOARD_INFO_NAME "Selena Compact" #define BOARD_WEBSITE_URL "github.com/Ales2-k/Selena" -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // Servos // diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h index 5df52908f..4296f6927 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h @@ -32,14 +32,6 @@ #define BOARD_INFO_NAME "Azteeg X5 GT" #define BOARD_WEBSITE_URL "tinyurl.com/yx8tdqa3" -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // Servos // diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h index ba1351e6f..306688bef 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h @@ -187,14 +187,6 @@ #endif // HAS_SPI_LCD -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // SD Support // diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h index e16a1b90b..4b731ae9d 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h @@ -31,14 +31,6 @@ #define BOARD_INFO_NAME "Azteeg X5 MINI WIFI" -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // DIGIPOT slave addresses // diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h index 974537ee1..937ba56bb 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h @@ -24,14 +24,6 @@ #define BOARD_INFO_NAME "BIGTREE SKR 1.4 TURBO" #define SKR_HAS_LPC1769 -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // Include SKR 1.4 pins // diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h index adb3bc04f..9efddf210 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h @@ -31,14 +31,6 @@ #define BOARD_INFO_NAME "Cohesion3D Mini" -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // Servos // diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h index c9b13b234..a32e55db9 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h @@ -31,14 +31,6 @@ #define BOARD_INFO_NAME "Cohesion3D ReMix" -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // Servos // diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h index 713eca294..e683c4e42 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h @@ -32,14 +32,6 @@ #define BOARD_INFO_NAME "MKS SGen" #define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SGEN" -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - #define MKS_HAS_LPC1769 #include "../lpc1768/pins_MKS_SBASE.h" diff --git a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h index 0a3be9aff..6b147740a 100644 --- a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h @@ -32,14 +32,6 @@ #define BOARD_INFO_NAME "Smoothieboard" #define BOARD_WEBSITE_URL "smoothieware.org/smoothieboard" -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // Servos // diff --git a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h index 0836e1ff5..bb03335c5 100644 --- a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h @@ -32,14 +32,6 @@ #define BOARD_INFO_NAME "TH3D EZBoard" #define BOARD_WEBSITE_URL "th3dstudio.com" -// -// EEPROM -// -#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - //#define SDCARD_EEPROM_EMULATION -#endif - // // Servos //