Flash access

nRF5 SDK v12.3.0

Types and functions to access the flash of the Eddystone beacon. More...

Data Structures

struct es_flash_beacon_config_t
Beacon configuration. More...
struct es_flash_flags_t
Structure for keeping track of which slot has a configuration that must be restored upon reboot. More...

Macros

#define WORD_SIZE 4
#define FLASH_ACCES_ERROR_CHECK_ALLOW_NOT_FOUND (err_code)
#define FLASH_OP_WAIT ()

Functions

ret_code_t es_flash_access_beacon_config ( es_flash_beacon_config_t *p_config, es_flash_access_t access_type)
Function for accessing beacon configurations. More...
ret_code_t es_flash_access_slot_configs (uint8_t slot_no, es_slot_t *p_slot, es_flash_access_t access_type)
Function for accessing slot configuration from flash. More...
ret_code_t es_flash_access_lock_key (uint8_t *p_lock_key, es_flash_access_t access_type)
Function for accessing the beacon lock key from flash. More...
ret_code_t es_flash_access_flags ( es_flash_flags_t *p_flags, es_flash_access_t access_type)
Function for accessing the flash configuration flag from flash. More...
uint32_t es_flash_num_pending_ops (void)
Function for retrieving the number of queued operations. More...
ret_code_t es_flash_factory_reset (void)
Function for performing a factory reset. More...
void es_flash_on_ble_evt ( ble_evt_t *p_evt)
ret_code_t es_flash_init (void)
Function for initializing the flash module. More...

Detailed Description

Types and functions to access the flash of the Eddystone beacon.

Macro Definition Documentation

#define FLASH_ACCES_ERROR_CHECK_ALLOW_NOT_FOUND ( err_code )
Value:
if (err_code != ( FDS_ERR_NOT_FOUND )) \
APP_ERROR_CHECK(err_code);
#define FLASH_OP_WAIT ( )
Value:
uint32_t pending_ops = es_flash_num_pending_ops (); \
while (pending_ops != 0) \
{ \
pending_ops = es_flash_num_pending_ops (); \
}

Enumeration Type Documentation

Flash access types.

Enumerator
ES_FLASH_ACCESS_READ

Read data.

ES_FLASH_ACCESS_WRITE

Write data.

ES_FLASH_ACCESS_CLEAR

Clear data.

Function Documentation

ret_code_t es_flash_access_beacon_config ( es_flash_beacon_config_t * p_config ,
es_flash_access_t access_type
)

Function for accessing beacon configurations.

Parameters
[in,out] p_config Pointer to the beacon configuration buffer.
[in] access_type Access type (see es_flash_access_t ).
Returns
For possible return values, see:
ret_code_t es_flash_access_flags ( es_flash_flags_t * p_flags ,
es_flash_access_t access_type
)

Function for accessing the flash configuration flag from flash.

Parameters
[in,out] p_flags Pointer to the flag buffer.
[in] access_type Access type (see es_flash_access_t ).
Returns
For possible return values, see:
ret_code_t es_flash_access_lock_key ( uint8_t * p_lock_key ,
es_flash_access_t access_type
)

Function for accessing the beacon lock key from flash.

Parameters
[in,out] p_lock_key Pointer to the lock key buffer.
[in] access_type Access type (see es_flash_access_t ).
Returns
For possible return values, see:
ret_code_t es_flash_access_slot_configs ( uint8_t slot_no ,
es_slot_t * p_slot ,
es_flash_access_t access_type
)

Function for accessing slot configuration from flash.

Parameters
[in] slot_no Slot index.
[in,out] p_slot Pointer to the slot configuration buffer.
[in] access_type Access type (see es_flash_access_t ).
Returns
For possible return values, see:
ret_code_t es_flash_factory_reset ( void )

Function for performing a factory reset.

Returns
FDS return code.
ret_code_t es_flash_init ( void )

Function for initializing the flash module.

Returns
See fds_init for possible return values.
uint32_t es_flash_num_pending_ops ( void )

Function for retrieving the number of queued operations.

Returns
The number of operations that are queued.