FLASH_EEPROM => FLASH_EEPROM_EMULATION

This commit is contained in:
Scott Lahteine 2019-02-20 04:35:58 -06:00
parent 50917ccda6
commit 03e109c4a3
3 changed files with 6 additions and 6 deletions

View file

@ -21,4 +21,4 @@
*/
#include "../shared/persistent_store_api.h"
#define FLASH_EEPROM
#define FLASH_EEPROM_EMULATION

View file

@ -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

View file

@ -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