Download STM32Cube USB host library
Transcript
Host library core module 3.2.3 UM1720 Core APIs for class handlers The core APIs dedicated to class handlers are classified as follows: • I/O requests APIs • Pipe control APIs • Standard class control requests APIs • Interface utility APIs Table 5 lists the core APIs dedicated to class handlers. Table 5. Core APIs dedicated to class handlers Function Category USBH_BulkReceiveData Receives data on bulk pipe USBH_BulkSendData Sends data on bulk pipe USBH_CtlReceiveData Receives data on control pipe USBH_CtlSendData Sends data on control endpoint USBH_CtlSendSetup IO requests Issues a control request USBH_InterruptReceiveData Receives data from the interrupt pipe USBH_InterruptSendData Sends data to the interrupt pipe USBH_IsocReceiveData Receives data from the isochronous pipe USBH_IsocSendData Sends data to the isochronous pipe USBH_OpenPipe Opens a pipe USBH_ClosePipe USBH_AllocPipe Pipe control USBH_FreePipe USBH_GetDescriptor USBH_SetInterface Standard control requests Interface utility USBH_FindInterfaceIndex Closes a pipe Allocates a new pipe Sets free an allocated pipe USBH_FindInterface 3.2.4 Description Generic function to get a descriptor Standard control request to set alternate setting value for an interface Parses a configuration descriptor to find an interface descriptor corresponding to a specific class, subclass and protocol Parses a configuration descriptor to find the index of an interface descriptor with a particular interface number and alternate setting value Main host core data structures and enumerated typedefs The data structures and enumeration types of the core are defined in the file usbh_def.h. The main data structures are the following: 12/43 • the core handle structure of the type USBH_HandleTypedef, • the device handle structure of the type USBH_DeviceTypedef, • the class handle structure of the type USBH_ClassTypedef. DocID025799 Rev 3