Open FFBoard
Open source force feedback firmware
eeprom.c File Reference

Go to the source code of this file.

Functions

static uint16_t EE_FindValidPage (uint8_t Operation)
 Find valid Page for write or read operation. More...
 
static uint16_t EE_VerifyPageFullWriteVariable (uint16_t VirtAddress, uint16_t Data)
 Verify if active page is full and Writes variable in EEPROM. More...
 
static uint16_t EE_PageTransfer (uint16_t VirtAddress, uint16_t Data)
 Transfers last updated variables data from the full Page to an empty one. More...
 
static uint16_t EE_VerifyPageFullyErased (uint32_t Address)
 Verify if specified page is fully erased. More...
 
uint16_t EE_Init (void)
 Restore the pages to a known good state in case of page's status corruption after a power loss. More...
 
uint16_t EE_ReadVariable (uint16_t VirtAddress, uint16_t *Data)
 Returns the last stored variable data, if found, which correspond to the passed virtual address. More...
 
uint16_t EE_WriteVariable (uint16_t VirtAddress, uint16_t Data)
 Writes/upadtes variable data in EEPROM. More...
 
HAL_StatusTypeDef EE_Format (void)
 Erases PAGE and PAGE1 and writes VALID_PAGE header to PAGE. More...
 

Variables

uint16_t DataVar = 0