Porting MSC to a Storage Layer
The storage layer port must implement the API functions summarized in Table - Storage API Functions. You can start by referencing to the storage port template located under:
Micrium\Software\uC-USB-Device-V4\Class\MSC\Storage\Template
You can also refer to the RAMDisk storage and µC/FS storage located in Micrium\Software\uC-USB-Device-V4\Class\MSC\Storage\ for a more detailed example of storage layer implementation.
Please refer to the MSC Storage Layer Functions Reference for a full description of the storage layer API.
Function Name | Operation |
|---|---|
| Initializes internal tables used by the storage layer. |
| Initializes storage medium. |
| Gets the storage medium’s capacity. |
| Reads data from the storage medium. |
| Writes data to the storage medium. |
| Gets storage medium’s status. If the storage medium is a removable device such as an SD/MMC card, this function will return if the storage is inserted or removed. |
| Locks access to the storage medium. |
| Unlocks access to the storage medium. |
| Checks the removable media presence status, that is insertion/removal detection. Defined only for the µC/FS storage layer. |