1 #ifndef RUUVI_INTERFACE_FLASH_H
2 #define RUUVI_INTERFACE_FLASH_H
31 # define RUUVI_NRF5_SDK15_FLASH_ENABLED RUUVI_NRF5_SDK15_ENABLED
34 #ifdef APP_FLASH_PAGES
35 # define RI_FLASH_PAGES APP_FLASH_PAGES
37 # define RI_FLASH_PAGES (10U)
90 const uint32_t record_id);
111 const uint32_t record_id,
const size_t data_size,
const void *
const data);
129 const size_t data_size,
void *
const data);
uint32_t rd_status_t
bitfield for representing errors
rd_status_t ri_flash_gc_run(void)
Run garbage collection.
bool ri_flash_is_busy()
Check if flash is busy.
rd_status_t ri_flash_uninit(void)
Unintialize flash. After uninitialization only initialization can be used.
rd_status_t ri_flash_page_size_get(size_t *size)
Get size of usable page, excluding any overhead bytes If returned value is N, a record of N bytes mus...
rd_status_t ri_flash_total_size_get(size_t *size)
Get total size of usable flash, excluding any overhead bytes.
void ri_flash_purge(void)
Purge flash.
rd_status_t ri_flash_record_set(const uint32_t page_id, const uint32_t record_id, const size_t data_size, const void *const data)
Set data to record in page.
rd_status_t ri_flash_init(void)
rd_status_t ri_flash_record_delete(const uint32_t file_id, const uint32_t record_id)
Mark a record for deletion.
rd_status_t ri_flash_free_size_get(size_t *size)
Get total size of free flash.
rd_status_t ri_flash_protect(const size_t page)
rd_status_t ri_flash_record_get(const uint32_t page_id, const uint32_t record_id, const size_t data_size, void *const data)
Get data from record in page.
Header to enable and disable module compilation.
Ruuvi error codes and error check function.