nRF5 SDK v14.0.0
Functions | Variables
DFU settings

Functions

ret_code_t nrf_dfu_settings_write (dfu_flash_callback_t callback)
 Function for writing DFU settings to flash. More...
 
void nrf_dfu_settings_init (bool sd_irq_initialized)
 Function for initializing the DFU settings module.
 
ret_code_t nrf_dfu_settings_peer_data_write (nrf_dfu_peer_data_t *p_data)
 Function for storing peer data received through an SVCI call in DFU settings. More...
 
ret_code_t nrf_dfu_settings_peer_data_copy (nrf_dfu_peer_data_t *p_data)
 Function for copying peer data from DFU settings to RAM. More...
 
bool nrf_dfu_settings_peer_data_is_valid (void)
 Function for validating peer data in DFU settings. More...
 
ret_code_t nrf_dfu_settings_adv_name_write (nrf_dfu_adv_name_t *p_adv_name)
 Function for storing an advertisement name received through an SVCI call in DFU settings. More...
 
ret_code_t nrf_dfu_settings_adv_name_copy (nrf_dfu_adv_name_t *p_adv_name)
 Function for copying the advertisement name from DFU settings to RAM. More...
 
bool nrf_dfu_settings_adv_name_is_valid (void)
 Function for validating advertisement data in DFU settings. More...
 
ret_code_t nrf_dfu_settings_additional_erase (void)
 Function for erasing additional data in DFU settings. More...
 

Variables

nrf_dfu_settings_t s_dfu_settings
 Global settings. More...
 

Detailed Description

Function Documentation

ret_code_t nrf_dfu_settings_additional_erase ( void  )

Function for erasing additional data in DFU settings.

Note
Erasing additional data in DFU settings is only possible if nrf_dfu_flash is initialized to not use SoftDevice calls.
Return values
NRF_SUCCESSAdditional data was successfully erased.
Anyother error code reported by nrf_dfu_flash
ret_code_t nrf_dfu_settings_adv_name_copy ( nrf_dfu_adv_name_t p_adv_name)

Function for copying the advertisement name from DFU settings to RAM.

Parameters
[in,out]p_adv_nameStructure to copy the new advertisement name to.
Return values
NRF_SUCCESSAdvertisement name was successfully copied.
NRF_ERROR_NULLp_adv_name was NULL.
bool nrf_dfu_settings_adv_name_is_valid ( void  )

Function for validating advertisement data in DFU settings.

Return values
Trueif advertisement name is validated by CRC, false if not.
ret_code_t nrf_dfu_settings_adv_name_write ( nrf_dfu_adv_name_t p_adv_name)

Function for storing an advertisement name received through an SVCI call in DFU settings.

Note
The content of the type is verifyable by a CRC-value stored inside the struct.
The storage operation is an asynchronous progress. Success will be notified through system events raised by the SoftDevice.
Parameters
[in]p_adv_nameStructure holding information about the new advertisement name.
Return values
NRF_SUCCESSAsynchronous operation was successfully started.
NRF_ERROR_NULLp_adv_name was NULL.
Anyother error code reported by SoftDevice API calls.
ret_code_t nrf_dfu_settings_peer_data_copy ( nrf_dfu_peer_data_t p_data)

Function for copying peer data from DFU settings to RAM.

Parameters
[in,out]p_dataStructure to copy peer data to.
Return values
NRF_SUCCESSPeer data was successfully copied.
NRF_ERROR_NULLp_data was NULL.
bool nrf_dfu_settings_peer_data_is_valid ( void  )

Function for validating peer data in DFU settings.

Return values
Trueif peer data is validated by CRC, false if not.
ret_code_t nrf_dfu_settings_peer_data_write ( nrf_dfu_peer_data_t p_data)

Function for storing peer data received through an SVCI call in DFU settings.

Note
The content of the type can be verified by a CRC value stored inside the struct If the CRC value is 0xFFFFFFFF, it means that no data is set.
The storage operation is an asynchronous progress. Success will be notified through system events raised by the SoftDevice.
Parameters
[in]p_dataPeer data to be stored in flash.
Return values
NRF_SUCCESSAsynchronous operation was successfully started.
NRF_ERROR_NULLp_data was NULL.
Anyother error code reported by SoftDevice API calls.
ret_code_t nrf_dfu_settings_write ( dfu_flash_callback_t  callback)

Function for writing DFU settings to flash.

Parameters
[in]callbackPointer to a function that is called after completing the write operation.
Return values
NRF_SUCCESSIf the write process was successfully initiated.
NRF_ERROR_INTERNALIf a flash error occurred.

Variable Documentation

nrf_dfu_settings_t s_dfu_settings

Global settings.

Note
Using this variable is not thread-safe.

Documentation feedback | Developer Zone | Subscribe | Updated