nRF5 SDK v17.1.0
Modules | Functions | Variables
DFU settings

Modules

 DFU Settings configuration
 

Functions

ret_code_t nrf_dfu_settings_write (nrf_dfu_flash_callback_t callback)
 Function for writing DFU settings to flash. More...
 
void nrf_dfu_settings_backup (nrf_dfu_flash_callback_t callback)
 Function for backing up the settings. More...
 
ret_code_t nrf_dfu_settings_write_and_backup (nrf_dfu_flash_callback_t callback)
 Function for writing DFU settings to flash and to backup. More...
 
void nrf_dfu_settings_reinit (void)
 Function for initializing the DFU settings structure. More...
 
ret_code_t nrf_dfu_settings_init (bool sd_irq_initialized)
 Function for initializing the DFU settings module. More...
 
ret_code_t nrf_dfu_settings_additional_erase (void)
 Function for erasing additional data in DFU settings. More...
 
void nrf_dfu_settings_progress_reset (void)
 Function for resetting both init command and DFU transfer progress inside settings structure. 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
void nrf_dfu_settings_backup ( nrf_dfu_flash_callback_t  callback)

Function for backing up the settings.

This function copies the contents of the settings page (in flash) to a separate page (in flash). During nrf_dfu_settings_init, the backup is restored if the original is invalid.

Parameters
[in]callbackPointer to a function that is called after completing the write operation.
ret_code_t nrf_dfu_settings_init ( bool  sd_irq_initialized)

Function for initializing the DFU settings module.

Return values
NRF_SUCCESSIf the initialization was successful.
NRF_ERROR_INTERNALIf a flash error occurred.
void nrf_dfu_settings_progress_reset ( void  )

Function for resetting both init command and DFU transfer progress inside settings structure.

Note
This function does not perform flash operation. In order to save the reset state, please use nrf_dfu_settings_write function.
void nrf_dfu_settings_reinit ( void  )

Function for initializing the DFU settings structure.

Initializes the RAM structure from the flash contents. This function is called as part of nrf_dfu_settings_init.

Return values
NRF_SUCCESSIf the initialization was successful.
NRF_ERROR_INTERNALIf a flash error occurred.
ret_code_t nrf_dfu_settings_write ( nrf_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.
ret_code_t nrf_dfu_settings_write_and_backup ( nrf_dfu_flash_callback_t  callback)

Function for writing DFU settings to flash and to backup.

This function first calls nrf_dfu_settings_write and then nrf_dfu_settings_backup.

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

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