Configuration¶
Functions¶
mira_config_get_size¶
mira_size_t mira_config_get_size( void);
Get the available size of the non-volatile configuration memory
Return
the size available
mira_config_read¶
mira_status_t mira_config_read( void* dst, mira_size_t offset, mira_size_t size);
Read data from non-volatile configuration memory. This is useful to store per-unit configuration and identification parameters, such as product type or network parameters.
Parameters
Parameter | Description |
---|---|
dst |
Pointer to where the read data should be stored. |
offset |
Address within the non-volatile. configuration memory to start read. |
size |
Number of bytes to read. |
Return
Status code indicating whether the operation was successful.
Value | Description |
---|---|
MIRA_SUCCESS |
The operation was successful. |
MIRA_ERROR_INVALID_VALUE |
offset+size is out of memory region. |
mira_config_write¶
mira_status_t mira_config_write( void* src, mira_size_t offset, mira_size_t size);
Return
mira_status_t
Parameters
Parameter | Description |
---|---|
src |
Pointer to the data to be written. |
offset |
Address within the non-volatile configuration memory to start read. |
size |
Number of bytes to write. |
Return
Status code indicating whether the operation was successful.
Value | Description |
---|---|
MIRA_SUCCESS |
The operation was successful. |
MIRA_ERROR_INVALID_VALUE |
offset+size is out of memory region. |
mira_config_erase¶
mira_status_t mira_config_erase( );
Return
mira_status_t