1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

Wrangle HAL EEPROM types

This commit is contained in:
Scott Lahteine 2020-04-21 21:26:25 -05:00
parent d666ef00e0
commit 0fec478562
10 changed files with 14 additions and 9 deletions

View File

@ -21,6 +21,6 @@
*/
#pragma once
#if USE_FALLBACK_EEPROM && NONE(SDCARD_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
#if USE_FALLBACK_EEPROM
#define FLASH_EEPROM_EMULATION
#endif

View File

@ -20,7 +20,7 @@
#include "../../inc/MarlinConfig.h"
#if ENABLED(EEPROM_SETTINGS)
#if USE_WIRED_EEPROM
#include "../shared/eeprom_api.h"
@ -58,5 +58,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
return false;
}
#endif // EEPROM_SETTINGS
#endif // USE_WIRED_EEPROM
#endif // __MK20DX256__

View File

@ -21,7 +21,6 @@
*/
#pragma once
// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation
#if ENABLED(EEPROM_SETTINGS) && NONE(USE_WIRED_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
#define SDCARD_EEPROM_EMULATION
#if USE_FALLBACK_EEPROM
#define USE_WIRED_EEPROM 1
#endif

View File

@ -25,7 +25,7 @@
#include "../../inc/MarlinConfig.h"
#if ENABLED(EEPROM_SETTINGS)
#if USE_WIRED_EEPROM
#include "../shared/eeprom_api.h"
#include <avr/eeprom.h>
@ -66,5 +66,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
size_t PersistentStore::capacity() { return E2END + 1; }
#endif // EEPROM_SETTINGS
#endif // USE_WIRED_EEPROM
#endif // __MK64FX512__ || __MK66FX1M0__

View File

@ -20,3 +20,7 @@
*
*/
#pragma once
#if USE_FALLBACK_EEPROM
#define USE_WIRED_EEPROM 1
#endif

View File

@ -39,7 +39,9 @@
#if ENABLED(EEPROM_SETTINGS)
// EEPROM type may be defined by compile flags, configs, HALs, or pins
// Set additional flags to let HALs choose in their Conditionals_post.h
#if NONE(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) && ANY(I2C_EEPROM, SPI_EEPROM, QSPI_EEPROM)
#if ANY(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION)
#define USE_EMULATED_EEPROM 1
#elif ANY(I2C_EEPROM, SPI_EEPROM, QSPI_EEPROM)
#define USE_WIRED_EEPROM 1
#else
#define USE_FALLBACK_EEPROM 1