Is there a reason bool and float aren't supported in nvs_flash?
Posted: Mon Jan 23, 2023 2:14 am
There doesn't seem to be an implementation for either bool or float in the nvs_flash component. Is there a reason?
bool is easy to represent as an integer of course but having a specific type for it is handy on read because you can translate the value to a 'true" or "false" string.
I added the necessary code in nvs_flash and it seemed to be trivial once I figured out that the enum values in nvs_type_t actually have special meanings (they tell nvs_page whether it's signed or unsigned, and the length).
Did I miss something that might cause problems?
bool is easy to represent as an integer of course but having a specific type for it is handy on read because you can translate the value to a 'true" or "false" string.
I added the necessary code in nvs_flash and it seemed to be trivial once I figured out that the enum values in nvs_type_t actually have special meanings (they tell nvs_page whether it's signed or unsigned, and the length).
Did I miss something that might cause problems?