zephyr/include
Laczen JMS b1e45b413e subsys: fs: Add Non Volatile Storage (NVS) for zephyr
Zephyr supports fatfs, nffs and fcb as storage layer. fatfs and nffs
are less suited for application in memory restricted IC's. fcb has a
smaller footprint but has a complex api.

The proposed module is a module with a even smaller footprint compared
to fcb and a simple interface for reading and writing entries. The
module provides wear levelling of flash. This allows the module to be
used not only to store configuration settings but to store device state
(e.g. state of a light switch over reboots) of a zephyr device.

Fixes buffer overflow by introducing maximum read length in nvs_read()
and nvs_read_hist().

Fixes nvs_write() not to reflash the same data. Allows the user to do
call nvs_write() for all defined entries without worries about flash
wear.

Fixes garbage collection error where wrong data could be copied.

Add nvs_delete() to allow deleting a stored entry. A deleted entry will
not be copied to a new flash sector

Include flash wear information in the README.md documentation

0/25 Update module after reviewers remarks, added documentation to
nvs.h, removed README.md by nvs.rst in doc/subsystems folder

04/26 Update module after reviewers remarks, updated nvs.rst, added more
documentation to samples/subsys/nvs/src/main.c, updated doxygen info
in nvs.h (hope this time it works).

04/26 Update subsystems.rst to include nvs.restart

04/27 Updated nvs.c and nvs.h to avoid a possible flash deletion loop
when the file system is full.

04/29 Updated nvs_write to detect and ignore deletes of non-existing
items

05/06 Update NVS module to return standard error codes, removed low
level API, added configuration options. NVS now uses the board dts to
determine the flash storage location (FLASH_AREA_STORAGE_OFFSET).

05/06 Update nvs.rst. Updated intendation and added intermediate
variables in nvs.c to make the code easier to read.

05/06 Update nvs.rst.

05/07 Update nvs.rst

05/08 Changed the API to a more standard file system API.

05/08 Removed cnt_max from nvs_read() as it is not used.

05/08 Removed #ifdef(CONFIG_NVS_LOG) from nvs_priv.h, now the module can
be build with debugging off.

05/09 Removed configuration options for SECTOR_SIZE, SECTOR_COUNT and
MAX_ELEM_SIZE. It is now easy to support multiple NVS filesystems on
one or multiple devices. Changed logging to support newlib systems.
Thanks to Olivier Martin for reporting and proposed changes.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2018-05-15 10:29:16 +02:00
..
arch x86: grant user mode access to newlib heap 2018-05-09 16:36:36 -07:00
bluetooth Bluetooth: GATT: Make BT_GATT_CHARACTERISTIC declare its value 2018-05-14 18:51:22 +03:00
crypto crypto: Remove useless attribute 2017-04-27 13:06:31 +00:00
debug debug: remove DEBUG_INFO option 2018-02-12 13:58:28 -08:00
dfu subsys: dfu: boot: Remove unused ver query code. 2018-02-21 18:53:42 -05:00
display doc: APIs: group display drivers 2017-11-17 17:14:18 -05:00
drivers drivers/spi: Switch Intel driver to new SPI API 2018-04-04 19:02:35 +02:00
dt-bindings boards: olimexino_stm32: Add USB support 2018-05-10 07:47:13 -05:00
fs subsys: fs: Add the support for multiple instances of fs 2018-05-08 08:53:01 -04:00
linker Bluetooth: settings: Add support for per-submodule handlers 2018-05-04 17:26:05 -04:00
logging subsys: kernel_event_logger: change kernel event values 2018-02-23 07:29:29 -05:00
mgmt mgmt: Bluetooth transport for SMP (mcumgr). 2018-02-20 22:07:52 +01:00
misc slist: abstract node and list implementation 2018-04-30 13:15:51 -04:00
net net: Update bit size of _unused member in struct net_pkt 2018-05-09 09:53:34 -04:00
nvs subsys: fs: Add Non Volatile Storage (NVS) for zephyr 2018-05-15 10:29:16 +02:00
posix lib: posix: Move posix layer from 'kernel' to 'lib' 2018-04-05 16:43:05 -04:00
random subsys: Add random subsystem 2017-11-01 08:26:29 -04:00
settings susbsys: settings: fix coverity issues 2018-04-25 22:25:32 +05:30
shell subsys: mgmt: Shell transport for SMP (mcumgr). 2018-02-20 22:07:52 +01:00
toolchain xtensa: provide XCC compiler support for Xtensa 2018-05-01 16:46:41 -04:00
usb include: usb: add USB DFU class header 2018-04-30 17:42:40 -04:00
zephyr Introduce new sized integer typedefs 2017-04-20 16:07:08 +00:00
adc.h drivers: adc: add system call handlers 2017-10-30 13:20:19 -07:00
aio_comparator.h drivers: aio_comparator: add system calls 2017-10-30 13:20:19 -07:00
atomic.h
base64.h lib: base64: Add statement of changes 2018-03-23 13:54:48 +01:00
cache.h
clock_control.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
console.h doc: fix misspellings in include (API docs) 2017-08-10 12:22:19 -04:00
counter.h doc: add missing API content 2017-12-01 08:58:56 -05:00
crc8.h crc: make crc8_ccitt() match the other CRC functions. 2018-03-10 21:49:07 -05:00
crc16.h include: improve compatibility with C++ apps. 2018-04-09 23:21:52 -04:00
device.h include: improve compatibility with C++ apps. 2018-04-09 23:21:52 -04:00
disk_access.h subsys: disk: Add support for multiple disk interfaces 2018-05-08 08:53:01 -04:00
dma.h dma: define and document the source and dest adjust enum. 2018-05-05 00:58:42 -04:00
entropy.h drivers: Rename random to entropy 2017-11-01 08:26:29 -04:00
eth.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
fcb.h subsys: fs: fcb: remove f_area_id from fcb structure 2018-02-07 09:51:26 -05:00
flash_map.h subsys: storage: flash_map: Fix warning 2018-02-14 14:36:52 -05:00
flash.h flash: minor documentation improvements. 2017-11-28 12:25:19 -05:00
fs.h subsys: fs: Extend storage_dev type beyond 'struct device' 2018-05-08 08:53:01 -04:00
gpio.h dts: gpio: create gpio dt-bingings and inlude in stm32 dtsi files 2018-04-13 13:36:45 -05:00
i2c.h drivers: i2c: add system call handlers 2017-10-30 13:20:19 -07:00
i2s.h drivers: i2s: introduce CAVS I2S 2018-05-01 16:46:41 -04:00
init.h init.h: Fix english in comment 2018-03-26 13:17:39 -04:00
ipm.h drivers: ipm: add system calls 2017-10-30 13:20:19 -07:00
irq_nextlevel.h drivers: interrupts: introduce CAVS interrupt logic 2018-05-01 16:46:41 -04:00
irq_offload.h
irq.h kernel: Make irq_{un}lock() APIs into a global spinlock in SMP mode 2018-02-16 10:44:29 -05:00
json.h lib: json: Efficiently pack field name, offset, alignment, type 2018-05-01 15:44:09 -04:00
kernel_version.h kernel: version: parenthesize macro value 2018-01-04 13:29:03 -05:00
kernel.h kernel: Rework SMP irq_lock() compatibility layer 2018-05-02 10:00:17 -07:00
led_strip.h include: improve compatibility with C++ apps. 2018-04-09 23:21:52 -04:00
led.h drivers: led: Add system call handler support 2018-05-04 10:07:39 -07:00
pinmux.h pinmux: remove user mode access 2018-05-07 22:20:20 -04:00
power.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
pwm.h drivers: pwm: add system call handlers 2017-10-30 13:20:19 -07:00
ring_buffer.h ring_buffer: remove broken object_tracing support 2018-01-18 17:44:38 -05:00
rtc.h drivers: rtc: add system calls 2017-10-30 13:20:19 -07:00
sensor.h sensors: Add separation between ambient and die temperature 2018-04-03 22:29:11 -04:00
shared_irq.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
spi.h include: improve compatibility with C++ apps. 2018-04-09 23:21:52 -04:00
spinlock.h kernel: Simple spinlock API 2018-02-16 10:44:29 -05:00
stats.h doc: misspellings in public API doxygen comments 2018-04-05 19:16:24 -04:00
sw_isr_table.h sw_isr_table.h: fix includes 2017-10-27 16:08:54 -04:00
sys_clock.h kernel: tickless: Add tickless kernel support 2017-04-27 13:46:28 +00:00
sys_io.h sys_io.h: don't pull in kernel.h 2017-11-02 13:25:01 -07:00
syscall.h license: fix spdx identifier in a few files 2018-04-12 15:19:51 -04:00
toolchain.h xtensa: move byte-order macros out of arch.h 2017-05-11 12:47:23 -04:00
uart.h include: improve compatibility with C++ apps. 2018-04-09 23:21:52 -04:00
watchdog.h drivers: watchdog: Watchdog API redesign 2018-05-14 10:28:23 -05:00
zephyr.h kernel: remove legacy.h and MDEF support 2017-04-19 10:59:35 -05:00