Skip to content

Commit 7c63110

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

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

cores/arduino/stm32/stm32_eeprom.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,14 @@ 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)
111+
#error "eeprom_buffer functions are not supported"
112+
#else
110113
void eeprom_buffer_fill();
111114
void eeprom_buffer_flush();
112115
uint8_t eeprom_buffered_read_byte(const uint32_t pos);
113116
void eeprom_buffered_write_byte(uint32_t pos, uint8_t value);
117+
#endif /* DATA_EEPROM_BASE */
114118

115119
#ifdef __cplusplus
116120
}

libraries/SrcWrapper/src/stm32/stm32_eeprom.c

Lines changed: 8 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,10 @@ void eeprom_write_byte(uint32_t pos, uint8_t value)
191193
#endif /* _EEPROM_BASE */
192194
}
193195

196+
#if defined(DATA_EEPROM_BASE)
197+
#error "eeprom_buffer functions are not supported"
198+
#else
199+
194200
/**
195201
* @brief Function reads a byte from the eeprom buffer
196202
* @param pos : address to read
@@ -332,6 +338,8 @@ void eeprom_buffer_flush(void)
332338

333339
#endif /* defined(EEPROM_RETRAM_MODE) */
334340

341+
#endif /* DATA_EEPROM_BASE */
342+
335343
#ifdef __cplusplus
336344
}
337345
#endif

0 commit comments

Comments
 (0)