More explicit EEPROM types (#17127)
This commit is contained in:
@@ -20,3 +20,11 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
#undef USE_REAL_EEPROM
|
||||
#define USE_EMULATED_EEPROM 1
|
||||
#if DISABLED(FLASH_EEPROM_EMULATION)
|
||||
#define SDCARD_EEPROM_EMULATION 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -38,13 +38,11 @@
|
||||
*/
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||
|
||||
#include "persistent_store_api.h"
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||
|
||||
extern "C" {
|
||||
#include <lpc17xx_iap.h>
|
||||
}
|
||||
@@ -128,5 +126,4 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
|
||||
size_t PersistentStore::capacity() { return EEPROM_SIZE; }
|
||||
|
||||
#endif // FLASH_EEPROM_EMULATION
|
||||
#endif // EEPROM_SETTINGS
|
||||
#endif // TARGET_LPC1768
|
||||
|
||||
@@ -22,14 +22,11 @@
|
||||
*/
|
||||
#ifdef TARGET_LPC1768
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "persistent_store_api.h"
|
||||
|
||||
#if DISABLED(FLASH_EEPROM_EMULATION)
|
||||
#if ENABLED(SDCARD_EEPROM_EMULATION)
|
||||
|
||||
#include "persistent_store_api.h"
|
||||
|
||||
#include <chanfs/diskio.h>
|
||||
#include <chanfs/ff.h>
|
||||
@@ -178,6 +175,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, const size_t size, uin
|
||||
|
||||
size_t PersistentStore::capacity() { return 4096; } // 4KiB of Emulated EEPROM
|
||||
|
||||
#endif // !FLASH_EEPROM_EMULATION
|
||||
#endif // EEPROM_SETTINGS
|
||||
#endif // SDCARD_EEPROM_EMULATION
|
||||
#endif // TARGET_LPC1768
|
||||
|
||||
Reference in New Issue
Block a user