ruuvi.drivers.c  ${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
ruuvi_task_flash.h
Go to the documentation of this file.
1 #ifndef RUUVI_TASK_FLASH_H
2 #define RUUVI_TASK_FLASH_H
3 
46 #include "ruuvi_driver_error.h"
47 #include "ruuvi_driver_sensor.h"
48 #include "ruuvi_interface_flash.h"
49 #include "ruuvi_interface_log.h"
50 
61 
91 rd_status_t rt_flash_store (const uint16_t file_id, const uint16_t record_id,
92  const void * const message, const size_t message_length);
93 
115 rd_status_t rt_flash_load (const uint16_t file_id, const uint16_t record_id,
116  void * const message, const size_t message_length);
117 
139 rd_status_t rt_flash_free (const uint16_t file_id, const uint16_t record_id);
140 
155 
163 bool rt_flash_busy (void);
164 
165 #ifdef CEEDLING
166 // Give Ceedling access to internal functions.
167 void print_error_cause (void);
168 #endif
169 
170 
172 #endif
uint32_t rd_status_t
bitfield for representing errors
bool rt_flash_busy(void)
Check if flash is running an operation.
rd_status_t rt_flash_gc_run(void)
Trigger garbage collection.
rd_status_t rt_flash_init(void)
Initialize flash storage.
rd_status_t rt_flash_free(const uint16_t file_id, const uint16_t record_id)
Free data from flash.
rd_status_t rt_flash_load(const uint16_t file_id, const uint16_t record_id, void *const message, const size_t message_length)
Load data from flash.
rd_status_t rt_flash_store(const uint16_t file_id, const uint16_t record_id, const void *const message, const size_t message_length)
Store data to flash.
Ruuvi error codes and error check function.
Ruuvi sensor interface Lifecycle: Beta
Interface functions to persistent flash storage.