Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_config

Library for saving and loading configuration to EEPROM. More...

Functions

void bc_config_init (uint64_t signature, void *config, size_t size, void *init_config)
 Initialize and load the config from EEPROM. More...
 
void bc_config_reset (void)
 Reset EEPROM configuration to zeros or init_config.
 
bool bc_config_load (void)
 Load EEPROM configuration. More...
 
bool bc_config_save (void)
 Save configuration to EEPROM. More...
 

Detailed Description

Library for saving and loading configuration to EEPROM.

Function Documentation

void bc_config_init ( uint64_t  signature,
void *  config,
size_t  size,
void *  init_config 
)

Initialize and load the config from EEPROM.

Parameters
[in]signatureAny number specifying current configuration version.
[in]configPointer to configuration structure
[in]sizeSize of the configuration structure
[in]init_configPointer to default configoration or null

Definition at line 39 of file bc_config.c.

Here is the call graph for this function:

bool bc_config_load ( void  )

Load EEPROM configuration.

Returns
true When configuration is valid
false When configuration is invalid

Definition at line 66 of file bc_config.c.

Referenced by bc_config_init().

Here is the call graph for this function:

Here is the caller graph for this function:

bool bc_config_save ( void  )

Save configuration to EEPROM.

Returns
true When configuration was saved
false When there is a write error

Definition at line 95 of file bc_config.c.

Referenced by bc_config_init().

Here is the call graph for this function:

Here is the caller graph for this function: