1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

drivers/flashpage: add FLASHPAGE_ERASE_STATE definition

This commit is contained in:
Francisco Molina 2021-02-02 10:28:23 +01:00
parent 64779b6f98
commit 85caf7cbc7
No known key found for this signature in database
GPG Key ID: 3E94EAC3DBDEEDA8
2 changed files with 14 additions and 0 deletions

View File

@ -116,6 +116,11 @@ extern "C" {
#define FLASHPAGE_SIZE (128U)
#endif
#if defined(CPU_FAM_STM32L0) || defined(CPU_FAM_STM32L1) || \
defined(CPU_FAM_STM32L4)
#define FLASHPAGE_ERASE_STATE (0x00U)
#endif
#ifdef FLASHPAGE_SIZE
#define FLASHPAGE_NUMOF (STM32_FLASHSIZE / FLASHPAGE_SIZE)
#endif

View File

@ -85,6 +85,15 @@ extern "C" {
#define FLASHPAGE_WRITE_BLOCK_ALIGNMENT
#endif
/**
* @def FLASHPAGE_ERASE_STATE
*
* @brief State of an erased byte in memory
*/
#if defined(DOXYGEN) || !defined(FLASHPAGE_ERASE_STATE)
#define FLASHPAGE_ERASE_STATE (0xFFU)
#endif
/**
* @def PERIPH_FLASHPAGE_CUSTOM_PAGESIZES
*