📄 usb_host_msd.h
字号:
/******************************************************************************
USB Host Mass Storage Device Driver Header File
Description:
This is the header file for a USB Embedded Host that is using the Mass
Storage Class.
This file should be included with usb_host.h to provide the USB hardware
interface. It must be included after the application-specific usb_config.h
file and after the USB Embedded Host header file usb_host.h, as definitions
in those files are required for proper compilation.
Acronyms/abbreviations used by this class:
* LUN - Logical Unit Number
* CBW - Command Block Wrapper
* CSW - Command Status Wrapper
To interface with usb_host.c, the routine USBMSDClientInitialize() should
be specified as the Initialize() function, and USBMSDClientEventHandler()
should be specified as the EventHandler() function in the
usbClientDrvTable[] array declared in usb_config.h.
This driver can be configured to use transfer events from usb_host.c.
Transfer events require more RAM and ROM than polling, but it cuts down or
even eliminates the required polling of the various USBxxxTasks functions.
For this class, USBHostMSDTasks() is compiled out if transfer events from
usb_host.c are used. However, USBHostTasks() still must be called to
provide attach, enumeration, and detach services. If transfer events from
usb_host.c are going to be used, USB_ENABLE_TRANSFER_EVENT should be
defined. If transfer status is going to be polled,
USB_ENABLE_TRANSFER_EVENT should not be defined.
This driver can also be configured to provide mass storage transfer events
to the next layer. Generating these events requires a small amount of
extra ROM, but no extra RAM. The layer above this driver must be
configured to receive and respond to the events. If mass storage transfer
events are going to be sent to the next layer,
USB_MSD_ENABLE_TRANSFER_EVENT should be defined. If mass storage transfer
status is going to be polled, USB_MSD_ENABLE_TRANSFER_EVENT should not be
defined.
Since mass storage is performed with bulk transfers,
USB_SUPPORT_BULK_TRANSFERS must be defined. For maximum throughput, it is
recommended that ALLOW_MULTIPLE_BULK_TRANSACTIONS_PER_FRAME be defined.
For maximum compatibility with mass storage devices, it is recommended that
ALLOW_MULTIPLE_NAKS_PER_FRAME not be defined.
Summary:
This is the header file for a USB Embedded Host that is using the Mass
Storage Class.
*******************************************************************************/
//DOM-IGNORE-BEGIN
/*******************************************************************************
* FileName: usb_host_msd.h
* Dependencies: None
* Processor: PIC24/dsPIC30/dsPIC33/PIC32MX
* Compiler: C30 v2.01/C32 v0.00.18
* Company: Microchip Technology, Inc.
Software License Agreement
The software supplied herewith by Microchip Technology Incorporated
(the 揅ompany
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -