1 / 9

USB Mass Storage

USB Mass Storage. USB Mass Storage Architecture C Library to FAT File System Interface FAT File System USB Mass Storage Driver Recommended Readings. USB Mass Storage Architecture. C Library to File System Interface.

liluye
Télécharger la présentation

USB Mass Storage

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. USB Mass Storage • USB Mass Storage Architecture • C Library to FAT File System Interface • FAT File System • USB Mass Storage Driver • Recommended Readings

  2. USB Mass Storage Architecture

  3. C Library to File System Interface • Interfaces the supported C library file I/O functions to the FAT file system and native file system. • Supported C library file I/O functions are: mkdir, rename, remove, fopen, fclose, fread, fwrite, fseek. • All FAT volumes are referenced with a single letter.

  4. C Library to File System Interface – cont. • All native file system volumes are referenced with anything other than a single letter. • If FAT volume is drive A, do fopen(“A/dir1/dir2/filename”, “w+”) • If native FS RAM volume is drive RAM0, do fopen(“RAM0/dir1/dir2/filename”, “w+)

  5. FAT File System • Sourced from HCC-Embedded in Hungary. • Supports FAT12/16/32 depending on size of the media. • Supports long file names, multiple FAT volumes, multiple open files per volume and is thread safe. • Features a API similar to the C library file I/O functions, but with more functionality.

  6. FAT File System – cont. • The FAT file system is limited to 8.3 file names, 1 FAT volume and 1 open file per volume and is thread safe. • FAT file system is version 2.62. Current versions have additional features such as thread context for current working directory (cwd) and a semaphore to synchronize access to each FAT volume.

  7. USB Mass Storage Driver • Tested with USB 2.0 and 1.1 full speed Flash memory sticks. • Creates FAT volume on device insertion and removes FAT volume on device removal (just like Windows). • Uses the lowest drive letter to reference the newly created FAT volume.

  8. USB Mass Storage Driver – cont. • Supports up to 4 devices • Driver initialization function usb_ms_init() allows specifying event notification or polling to notify user that a device was inserted and a FAT volume was created.

  9. Recommended Readings • HCC-Embedded FAT12/16/32 manual in /netos/src/examples/nafatfs

More Related