Add sysparam_get_info function
This commit is contained in:
parent
20909a4da1
commit
66589f5d3f
2 changed files with 28 additions and 0 deletions
|
|
@ -3,6 +3,10 @@
|
|||
|
||||
#include <esp/types.h>
|
||||
|
||||
#ifndef DEFAULT_SYSPARAM_SECTORS
|
||||
#define DEFAULT_SYSPARAM_SECTORS 4
|
||||
#endif
|
||||
|
||||
/** @file sysparam.h
|
||||
*
|
||||
* Read/write "system parameters" to persistent flash.
|
||||
|
|
@ -112,6 +116,22 @@ sysparam_status_t sysparam_init(uint32_t base_addr, uint32_t top_addr);
|
|||
*/
|
||||
sysparam_status_t sysparam_create_area(uint32_t base_addr, uint16_t num_sectors, bool force);
|
||||
|
||||
/** Get the start address and size of the currently active sysparam area
|
||||
*
|
||||
* Fills in `base_addr` and `num_sectors` with the location and size of the
|
||||
* currently active sysparam area. The returned values correspond to the
|
||||
* arguments passed to the sysparam_create_area() call when the area was
|
||||
* originally created.
|
||||
*
|
||||
* @param[out] base_addr The flash address at which the sysparam area starts
|
||||
* @param[out] num_sectors The number of flash sectors used by the sysparam
|
||||
* area
|
||||
*
|
||||
* @retval ::SYSPARAM_OK Completed successfully
|
||||
* @retval ::SYSPARAM_ERR_NOINIT No current sysparam area is active
|
||||
*/
|
||||
sysparam_status_t sysparam_get_info(uint32_t *base_addr, uint32_t *num_sectors);
|
||||
|
||||
/** Get the value associated with a key
|
||||
*
|
||||
* This is the core "get value" function. It will retrieve the value for the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue