Appiko
Functions
The support code to store configurations.

The support code to store configurations received from other BLE device. More...

Functions

bool sensebe_store_config_is_memory_empty (void)
 
void sensebe_store_config_write (sensebe_config_t *latest_config)
 Function to write the sensebe_config_t at address location received from get_next_location(). More...
 
sensebe_config_t * sensebe_store_config_get_last_config (void)
 
void sensebe_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

◆ sensebe_store_config_check_fw_ver()

void sensebe_store_config_check_fw_ver ( )

Definition at line 130 of file sensebe_store_config.c.

◆ sensebe_store_config_get_last_config()

sensebe_config_t* sensebe_store_config_get_last_config ( void  )

@breif Function to get the last sensebe_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 sensebe_store_config_is_memory_empty() function for that

Returns
pointer to last sensebe_config_t stored in flash.

Definition at line 113 of file sensebe_store_config.c.

Referenced by sensebe_tx_rx_start().

◆ sensebe_store_config_is_memory_empty()

bool sensebe_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 87 of file sensebe_store_config.c.

Referenced by load_last_config().

◆ sensebe_store_config_write()

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

Definition at line 100 of file sensebe_store_config.c.

Referenced by load_last_config(), and sensebe_tx_rx_start().