- Storage layer for use with the USB Mass Storage Device class
- Raw storage interface for direct access by the application
- Storage layer for third-party file systems
The block operations from the file system are handed over to the Storage Layer. SEGGER's Storage Layer is completely agnostic of the file system used to address it. It accepts any page or sector size. This way it can directly be used by emFile, by the application, by a third party file system or by applications passing through operations from a host, as is the case for USB mass storage class devices.
The main purpose of the Storage Layer is to provide access to the device drivers provided by SEGGER. This includes SEGGER's great NAND and NOR flash drivers with their effective wear leveling algorithms. The Storage Layer also handles storage arrays according to RAID1 or RAID5, if desired. Encryption of the storage volume is handled by the Storage Layer as well. The Storage Layer synchronizes accesses to the device driver level. For this purpose it calls a device driver to perform a block operation.
Another task performed by the storage layer is the handling of caches. This also includes mechanisms to control the garbage collection.
The functions described in this section can be used to access and to manage the data at the logical sector level effectively bypassing the file system. These functions are typically used when the application comes with its own file system or when the storage device has to be mounted as a mass storage device via USB.
|Performs garbage collection on the storage device.
|Performs a single garbage collection step on the storage device.
|Informs the driver about unused sectors.
|Returns the number of clean operations required.
|Returns the statistic counters.
|Returns the device info.
|Initializes the driver and OS if necessary.
|Reads a sector from a device.
|Reads multiple sectors from a device.
|Rewrites a sector with the original data.
|Sets the statistical counters to 0.
|Writes cached data to the storage device.
|Writes cached sector data to storage device.
|Low-level unmount. Unmounts a volume on driver layer.
|Writes a sector to storage device.
|Writes multiple sectors to storage device.