I was looking at the fstorage documentation for SDK 14.2.0 (https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/lib_fstorage.html?cp=4_0_1_3_51)
In this part of the documentation are cited the following event ID for the fstorage callback:
- NRF_FSTORAGE_WRITE_RESULT
- NRF_FSTORAGE_READ_RESULT
- NRF_FSTORAGE_ERASE_RESULT
But in the code I can found only these:
- NRF_FSTORAGE_EVT_WRITE_RESULT
- NRF_FSTORAGE_EVT_READ_RESULT
- NRF_FSTORAGE_EVT_ERASE_RESULT
defined into nrf_fstorage.h as follow:
/**@brief Event IDs. */
typedef enum
{
NRF_FSTORAGE_EVT_READ_RESULT,
NRF_FSTORAGE_EVT_WRITE_RESULT, //!< Event for @ref nrf_fstorage_write.
NRF_FSTORAGE_EVT_ERASE_RESULT //!< Event for @ref nrf_fstorage_erase.
} nrf_fstorage_evt_id_t;
I also noticed that into explanation, each call (write, read, erase) have its own callback after request's done: this is true for Write and Erase, but the READ callback is never called, and the data are available each time directly after nrf_fstorage_read() function returns (with NRF_SUCCESS).
I think this is a documentation lack/bug, but can you confirm that or am I loosing something?
Can I directly read data after nrf_fstorage_read() function, if it returns NRF_SUCCESS ?
Thanks
Luca