Data Structures |
|
| struct | nrf_dfu_req_t |
|
Definition of a DFU request sent from the transport layer.
More...
|
|
| struct | nrf_dfu_res_t |
|
Response used during DFU operations.
More...
|
|
Enumerations |
|
| enum |
nrf_dfu_obj_type_t
{
NRF_DFU_OBJ_TYPE_INVALID , NRF_DFU_OBJ_TYPE_COMMAND , NRF_DFU_OBJ_TYPE_DATA } |
|
DFU object types.
More...
|
|
| enum |
nrf_dfu_req_op_t
{
NRF_DFU_OBJECT_OP_NONE = 0, NRF_DFU_OBJECT_OP_CREATE = 1, NRF_DFU_OBJECT_OP_WRITE = 2, NRF_DFU_OBJECT_OP_EXECUTE = 3, NRF_DFU_OBJECT_OP_CRC = 4, NRF_DFU_OBJECT_OP_SELECT = 6, NRF_DFU_OBJECT_OP_OTHER = 7 } |
|
DFU request operation codes.
More...
|
|
Functions |
|
| uint32_t | nrf_dfu_req_handler_init (void) |
|
Function for initializing the request handling module.
More...
|
|
| nrf_dfu_res_code_t | nrf_dfu_req_handler_on_req (void *p_context, nrf_dfu_req_t *p_req, nrf_dfu_res_t *p_res) |
|
Function type for handling a DFU request.
More...
|
|
| void | nrf_dfu_req_handler_reset_if_dfu_complete (void) |
|
Function for resetting the device when the DFU process is complete.
More...
|
|
Detailed Description
Enumeration Type Documentation
| enum nrf_dfu_obj_type_t |
| enum nrf_dfu_req_op_t |
DFU request operation codes.
The DFU transport layer creates request events of these types. The implementation of nrf_dfu_req_handler_on_req handles requests of these types.
Function Documentation
| uint32_t nrf_dfu_req_handler_init | ( | void | ) |
Function for initializing the request handling module.
This function initializes the flash with or without the SoftDevice, depending on the project configuration.
- Return values
-
NRF_SUCCESS If the operation was successful. NRF_ERROR_INVALID_STATE If the fstorage module could not be initiated or the SoftDevice could not set the event handler.
| nrf_dfu_res_code_t nrf_dfu_req_handler_on_req | ( | void * | p_context , |
| nrf_dfu_req_t * | p_req , | ||
| nrf_dfu_res_t * | p_res | ||
| ) |
Function type for handling a DFU request.
- Parameters
-
[in,out] p_context Pointer to context-specific RAM required for running the command request. This value may be NULL if the command request does not require context-specific RAM. [in,out] p_req Pointer to the structure holding the DFU request. [in,out] p_res Pointer to the structure holding the DFU response.
- Return values
-
NRF_DFU_RES_CODE_SUCCESS If the command request was executed successfully. Any other error code indicates that the request could not be handled.
| void nrf_dfu_req_handler_reset_if_dfu_complete | ( | void | ) |
Function for resetting the device when the DFU process is complete.
Checks if the DFU transfer is complete. If it is complete, all transports are closed down and reset is called.