mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 12:04:19 +00:00
FLASH_EEPROM => FLASH_EEPROM_EMULATION
This commit is contained in:
parent
50917ccda6
commit
03e109c4a3
@ -21,4 +21,4 @@
|
||||
*/
|
||||
#include "../shared/persistent_store_api.h"
|
||||
|
||||
#define FLASH_EEPROM
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include "persistent_store_api.h"
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(FLASH_EEPROM)
|
||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||
|
||||
extern "C" {
|
||||
#include "lpc17xx_iap.h"
|
||||
@ -54,7 +54,7 @@ extern "C" {
|
||||
#define EEPROM_SIZE (4096)
|
||||
#define SECTOR_SIZE (32768)
|
||||
#define EEPROM_SLOTS (SECTOR_SIZE/EEPROM_SIZE)
|
||||
#define EEPROM_ERASE (0xff)
|
||||
#define EEPROM_ERASE (0xFF)
|
||||
#define SLOT_ADDRESS(sector, slot) (((uint8_t *)SECTOR_START(sector)) + slot * EEPROM_SIZE)
|
||||
|
||||
static uint8_t ram_eeprom[EEPROM_SIZE] __attribute__((aligned(4))) = {0};
|
||||
@ -126,6 +126,6 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
|
||||
|
||||
size_t PersistentStore::capacity() { return EEPROM_SIZE; }
|
||||
|
||||
#endif // FLASH_EEPROM
|
||||
#endif // FLASH_EEPROM_EMULATION
|
||||
#endif // EEPROM_SETTINGS
|
||||
#endif // TARGET_LPC1768
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "persistent_store_api.h"
|
||||
|
||||
#if DISABLED(FLASH_EEPROM)
|
||||
#if DISABLED(FLASH_EEPROM_EMULATION)
|
||||
|
||||
#include <chanfs/diskio.h>
|
||||
#include <chanfs/ff.h>
|
||||
@ -178,6 +178,6 @@ 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
|
||||
#endif // !FLASH_EEPROM_EMULATION
|
||||
#endif // EEPROM_SETTINGS
|
||||
#endif // TARGET_LPC1768
|
||||
|
Loading…
Reference in New Issue
Block a user