Skip to content

Commit 84ce7a1

Browse files
committed
remove stm32L0x and stm32L1x EEPROM buffered functions
Removing the buffered access to EEPROM as it is not well-suited for stm32L0x and stm32L1x which have actual EEPROM area Signed-off-by: Francois Ramu <francois.ramu@st.com>
1 parent 633ced2 commit 84ce7a1

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

cores/arduino/stm32/stm32_eeprom.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,12 @@ extern "C" {
107107
uint8_t eeprom_read_byte(const uint32_t pos);
108108
void eeprom_write_byte(uint32_t pos, uint8_t value);
109109

110+
#if !defined(DATA_EEPROM_BASE)
110111
void eeprom_buffer_fill();
111112
void eeprom_buffer_flush();
112113
uint8_t eeprom_buffered_read_byte(const uint32_t pos);
113114
void eeprom_buffered_write_byte(uint32_t pos, uint8_t value);
115+
#endif /* ! DATA_EEPROM_BASE */
114116

115117
#ifdef __cplusplus
116118
}

libraries/SrcWrapper/src/stm32/stm32_eeprom.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ static inline uint32_t get_flash_end(void)
142142
#endif
143143
#endif /* FLASH_BASE_ADDRESS */
144144

145+
#if !defined(DATA_EEPROM_BASE)
145146
static uint8_t eeprom_buffer[E2END + 1] __attribute__((aligned(8))) = {0};
147+
#endif
146148

147149
/**
148150
* @brief Function reads a byte from emulated eeprom (flash)
@@ -191,6 +193,8 @@ void eeprom_write_byte(uint32_t pos, uint8_t value)
191193
#endif /* _EEPROM_BASE */
192194
}
193195

196+
#if !defined(DATA_EEPROM_BASE)
197+
194198
/**
195199
* @brief Function reads a byte from the eeprom buffer
196200
* @param pos : address to read
@@ -332,6 +336,8 @@ void eeprom_buffer_flush(void)
332336

333337
#endif /* defined(EEPROM_RETRAM_MODE) */
334338

339+
#endif /* ! DATA_EEPROM_BASE */
340+
335341
#ifdef __cplusplus
336342
}
337343
#endif

0 commit comments

Comments
 (0)