Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf_dfu_flash_callback_t changed in SDK 15

Hello,

 with SDK15 the definition of the nrf_dfu_flash_callback_t changed from

typedef nrf_fstorage_evt_handler_t dfu_flash_callback_t;

typedef void (*nrf_fstorage_evt_handler_t)(nrf_fstorage_evt_t * p_evt);

typedef struct
{
    nrf_fstorage_evt_id_t   id;         //!< The event ID.
    ret_code_t              result;     //!< Result of the operation.
    uint32_t                addr;       //!< Address at which the operation was performed.
    uint32_t                len;        //!< Length of the operation.
    void                  * p_param;    //!< User-defined parameter passed to the event handler.
} nrf_fstorage_evt_t;

to

typedef void (*nrf_dfu_flash_callback_t)(void * p_buf);

we used the nrf_fstorage_evt_t->result to determine the success of the operation in the callback, but now with the (void* p_buf) we can't do it, because there is no description what data is in this buffer and in what form.

If someone could provide a solution, I would appreciate it.

Thanks in advance and best regards,

Niclas

Parents Reply
  • Well, the prototype for the function is given by  typedef void(* nrf_dfu_flash_callback_t)(void *p_buf) as you have noted, so it would be e.g. void function_name(void * p_buf). It seems that the on_dfu_complete() was not updated for SDK 15, so that it does not match the function pointer prototype (nrf_fstorage_evt_t * instead of void *), but that does not have any practical implications in this case.

     

Children
No Data
Related