Lines Matching +full:flash +full:- +full:id

1 /*  NVS: non volatile storage in flash
5 * SPDX-License-Identifier: Apache-2.0
20 * @brief Non-volatile Storage (NVS)
21 * @defgroup nvs Non-volatile Storage (NVS)
30 * @brief Non-volatile Storage Data Structures
31 * @defgroup nvs_data_structures Non-volatile Storage Data Structures
37 * @brief Non-volatile Storage File system structure
40 /** File system offset in flash **/
44 * - high 2 bytes correspond to the sector
45 * - low 2 bytes are the offset in the sector
50 /** File system is split into sectors, each sector must be multiple of erase-block-size */
58 /** Flash device runtime structure */
60 /** Flash memory parameters structure */
72 * @brief Non-volatile Storage APIs
73 * @defgroup nvs_high_level_api Non-volatile Storage APIs
79 * @brief Mount an NVS file system onto the flash device specified in @p fs.
83 * @retval -ERRNO errno code if error
88 * @brief Clear the NVS file system from flash.
92 * @retval -ERRNO errno code if error
105 * @param id Id of the entry to be written
111 * to flash, thus 0 is returned. On error, returns negative value of errno.h defined error codes.
113 ssize_t nvs_write(struct nvs_fs *fs, uint16_t id, const void *data, size_t len);
119 * @param id Id of the entry to be deleted
121 * @retval -ERRNO errno code if error
123 int nvs_delete(struct nvs_fs *fs, uint16_t id);
129 * @param id Id of the entry to be read
138 ssize_t nvs_read(struct nvs_fs *fs, uint16_t id, void *data, size_t len);
144 * @param id Id of the entry to be read
154 ssize_t nvs_read_hist(struct nvs_fs *fs, uint16_t id, void *data, size_t len, uint16_t cnt);
163 * especially on spi flash. On error, returns negative value of errno.h defined error codes.
182 * It breaks the aim of the NVS to avoid any unnecessary flash erases.
183 * Using this routine extensively can result in premature failure of the flash device.