Prior to this commit: `struct fcb` contained a pointer to an array of
`struct flash_area`. Each entry in the array represented a flash sector
that the fcb comprised.
After commit: `struct fcb` contains a pointer to an array of `struct
flash_sector`, not `struct flash_area`.
Rationale: The FCB needs to know which sectors it occupies for its
rotate operation. However, the `flash_area` type is meant to represent
a collection of sectors, not a single sector. `struct flash_area`
contains information that the fcb does not need (e.g., area ID and
device ID). Furthermore, the flash_map API provides a means of
converting a flash area ID to an array of sectors
(`flash_area_get_sectors()`), but no way to convert to an array of
areas.
Signed-off-by: Christopher Collins <ccollins@apache.org>
Zephyr already supports NFFS as a storage layer, but it might
be a little bit too heavyweight for certain applications in
memory-restricted ICs.
This module is response for need of Lightweight flash storage
capability. FCB is ported form MyNewt as native zephyr module.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>