how should i replace pstorage from sdk so as to write data to eeprom or sd card instead of flash(as defined in SDK).
how should i replace pstorage from sdk so as to write data to eeprom or sd card instead of flash(as defined in SDK).
Pstorage accesses flash by using the SoftDevice API, sd_flash_write() and sd_flash_page_erase(). It reads from flash with memcpy(). And it gets system events from the SoftDevice so that it knows if a flash operation succeeded or not, NRF_EVT_FLASH_OPERATION_SUCCESS and NRF_EVT_FLASH_OPERATION_ERROR.
Pstorage wasnt' designed to be used with an external EEPROM, but if you really need use it, you need to at least change the interface so that it matches with whatever interface your EEPROM has.
That you will have to figure out yourself.
That you will have to figure out yourself.