Refine EEPROM types / flags (#17772)
This commit is contained in:
@ -248,19 +248,6 @@ static int freeMemory() {
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
|
||||
/**
|
||||
* TODO: Write all this EEPROM stuff. Can emulate EEPROM in flash as last resort.
|
||||
* Wire library should work for i2c EEPROMs.
|
||||
*/
|
||||
void eeprom_write_byte(uint8_t *pos, unsigned char value);
|
||||
uint8_t eeprom_read_byte(uint8_t *pos);
|
||||
void eeprom_read_block(void *__dst, const void *__src, size_t __n);
|
||||
void eeprom_update_block(const void *__src, void *__dst, size_t __n);
|
||||
|
||||
//
|
||||
// ADC
|
||||
//
|
||||
|
@ -23,8 +23,11 @@
|
||||
|
||||
#if USE_WIRED_EEPROM
|
||||
|
||||
#include "../shared/eeprom_if.h"
|
||||
#include "../shared/eeprom_api.h"
|
||||
|
||||
size_t PersistentStore::capacity() { return E2END + 1; }
|
||||
|
||||
bool PersistentStore::access_start() {
|
||||
#if ENABLED(SPI_EEPROM)
|
||||
#if SPI_CHAN_EEPROM1 == 1
|
||||
@ -70,7 +73,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t PersistentStore::capacity() { return E2END + 1; }
|
||||
|
||||
#endif // USE_WIRED_EEPROM
|
||||
#endif // __STM32F1__
|
||||
|
@ -24,4 +24,6 @@
|
||||
// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation
|
||||
#if USE_FALLBACK_EEPROM
|
||||
#define SDCARD_EEPROM_EMULATION
|
||||
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
|
||||
#define USE_SHARED_EEPROM 1
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user