|
GD32F10x USB-Device
V1.0.0
GD32F10x USB-Device
|
usb_core.h File Reference
Device Driver Header file. More...
Go to the source code of this file.
Data Structures | |
| struct | USB_ep |
| USB endpoint struct. More... | |
| struct | usb_device_req |
| USB standard device request struct. More... | |
| struct | _Device_Desc_cb |
| USB device descriptor callback type define. More... | |
| struct | _Device_Class_cb |
| USB device class callback type define. More... | |
| struct | _USBD_USER_cb |
| USB user callback type define. More... | |
| struct | _UCD |
| USB core driver type define. More... | |
| struct | USB_Device_handle |
Macros | |
| #define | IER_MASK |
| Interrupt flag mask which decide what event should be handled by application. More... | |
| #define | USB_EPTYPE_CONTROL 0 |
| USB endpoint type. | |
| #define | USB_EPTYPE_ISOC 1 |
| #define | USB_EPTYPE_BULK 2 |
| #define | USB_EPTYPE_INT 3 |
| #define | USB_SNG_BUFTYPE 0 |
| USB endpoint kind. | |
| #define | USB_DBL_BUFTYPE 1 |
| #define | USB_CTRL_IDLE 0 |
| USB control transfer status. | |
| #define | USB_CTRL_SETUP 1 |
| #define | USB_CTRL_DATA_IN 2 |
| #define | USB_CTRL_DATA_OUT 3 |
| #define | USB_CTRL_STATUS_IN 4 |
| #define | USB_CTRL_STATUS_OUT 5 |
| #define | USB_EP0_MAX_SIZE 64 |
| USB endpoint0 max packet size. | |
| #define | USB_STATUS_UNCONNECTED 0 |
| USB device status. | |
| #define | USB_STATUS_DEFAULT 1 |
| #define | USB_STATUS_ADDRESSED 2 |
| #define | USB_STATUS_CONFIGURED 3 |
| #define | USB_STATUS_SUSPENDED 4 |
| #define | USB_STATUS_CONNECTED 5 |
Typedefs | |
| typedef struct USB_ep | USB_EP |
| USB endpoint struct. | |
| typedef struct usb_device_req | USB_DEVICE_REQ |
| USB standard device request struct. | |
| typedef struct _Device_Desc_cb | USBD_Desc_cb_TypeDef |
| USB device descriptor callback type define. | |
| typedef struct _Device_Class_cb | USBD_Class_cb_TypeDef |
| USB device class callback type define. | |
| typedef struct _USBD_USER_cb | USBD_User_cb_TypeDef |
| USB user callback type define. | |
| typedef struct _UCD | UCD_DEV |
| USB core driver type define. | |
| typedef struct _UCD * | UCD_PDEV |
| typedef struct USB_Device_handle | USB_DEVICE_HANDLE |
| typedef struct USB_Device_handle | USB_CORE_HANDLE |
Enumerations | |
| enum | USB_Status { USB_OK = 0, USB_FAIL } |
| USB operation status. | |
Functions | |
| void | DR_Init (void) |
| Device register initialization. More... | |
| void | DR_StopDevice (void) |
| Device register configure when stop device. More... | |
| void | USB_EP_SetAddress (USB_CORE_HANDLE *pudev, uint8_t Addr) |
| Set USB device and endpoints address. More... | |
| void | USB_EP_BufConfig (USB_CORE_HANDLE *pudev, uint8_t EpAddr, uint8_t EpKind, uint32_t BufAddr) |
| Configure buffer for endpoint. More... | |
| void | USB_EP_Init (USB_CORE_HANDLE *pudev, uint8_t EpAddr, uint8_t EpType, uint16_t EpMps) |
| Endpoint initialization. More... | |
| void | USB_EP_DeInit (USB_CORE_HANDLE *pudev, uint8_t EpAddr) |
| Configure the endpoint when it is disabled. More... | |
| void | USB_EP_Tx (USB_CORE_HANDLE *pudev, uint8_t EpAddr, uint8_t *pbuf, uint16_t BufLen) |
| Endpoint prepare to transmit data. More... | |
| void | USB_EP_Rx (USB_CORE_HANDLE *pudev, uint8_t EpAddr, uint8_t *pbuf, uint16_t BufLen) |
| Endpoint prepare to receive data. More... | |
| void | USB_EP_Stall (USB_CORE_HANDLE *pudev, uint8_t EpID) |
| Set an endpoint to STALL status. More... | |
| void | USB_EP_ClrStall (USB_CORE_HANDLE *pudev, uint8_t EpID) |
| Clear endpoint stalled status. More... | |
| uint8_t | USB_EP_GetStatus (USB_CORE_HANDLE *pudev, uint8_t EpID) |
| Get the endpoint status. More... | |
| uint8_t | USB_CtlTx (USB_CORE_HANDLE *pudev, uint8_t *pbuf, uint16_t Len) |
| Transmit data on the control pipe. More... | |
| uint8_t | USB_CtlContinueTx (USB_CORE_HANDLE *pudev, uint8_t *pbuf, uint16_t Len) |
| Continue transmitting data on the control pipe. More... | |
| uint8_t | USB_CtlRx (USB_CORE_HANDLE *pudev, uint8_t *pbuf, uint16_t Len) |
| Receive data on the control pipe. More... | |
| uint8_t | USB_CtlContinueRx (USB_CORE_HANDLE *pudev, uint8_t *pbuf, uint16_t Len) |
| Continue receive data on the contrl pipe. More... | |
| uint8_t | USB_CtlTransmitStatus (USB_CORE_HANDLE *pudev) |
| Transmit status stage on the control pipe. More... | |
| uint8_t | USB_CtlReceiveStatus (USB_CORE_HANDLE *pudev) |
| Receive status stage on the control pipe. More... | |
| uint16_t | USB_GetRxCount (USB_CORE_HANDLE *pudev, uint8_t EpID) |
| Get the received data length. More... | |
Detailed Description
Device Driver Header file.
- Author
- MCU SD
- Version
- V1.0.0
- Date
- 26-Dec-2014
Definition in file usb_core.h.
Generated on Fri Feb 6 2015 14:56:36 for GD32F10x USB-Device by
1.8.8