hi:
In my extent application, I would like to save other data which is got from BLE to flash memory with different parameter(block size, block count) using pstorage. Could you please show me how to config for the memory?
1:just one pstorage_init() right?
2:and two pstorage_register() for Device Manager and My Application.
3:If I use just one page. (PSTORAGE_NUM_OF_PAGES = 1) what happened? two module in one page?
4:or, I need to make PSTORAGE_NUM_OF_PAGES = 2, so Device Manager and My application have 1 page each.
5:like this is right?
void my_flash_init(void){
uint32_t err_code;
pstorage_module_param_t param;
param.block_count = 1;
param.block_size = NAME_SIZE;
param.cb = my_cb;
err_code = pstorage_init();
err_code = pstorage_register(¶m, &my_name_addr);
err_code = pstorage_load(device_name, &my_name_addr, NAME_SIZE, 0);
}
void my_data_init(void)
{
uint32_t err_code;
pstorage_module_param_t param;
param.block_count = 1;
param.block_size = DATA_SIZE;
param.cb = my_data_cb;
// err_code = pstorage_init();
err_code = pstorage_register(¶m, &my_data_addr);
err_code = pstorage_load(device_name, &my_name_addr, NAME_SIZE, 0);
}
Thank you very much!!!