Getting pstorage working in API level > 11

Hi,

I have updated and old old project to SDK 17.0.1 and using Segger Embedded Studio

But because I make a lot of use of pstorage in the project - I am not ready to convert that part now

I have moved pstorage files from SDK 11 to SDK 17 and got everything to compile

Now the problem - in order for pstorage to work we need to call the following

void pstorage_sys_event_handler(uint32_t sys_evt)


But I cannot find a place where I could call this?

The normal sys_event_handler() is not in the newer SDKs > 11
Parents
  • Found out i was missing handeling system events and give pstorage the events

    So I added the following to pstorage.c module and changed the signature of the pstorage_sys_event_handler to include a void *

    /* Define a nrf_sdh_soc event observer to receive SoftDevice system events. */
    NRF_SDH_SOC_OBSERVER(m_sys_obs, 0, pstorage_sys_event_handler, NULL);
    
    
    /**@brief Function for handling flash access result events.
     *
     * @param[in] sys_evt System event to be handled.
     */
    void pstorage_sys_event_handler(uint32_t sys_evt, void * p)
    
Reply
  • Found out i was missing handeling system events and give pstorage the events

    So I added the following to pstorage.c module and changed the signature of the pstorage_sys_event_handler to include a void *

    /* Define a nrf_sdh_soc event observer to receive SoftDevice system events. */
    NRF_SDH_SOC_OBSERVER(m_sys_obs, 0, pstorage_sys_event_handler, NULL);
    
    
    /**@brief Function for handling flash access result events.
     *
     * @param[in] sys_evt System event to be handled.
     */
    void pstorage_sys_event_handler(uint32_t sys_evt, void * p)
    
Children
No Data
Related