Appiko
Functions
The support code to store sensepi_configs in flash

Functions to store and manage sensepi_configs in non volatile memory. This will enable the firmware to reload the previously written config in case of power reset or system reset. More...

Functions

bool sensepi_store_config_is_memory_empty (void)
 
void sensepi_store_config_write (sensepi_config_t *latest_config)
 Function to write the sensepi_config_t at address location received from get_next_location(). More...
 
sensepi_config_t * sensepi_store_config_get_last_config (void)
 
void sensepi_store_config_check_fw_ver ()
 Function to check the major number of firmware if latest major number \ firmware version is greater than respective previous number then it'll \ initiate reset for stored configs. More...
 

Detailed Description

Function Documentation

◆ sensepi_store_config_check_fw_ver()

void sensepi_store_config_check_fw_ver ( )

Definition at line 131 of file sensepi_store_config.c.

◆ sensepi_store_config_get_last_config()

sensepi_config_t* sensepi_store_config_get_last_config ( void  )

@breif Function to get the last sensepi_config_t stored in flash.

@Warning This function cannot differentiate between single stored config and \ empty flash page. So make sure that there is at least one configuration \ stored in memory. Use sensepi_store_config_is_memory_empty() function for that

Returns
pointer to last sensepi_config_t stored in flash.

Definition at line 114 of file sensepi_store_config.c.

Referenced by sensepi_cam_trigger_start().

◆ sensepi_store_config_is_memory_empty()

bool sensepi_store_config_is_memory_empty ( void  )

@breif Function to check if memory where config is to be written is empty.

Returns
Memory status.
Return values
0Memory is not empty
1Memory is empty

Definition at line 88 of file sensepi_store_config.c.

Referenced by load_last_config().

◆ sensepi_store_config_write()

void sensepi_store_config_write ( sensepi_config_t *  latest_config)
Note
all the previously stored configurations will be erased if return value of sensepi_store_config_get_next_location() is 0xFFFFFFFF
Parameters
latest_configpointer to sensepi_config_t which is to be stored in memory.

Definition at line 101 of file sensepi_store_config.c.

Referenced by load_last_config(), and sensepi_cam_trigger_start().