![]() |
M4521_BSP V3.02.000
The Board Support Package for M4521
|
M4521 MCU USB Host Library core. More...
#include <stdio.h>#include <string.h>#include "M4521.h"#include "usbh_core.h"#include "usbh_ohci.h"
Go to the source code of this file.
Macros | |
| #define | GET_TIMEOUT 1000 |
| #define | SET_TIMEOUT 100 |
Functions | |
| int32_t | USBH_RegisterDriver (USB_DRIVER_T *new_driver) |
| Register a device driver to USB Host Core driver. More... | |
| int32_t | USBH_SubmitUrb (URB_T *urb) |
| Submit an URB to USB core for transfer data. More... | |
| int32_t | USBH_UnlinkUrb (URB_T *urb) |
| Cancel an URB which has been submit to USB core. More... | |
| static void | ctrl_msg_complete (URB_T *urb) |
| static int | get_ctrl_msg_signal () |
| static void | clr_ctrl_msg_signal () |
| static int | usb_start_wait_urb (URB_T *urb, int timeout, int *actual_length) |
| static int | usb_internal_control_msg (USB_DEV_T *usb_dev, uint32_t pipe, DEV_REQ_T *cmd, void *data, int len, int timeout) |
| int32_t | USBH_SendCtrlMsg (USB_DEV_T *dev, uint32_t pipe, uint8_t request, uint8_t requesttype, uint16_t value, uint16_t index, void *data, uint16_t size, int timeout) |
| Execute a control transfer. More... | |
| int32_t | USBH_SendBulkMsg (USB_DEV_T *usb_dev, uint32_t pipe, void *data, int len, int *actual_length, int timeout) |
| Execute a bulk transfer. More... | |
| int32_t | USBH_GetDescriptor (USB_DEV_T *dev, uint8_t type, uint8_t index, void *buf, int size) |
| Get a descriptor from device. More... | |
| int32_t | USBH_ClearHalt (USB_DEV_T *dev, int pipe) |
| Clear the halt state of an endpoint. More... | |
| int32_t | USBH_SetInterface (USB_DEV_T *dev, char interface, char alternate) |
| Set USB device interface. More... | |
| int32_t | USBH_SetConfiguration (USB_DEV_T *dev, int configuration) |
| Select USB device configuration. More... | |
| static int | usbh_settle_configuration (USB_DEV_T *dev) |
| int32_t | USBH_Open (void) |
| Open USB Host controller function. More... | |
| int32_t | USBH_Close (void) |
| Disable USB Host controller function. More... | |
| int32_t | USBH_Suspend (void) |
| Suspend USB Host Controller and devices. More... | |
| int32_t | USBH_Resume (void) |
| Resume USB Host controller and devices. More... | |
Variables | |
| static volatile int | _Event_UrbCompleted |
M4521 MCU USB Host Library core.
Definition in file usbh_core.c.