rusEFI
The most advanced open source ECU
|
Typedefs | |
typedef uint32_t | flashdata_t |
typedef uintptr_t | flashaddr_t |
Address in the flash memory. More... | |
typedef uint8_t | flashsector_t |
Index of a sector. More... | |
Functions | |
size_t | flashSectorSize (flashsector_t sector) |
Get the size of sector . More... | |
uintptr_t | getFlashAddrFirstCopy (void) |
uintptr_t | getFlashAddrSecondCopy (void) |
int | intFlashErase (flashaddr_t address, size_t size) |
Erase the sectors containing the span of size bytes starting at address . More... | |
bool | intFlashIsErased (flashaddr_t address, size_t size) |
Check if the size bytes of flash memory starting at address are erased. More... | |
bool | intFlashCompare (flashaddr_t address, const char *buffer, size_t size) |
Check if the data in buffer are identical to the one in flash memory. More... | |
int | intFlashRead (flashaddr_t source, char *destination, size_t size) |
Copy data from the flash memory to a destination . More... | |
int | intFlashWrite (flashaddr_t address, const char *buffer, size_t size) |
Copy data from a buffer to the flash memory. More... | |
typedef uintptr_t flashaddr_t |
Address in the flash memory.
Definition at line 86 of file flash_int.h.
typedef uint8_t flashdata_t |
Definition at line 54 of file flash_int.h.
typedef uint8_t flashsector_t |
Index of a sector.
Definition at line 89 of file flash_int.h.
size_t flashSectorSize | ( | flashsector_t | sector | ) |
Get the size of sector
.
sector
size in bytes. Definition at line 225 of file mpu_util.cpp.
Referenced by flashSectorSize(), intFlashErase(), intFlashSectorBegin(), and intFlashSectorErase().
uintptr_t getFlashAddrFirstCopy | ( | void | ) |
Flex Non Volatile Memory is faster than flash It also has smaller pages so it takes less time to erase
There is no remote access to FlexNVM meaning that we cannot erase settings externally
Definition at line 236 of file mpu_util.cpp.
Referenced by getFlashAddrSecondCopy(), readConfiguration(), readFromFlash(), and writeToFlashNow().
uintptr_t getFlashAddrSecondCopy | ( | void | ) |
Definition at line 240 of file mpu_util.cpp.
Referenced by readConfiguration(), readFromFlash(), and writeToFlashNow().
bool intFlashCompare | ( | flashaddr_t | address, |
const char * | buffer, | ||
size_t | size | ||
) |
Check if the data in buffer
are identical to the one in flash memory.
address | First address in flash memory to be checked. |
buffer | Buffer containing the data to compare. |
size | Size of buffer in bytes. |
Definition at line 109 of file flash_int.cpp.
int intFlashErase | ( | flashaddr_t | address, |
size_t | size | ||
) |
Erase the sectors containing the span of size
bytes starting at address
.
address
doesn't match the beginning of a sector, the data contained between the beginning of the sector and address
will be erased too. The same applies for data contained at address
+ size
up to the end of the sector.address | Starting address of the span in flash memory. |
size | Size of the span in bytes. |
Definition at line 115 of file flash_int.cpp.
Referenced by backupRamFlush(), eraseAndFlashCopy(), and FlashErase().
bool intFlashIsErased | ( | flashaddr_t | address, |
size_t | size | ||
) |
Check if the size
bytes of flash memory starting at address
are erased.
address | First address in flash memory to be checked. |
size | Size of the memory space to be checked in bytes. |
Definition at line 89 of file flash_int.cpp.
Referenced by FlashErase(), FlashVerifyChecksum(), and intFlashSectorErase().
int intFlashRead | ( | flashaddr_t | source, |
char * | destination, | ||
size_t | size | ||
) |
Copy data from the flash memory to a destination
.
destination
must be at least size
bytes long. source | First address of the flash memory to be copied. |
destination | Buffer to copy to. |
size | Size of the data to be copied in bytes. |
Definition at line 130 of file flash_int.cpp.
Referenced by backupInit(), and readOneConfigurationCopy().
int intFlashWrite | ( | flashaddr_t | address, |
const char * | buffer, | ||
size_t | size | ||
) |
Copy data from a buffer
to the flash memory.
buffer
must be at least size
bytes long. address | First address in the flash memory where to copy the data to. |
buffer | Buffer containing the data to copy. |
size | Size of the data to be copied in bytes. |
Definition at line 365 of file flash_int.cpp.
Referenced by backupInit(), backupRamFlush(), eraseAndFlashCopy(), and FlashWrite().