Browse Source

FLASH_EEPROM => FLASH_EEPROM_EMULATION

pull/1/head
Scott Lahteine 6 years ago
parent
commit
03e109c4a3
  1. 2
      Marlin/src/HAL/HAL_LPC1768/persistent_store_api.h
  2. 6
      Marlin/src/HAL/HAL_LPC1768/persistent_store_flash.cpp
  3. 4
      Marlin/src/HAL/HAL_LPC1768/persistent_store_sdcard.cpp

2
Marlin/src/HAL/HAL_LPC1768/persistent_store_api.h

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

6
Marlin/src/HAL/HAL_LPC1768/persistent_store_flash.cpp

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

4
Marlin/src/HAL/HAL_LPC1768/persistent_store_sdcard.cpp

@ -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…
Cancel
Save