![]() |
Open FFBoard
Open source force feedback firmware
|
Functions | |
| static uint16_t | EE_FindValidPage (uint8_t Operation) |
| Find valid Page for write or read operation. | |
| static uint16_t | EE_VerifyPageFullWriteVariable (uint16_t VirtAddress, uint16_t Data) |
| Verify if active page is full and Writes variable in EEPROM. | |
| static uint16_t | EE_PageTransfer (uint16_t VirtAddress, uint16_t Data) |
| Transfers last updated variables data from the full Page to an empty one. | |
| static uint16_t | EE_VerifyPageFullyErased (uint32_t Address) |
| Verify if specified page is fully erased. | |
| uint16_t | EE_Init (void) |
| Restore the pages to a known good state in case of page's status corruption after a power loss. | |
| 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. | |
| uint16_t | EE_WriteVariable (uint16_t VirtAddress, uint16_t Data) |
| Writes/upadtes variable data in EEPROM. | |
| HAL_StatusTypeDef | EE_Format (void) |
| Erases PAGE and PAGE1 and writes VALID_PAGE header to PAGE. | |
Variables | |
| uint16_t | DataVar = 0 |
|
static |
Find valid Page for write or read operation.
| Operation | operation to achieve on the valid page. This parameter can be one of the following values:
|
| Valid | page number (PAGE or PAGE1) or NO_VALID_PAGE in case of no valid page was found |
| HAL_StatusTypeDef EE_Format | ( | void | ) |
| uint16_t EE_Init | ( | void | ) |
|
static |
Transfers last updated variables data from the full Page to an empty one.
| VirtAddress | 16 bit virtual address of the variable |
| Data | 16 bit data to be written as variable value |
| Success | or error status:
|
| 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.
| VirtAddress | Variable virtual address |
| Data | Global variable contains the read variable value |
| Success | or error status:
|
|
static |
Verify if active page is full and Writes variable in EEPROM.
| VirtAddress | 16 bit virtual address of the variable |
| Data | 16 bit data to be written as variable value |
| Success | or error status:
|
|
static |
Verify if specified page is fully erased.
| Address | page address This parameter can be one of the following values:
|
| page | fully erased status:
|
| uint16_t EE_WriteVariable | ( | uint16_t | VirtAddress, |
| uint16_t | Data ) |
Writes/upadtes variable data in EEPROM.
| VirtAddress | Variable virtual address |
| Data | 16 bit data to be written |
| Success | or error status:
|