![]() |
Open FFBoard
Open source force feedback firmware
|
Go to the source code of this file.
Functions | |
| static void | Flash_InvalidateDataCache () |
| bool | Flash_Format () |
| __weak bool | Flash_Init () |
| bool | Flash_Write (uint16_t adr, uint16_t dat) |
| bool | Flash_Read (uint16_t adr, uint16_t *buf, bool checkempty) |
| bool | Flash_ReadWriteDefault (uint16_t adr, uint16_t *buf, uint16_t def) |
| bool | I2C_EEPROM_Write16 (uint16_t devAdr, uint16_t adr, uint16_t dat) |
| bool | I2C_EEPROM_Read16 (uint16_t devAdr, uint16_t adr, uint16_t *buf, bool checkempty) |
| __weak bool | Flash_Read (uint16_t adr, uint16_t *buf) |
| void | Flash_Dump (std::vector< std::tuple< uint16_t, uint16_t > > *result, bool includeAll) |
| __weak bool | OTP_Write (uint16_t adroffset, uint64_t dat) |
| __weak bool | OTP_Read (uint16_t adroffset, uint64_t *dat) |
| void | Flash_Write_Defaults () |
Variables | |
| cpp_freertos::MutexStandard | flashMutex |
| uint8_t | i2cBufferEeprom [sizeof(uint16_t)] = {0} |
| I2CDevice | i2cdeveeprom |
| I2CPort | i2cport_int |
| const std::array< const std::pair< uint16_t, uint16_t >, 0 > | empty_flash_defaults |
| const std::span< const std::pair< uint16_t, uint16_t > > | flash_factory_defaults = empty_flash_defaults |
| void Flash_Dump | ( | std::vector< std::tuple< uint16_t, uint16_t > > * | result, |
| bool | includeAll ) |
Definition at line 268 of file flash_helpers.cpp.
| bool Flash_Format | ( | ) |
Erases the whole EEPROM to its default value
Definition at line 36 of file flash_helpers.cpp.
| __weak bool Flash_Init | ( | ) |
Called after startup
Definition at line 46 of file flash_helpers.cpp.
|
static |
Formats the eeprom emulation section to delete all data Invalidate the ART data cache after flash operations. The STM32F4 ART accelerator caches flash reads on the D-bus. After erasing or programming flash, stale cached values would be returned unless the cache is explicitly reset. (See ST AN3969)
Definition at line 30 of file flash_helpers.cpp.
| __weak bool Flash_Read | ( | uint16_t | adr, |
| uint16_t * | buf ) |
Definition at line 254 of file flash_helpers.cpp.
| bool Flash_Read | ( | uint16_t | adr, |
| uint16_t * | buf, | ||
| bool | checkempty ) |
Reads a value and if checkempty is true returns false if the read value is the erased value (0xffff) or not found
Definition at line 95 of file flash_helpers.cpp.
| bool Flash_ReadWriteDefault | ( | uint16_t | adr, |
| uint16_t * | buf, | ||
| uint16_t | def ) |
Definition at line 105 of file flash_helpers.cpp.
| bool Flash_Write | ( | uint16_t | adr, |
| uint16_t | dat ) |
Definition at line 65 of file flash_helpers.cpp.
| void Flash_Write_Defaults | ( | ) |
Writes factory default values to flash. Does nothing if no defaults are defined
Definition at line 380 of file flash_helpers.cpp.
| bool I2C_EEPROM_Read16 | ( | uint16_t | devAdr, |
| uint16_t | adr, | ||
| uint16_t * | buf, | ||
| bool | checkempty ) |
Helper function to read 16b data from i2c eeproms with different block sizes
Definition at line 173 of file flash_helpers.cpp.
| bool I2C_EEPROM_Write16 | ( | uint16_t | devAdr, |
| uint16_t | adr, | ||
| uint16_t | dat ) |
Helper function to write 16b data to i2c eeproms with different block sizes
Definition at line 137 of file flash_helpers.cpp.
| __weak bool OTP_Read | ( | uint16_t | adroffset, |
| uint64_t * | dat ) |
Definition at line 318 of file flash_helpers.cpp.
| __weak bool OTP_Write | ( | uint16_t | adroffset, |
| uint64_t | dat ) |
Definition at line 298 of file flash_helpers.cpp.
| const std::array<const std::pair<uint16_t,uint16_t>,0> empty_flash_defaults |
To define factory defaults create a span/array in a core folder defined for example as const auto flash_defaults = std::to_array<const std::pair<uint16_t,uint16_t>>({ {ADR_CURRENT_CONFIG,1} }); // ADR,VALUE pairs const std::span<const std::pair<uint16_t,uint16_t>> flash_factory_defaults = flash_defaults;
Definition at line 373 of file flash_helpers.cpp.
| const std::span<const std::pair<uint16_t,uint16_t> > flash_factory_defaults = empty_flash_defaults |
Definition at line 374 of file flash_helpers.cpp.
| cpp_freertos::MutexStandard flashMutex |
Definition at line 13 of file flash_helpers.cpp.
| uint8_t i2cBufferEeprom[sizeof(uint16_t)] = {0} |
Definition at line 126 of file flash_helpers.cpp.
| I2CDevice i2cdeveeprom |
Definition at line 131 of file flash_helpers.cpp.
|
extern |