Device Firmware Update Bank handling module interface. More...
Data Structures |
|
| struct | dfu_bank_func_t |
|
Structure for holding of function pointers for needed prepare and activate procedure for the requested update procedure.
More...
|
|
Macros |
|
| #define | APP_TIMER_PRESCALER 0 |
| #define | DFU_TIMEOUT_INTERVAL APP_TIMER_TICKS (120000, APP_TIMER_PRESCALER ) |
| #define | IS_UPDATING_SD (START_PKT) ((START_PKT).dfu_update_mode & DFU_UPDATE_SD ) |
| #define | IS_UPDATING_BL (START_PKT) ((START_PKT).dfu_update_mode & DFU_UPDATE_BL ) |
| #define | IS_UPDATING_APP (START_PKT) ((START_PKT).dfu_update_mode & DFU_UPDATE_APP ) |
| #define | IMAGE_WRITE_IN_PROGRESS () (m_data_received > 0) |
| #define | IS_WORD_SIZED (SIZE) ((SIZE & (sizeof(uint32_t) - 1)) == 0) |
Typedefs |
|
| typedef void(* | dfu_bank_prepare_t )(uint32_t image_size) |
|
Type definition of function used for preparing of the bank before receiving of a software image.
More...
|
|
| typedef void(* | dfu_bank_cleared_t )(void) |
|
Type definition of function used for handling clear complete of the bank before receiving of a software image.
|
|
| typedef uint32_t(* | dfu_bank_activate_t )(void) |
|
Type definition of function used for activating of the software image received.
More...
|
|
Enumerations |
|
| enum |
dfu_state_t
{
DFU_STATE_INIT_ERROR , DFU_STATE_IDLE , DFU_STATE_PREPARING , DFU_STATE_RDY , DFU_STATE_RX_INIT_PKT , DFU_STATE_RX_DATA_PKT , DFU_STATE_VALIDATE , DFU_STATE_WAIT_4_ACTIVATE } |
|
States of the DFU state machine.
More...
|
|
Detailed Description
Device Firmware Update Bank handling module interface.
This header is intended for shared definition and functions between single and dual bank implementations used for DFU support. It is not supposed to be used for external access to the DFU module.
Macro Definition Documentation
| #define APP_TIMER_PRESCALER 0 |
Value of the RTC1 PRESCALER register.
| #define DFU_TIMEOUT_INTERVAL APP_TIMER_TICKS (120000, APP_TIMER_PRESCALER ) |
DFU timeout interval in units of timer ticks.
| #define IMAGE_WRITE_IN_PROGRESS | ( | ) | (m_data_received > 0) |
Macro for determining if an image write is in progress.
| #define IS_UPDATING_APP | ( | START_PKT | ) | ((START_PKT).dfu_update_mode & DFU_UPDATE_APP ) |
Macro for determining if a Application update is ongoing.
| #define IS_UPDATING_BL | ( | START_PKT | ) | ((START_PKT).dfu_update_mode & DFU_UPDATE_BL ) |
Macro for determining if a Bootloader update is ongoing.
| #define IS_UPDATING_SD | ( | START_PKT | ) | ((START_PKT).dfu_update_mode & DFU_UPDATE_SD ) |
Macro for determining if a SoftDevice update is ongoing.
| #define IS_WORD_SIZED | ( | SIZE | ) | ((SIZE & (sizeof(uint32_t) - 1)) == 0) |
Macro for checking that the provided is word sized.
Typedef Documentation
| typedef uint32_t(* dfu_bank_activate_t)(void) |
Type definition of function used for activating of the software image received.
- Returns
- NRF_SUCCESS If the image has been successfully activated any other NRF_ERROR code in case of a failure.
| typedef void(* dfu_bank_prepare_t)(uint32_t image_size) |
Type definition of function used for preparing of the bank before receiving of a software image.
- Parameters
-
[in] image_size Size of software image being received.
Enumeration Type Documentation
| enum dfu_state_t |
States of the DFU state machine.
| Enumerator | |
|---|---|
| DFU_STATE_INIT_ERROR |
State for: dfu_init(...) error. |
| DFU_STATE_IDLE |
State for: idle. |
| DFU_STATE_PREPARING |
State for: preparing, indicates that the flash is being erased and no data packets can be processed. |
| DFU_STATE_RDY |
State for: ready. |
| DFU_STATE_RX_INIT_PKT |
State for: receiving initialization packet. |
| DFU_STATE_RX_DATA_PKT |
State for: receiving data packet. |
| DFU_STATE_VALIDATE |
State for: validate. |
| DFU_STATE_WAIT_4_ACTIVATE |
State for: waiting for dfu_image_activate() . |