Flash Manager type definitions. More...
Data Structures | |
struct | fm_header_t |
Header prepending every flash entry in a flash manager. More... | |
struct | fm_handle_filter_t |
Handle filter, used to search through all handles to find matches. More... | |
struct | fm_entry_t |
Single flash manager entry. More... | |
struct | flash_manager_metadata_t |
Metadata structure denoting properties of a flash manager page. More... | |
union | flash_manager_page_t |
Single flash manager page. More... | |
struct | flash_manager_config_t |
Flash manager configuration structure, defines the user-configurable parts of the flash manager. More... | |
struct | flash_manager_internal_state_t |
Internal flash manager state, managed and used internally. More... | |
struct | flash_manager_t |
struct | fm_mem_listener_t |
Memory listener. More... | |
Typedefs | |
typedef uint16_t | fm_handle_t |
Flash manager handle type, used to identify entries in a flash manager area. More... | |
typedef void(* | flash_manager_write_complete_cb_t) (const flash_manager_t *p_manager, const fm_entry_t *p_entry, fm_result_t result) |
Write complete callback, to give the user the result of an entry write action. More... | |
typedef void(* | flash_manager_invalidate_complete_cb_t) (const flash_manager_t *p_manager, fm_handle_t handle, fm_result_t result) |
Invalidate complete callback, to give the user the result of an entry invalidation action. More... | |
typedef void(* | flash_manager_remove_complete_cb_t) (const flash_manager_t *p_manager) |
Remove complete callback, indicating that the requested remove operation has been completed. More... | |
typedef void(* | flash_manager_queue_empty_cb_t) (void) |
Action queue empty callback, indicating that the flash manager is finished processing all its ongoing actions. | |
typedef void(* | flash_manager_mem_listener_cb_t) (void *p_args) |
Memory listener callback, that will be called once the flash manager has some memory available. More... | |
typedef fm_iterate_action_t(* | flash_manager_read_cb_t) (const fm_entry_t *p_entry, void *p_args) |
Entry read callback type. More... | |
Enumerations | |
enum | fm_state_t { FM_STATE_UNINITIALIZED, FM_STATE_BUILDING, FM_STATE_READY, FM_STATE_DEFRAG, FM_STATE_REMOVING } |
Valid state of a flash manager instance. More... | |
enum | fm_result_t { FM_RESULT_SUCCESS, FM_RESULT_ERROR_AREA_FULL, FM_RESULT_ERROR_NOT_FOUND, FM_RESULT_ERROR_FLASH_MALFUNCTION } |
Flash action result, returned in complete-callback. More... | |
enum | fm_iterate_action_t { FM_ITERATE_ACTION_STOP, FM_ITERATE_ACTION_CONTINUE } |
Action returned from the read callback, determining whether to continue the iteration. More... | |
Flash Manager type definitions.
typedef uint16_t fm_handle_t |
Flash manager handle type, used to identify entries in a flash manager area.
Definition at line 90 of file flash_manager.h.
typedef void(* flash_manager_write_complete_cb_t) (const flash_manager_t *p_manager, const fm_entry_t *p_entry, fm_result_t result) |
Write complete callback, to give the user the result of an entry write action.
Is called when the action is fully completed, but before any memory associated with it is freed.
p_entry
is an in-RAM representation of the requested write, that will be freed after the call completes.[in] | p_manager | Manager that executed the action. |
[in] | p_entry | Pointer to the resulting entry in flash if the action was successful, or pointer to the in-RAM representation if the action failed. |
[in] | result | Result of the action. |
Definition at line 169 of file flash_manager.h.
typedef void(* flash_manager_invalidate_complete_cb_t) (const flash_manager_t *p_manager, fm_handle_t handle, fm_result_t result) |
Invalidate complete callback, to give the user the result of an entry invalidation action.
Is called when the action is fully completed, but before any memory associated with it is freed.
[in] | p_manager | Manager that executed the action. |
[in] | handle | Handle that was invalidated. |
[in] | result | Result of the action. |
Definition at line 181 of file flash_manager.h.
typedef void(* flash_manager_remove_complete_cb_t) (const flash_manager_t *p_manager) |
Remove complete callback, indicating that the requested remove operation has been completed.
Any flash memory associated with the given manager has been erased, and the manager and its flash area can safely be reused.
[in] | p_manager | Flash manager that was removed. |
Definition at line 193 of file flash_manager.h.
typedef void(* flash_manager_mem_listener_cb_t) (void *p_args) |
Memory listener callback, that will be called once the flash manager has some memory available.
[in] | p_args | Arguments pointer, as set by the listener. |
Definition at line 234 of file flash_manager.h.
typedef fm_iterate_action_t(* flash_manager_read_cb_t) (const fm_entry_t *p_entry, void *p_args) |
Entry read callback type.
[in] | p_entry | A pointer to the flash entry that is read. |
[in,out] | p_args | The p_args pointer that was passed to the flash_manager_entries_read function. |
FM_ITERATE_ACTION_STOP | Tell the caller to stop iterating through the entries. |
FM_ITERATE_ACTION_CONTINUE | Tell the caller to continue iterating through the entries. |
Definition at line 263 of file flash_manager.h.
enum fm_state_t |
Valid state of a flash manager instance.
Definition at line 117 of file flash_manager.h.
enum fm_result_t |
Flash action result, returned in complete-callback.
Definition at line 149 of file flash_manager.h.
enum fm_iterate_action_t |
Action returned from the read callback, determining whether to continue the iteration.
Enumerator | |
---|---|
FM_ITERATE_ACTION_STOP | Stop iterating through the entries. |
FM_ITERATE_ACTION_CONTINUE | Continue iterating through the entries. |
Definition at line 245 of file flash_manager.h.