MSD class
![SEGGER emUSB-Host SEGGER emUSB-Host](https://c.a.segger.com/fileadmin/_processed_/6/b/csm_Produkt-Icon_emUSB-Host_03a582a593.png)
Overview
The Mass Storage Device protocol (MSD) is used to get access to one or more storage mediums. Using this class, emUSB-Host provides access to external storage media such as USB-sticks and external hard disk drives, memory card adapters.
![msd](https://c.a.segger.com/fileadmin/images/products/emUSB/emUSB-Host/MSD/msd_300.png)
Key features
- Any Mass storage device (Memory stick, hard disk) can be used
- Included in the emUSB-Host Base package
- It is independent of the file system. An interface to emFile is provided
- Small footprint
Application Samples emUSB-Host MSD
![memory stick](https://c.a.segger.com/fileadmin/_processed_/a/4/csm_memory-stick-500x_1858f558f6.png)
Memory Stick
![hard disk](https://c.a.segger.com/fileadmin/_processed_/f/7/csm_hard-disk-500x_2e425338dd.png)
USB Hard Disk Drive
![card reader](https://c.a.segger.com/fileadmin/_processed_/0/4/csm_cardreader_500x_5e0ad8a425.png)
Cardreader
Structure of MSD Component
A mass storage device connected to emUSB-Host is added to the file system as a volume. All operations on the device, such as formatting, reading / writing of files and directories are performed through the API of the file system. With emFile, the device name of the first MSD is "msd:0:".
Example Code Included
Example code which is provided with any shipment or eval software including emUSB-Host. The example shows the capacities of the connected device (such as the volume size, number of sectors, etc.) and shows files in the root directory and creates and writes to a file. Several application samples can also be found on the emUSB-Host sample page.
Requirements
Components required to use emUSB-Host MSD:
- emUSB-Host MSD (Included in emUSB-Host Base package)
- emUSB-Host core (Included in emUSB-Host Base package)
- emUSB-Host target driver (One driver is included in emUSB-Host PRO package)
- Real-time operating system (embOS or other)
- File System (emFile)