/* Function for notifying a DFU Controller about error conditions in the DFU module. This function also ensures that an error is translated from nrf_errors to DFU Response Value.  */
static void dfu_error_notify(ble_dfu_t *p_dfu, uint32_t err_code)
/* Function for notifying a DFU Controller about error conditions in the DFU module. This function also ensures that an error is translated from nrf_errors to DFU Response Value.  */
static void dfu_error_notify(ble_dfu_t *p_dfu, uint32_t err_code)
{
    ble_dfu_resp_val_t resp_val;
    resp_val = nrf_err_code_translate(err_code, BLE_DFU_RECEIVE_APP_PROCEDURE);
    err_code = ble_dfu_response_send(p_dfu, BLE_DFU_RECEIVE_APP_PROCEDURE, resp_val);
    APP_ERROR_CHECK(err_code);
}