Wirepas SDK
|
Go to the source code of this file.
Functions | |
extFlash_res_e | externalFlash_init (void) |
Initialize the external flash driver. More... | |
extFlash_res_e | externalFlash_startRead (void *to, const void *from, size_t amount) |
Read bytes from external flash. More... | |
extFlash_res_e | externalFlash_startWrite (void *to, const void *from, size_t amount) |
Write bytes to flash. More... | |
extFlash_res_e | externalFlash_startErase (size_t *sector_base, size_t *number_of_sector) |
Erase a sector of flash. More... | |
bool | externalFlash_isBusy (void) |
Checks if flash driver is busy. More... | |
extFlash_res_e | externalFlash_getInfo (flash_info_t *info) |
Fills a structure with info about flash. More... | |
Data Structures | |
struct | flash_info_t |
Flash memory info definition. More... | |
Enumerations | |
enum | extFlash_res_e { EXTFLASH_RES_OK = 0, EXTFLASH_RES_ERROR = 1, EXTFLASH_RES_BUSY = 2, EXTFLASH_RES_NODRIVER = 3, EXTFLASH_RES_PARAM = 4 } |
External flash operations result. More... | |
extFlash_res_e externalFlash_getInfo | ( | flash_info_t * | info | ) |
Fills a structure with info about flash.
info | pointer to an flash_info_t structure. |
extFlash_res_e externalFlash_init | ( | void | ) |
Initialize the external flash driver.
bool externalFlash_isBusy | ( | void | ) |
Checks if flash driver is busy.
extFlash_res_e externalFlash_startErase | ( | size_t * | sector_base, |
size_t * | number_of_sector | ||
) |
Erase a sector of flash.
sector_base | pointer to the base address of the sector to be erased. If the flash driver can’t erase all requested sector, return the base address of the next sector to be erased. |
number_of_sector | Pointer to number of sector to erase. Returns the number of remaining sector to erase. |
extFlash_res_e externalFlash_startRead | ( | void * | to, |
const void * | from, | ||
size_t | amount | ||
) |
Read bytes from external flash.
to | Pointer in RAM to store read data. |
from | Address in flash to read data from. |
amount | Number of bytes to read. |
extFlash_res_e externalFlash_startWrite | ( | void * | to, |
const void * | from, | ||
size_t | amount | ||
) |
Write bytes to flash.
to | Address in flash to write data to. |
from | Pointer in RAM to the data to be written. |
amount | Number of bytes to write. |
struct flash_info_t |
Flash memory info definition.
Definition at line 26 of file external_flash.h.
enum extFlash_res_e |
External flash operations result.
Enumerator | |
---|---|
EXTFLASH_RES_OK | |
EXTFLASH_RES_ERROR | |
EXTFLASH_RES_BUSY | |
EXTFLASH_RES_NODRIVER | |
EXTFLASH_RES_PARAM |
Definition at line 16 of file external_flash.h.