Typedefs | |
typedef void(* | nrf_dfu_response_callback_t )(nrf_dfu_response_t *p_res, void *p_context) |
Functions | |
ret_code_t | nrf_dfu_req_handler_init (nrf_dfu_observer_t observer) |
Function for initializing the request handling module. More... | |
ret_code_t | nrf_dfu_req_handler_on_req (nrf_dfu_request_t *p_req) |
Function for scheduling processing of a DFU request. More... | |
Variables | |
ANON_UNIONS_ENABLE | |
ANON_UNIONS_DISABLE | |
enum nrf_dfu_obj_type_t |
enum nrf_dfu_op_t |
DFU protocol operation.
enum nrf_dfu_result_t |
DFU operation result code.
Enumerator | |
---|---|
NRF_DFU_RES_CODE_INVALID |
Invalid opcode. |
NRF_DFU_RES_CODE_SUCCESS |
Operation successful. |
NRF_DFU_RES_CODE_OP_CODE_NOT_SUPPORTED |
Opcode not supported. |
NRF_DFU_RES_CODE_INVALID_PARAMETER |
Missing or invalid parameter value. |
NRF_DFU_RES_CODE_INSUFFICIENT_RESOURCES |
Not enough memory for the data object. |
NRF_DFU_RES_CODE_INVALID_OBJECT |
Data object does not match the firmware and hardware requirements, the signature is wrong, or parsing the command failed. |
NRF_DFU_RES_CODE_UNSUPPORTED_TYPE |
Not a valid object type for a Create request. |
NRF_DFU_RES_CODE_OPERATION_NOT_PERMITTED |
The state of the DFU process does not allow this operation. |
NRF_DFU_RES_CODE_OPERATION_FAILED |
Operation failed. |
NRF_DFU_RES_CODE_EXT_ERROR |
Extended error. The next byte of the response contains the error code of the extended error (see nrf_dfu_ext_error_code_t. |
ret_code_t nrf_dfu_req_handler_init | ( | nrf_dfu_observer_t | observer | ) |
Function for initializing the request handling module.
observer | Function for receiving notifications. |
NRF_SUCCESS | If the operation was successful. |
NRF_ERROR_INTERNAL | If the init packet in flash is not valid. |
NRF_ERROR_INVALID_PARAM | If observer is not provided. |
ret_code_t nrf_dfu_req_handler_on_req | ( | nrf_dfu_request_t * | p_req | ) |
Function for scheduling processing of a DFU request.
Requests are processed asynchronously by the scheduler.
[in] | p_req | Request to be handled. The response callback must be non-null. |
NRF_SUCCESS | If the command request was executed successfully. |
NRF_ERROR_NO_MEM | If the scheduler ran out of memory. |
NRF_ERROR_INVALID_PARAM | If the response callback is NULL. |