48 for (p = (
const uint8_t *)addr; p < ((
const uint8_t *)addr + len); p++)
66 for (
unsigned int tries = 3; tries; tries--)
void FLASH_Unlock(void)
Unlocks the FLASH control register access.
#define FLASH_FLAG_WRPRTERR
static volatile uint8_t * status
void FLASH_ClearFlag(uint32_t FLASH_FLAG)
Clears the FLASH's pending flags.
static volatile uint8_t addr
void initEEPROM(void)
Initialize Flash.
bool readEEPROM(void *dest, size_t len)
Read data from Flash.
bool writeEEPROM(const void *src, size_t len)
Write data to Flash.
static uint8_t compute_checksum(const void *addr, size_t len)
static const uint32_t FLASH_WRITE_ADDR
FLASH_Status FLASH_ErasePage(uint32_t Page_Address)
Erases a specified FLASH page.
FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data)
Programs a word at a specified address.
FLASH_Status
FLASH Status.
void FLASH_Lock(void)
Locks the FLASH control register access.