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

Why is *p_flash_info variable ?

Just a naive question about the definition of nrf_fstorage_t , it has a member  nrf_fstorage_info_t *p_flash_info.

Why the type isn't nrf_fstorage_info_t const*  ?

Tell me if I am wrong : doesn't it contain only information known at compile time. OK, which structure you point at is not known in advance, but there are only a few predefined cases so they could be hard coded :  and therefore having the const qualifier would allow to point at a structure residing on the on chip flash, which would save some RAM.

Parents
  • Hi again

    The developer confirmed that this pointer could have been a const pointer. 

    Unfortunately I don't expect this to be changed, as the nRF5 SDK is no longer in active development. 

    In order to take advantage of this change yourself I would recommend making a local copy of the nrf_fstorage.h file, and update it with this change. 

    Best regards
    Torbjørn

Reply
  • Hi again

    The developer confirmed that this pointer could have been a const pointer. 

    Unfortunately I don't expect this to be changed, as the nRF5 SDK is no longer in active development. 

    In order to take advantage of this change yourself I would recommend making a local copy of the nrf_fstorage.h file, and update it with this change. 

    Best regards
    Torbjørn

Children
Related