usb_dcd.h
Go to the documentation of this file.
1 
28 /* Define to prevent recursive inclusion -------------------------------------*/
29 #ifndef __DCD_H__
30 #define __DCD_H__
31 
32 /* Includes ------------------------------------------------------------------*/
33 #include "usb_core.h"
34 
35 
49 #define USB_OTG_EP_CONTROL 0
50 #define USB_OTG_EP_ISOC 1
51 #define USB_OTG_EP_BULK 2
52 #define USB_OTG_EP_INT 3
53 #define USB_OTG_EP_MASK 3
54 
55 /* Device Status */
56 #define USB_OTG_DEFAULT 1
57 #define USB_OTG_ADDRESSED 2
58 #define USB_OTG_CONFIGURED 3
59 #define USB_OTG_SUSPENDED 4
60 
69 /********************************************************************************
70 Data structure type
71 ********************************************************************************/
72 typedef struct
73 {
74  uint8_t bLength;
75  uint8_t bDescriptorType;
77  uint8_t bmAttributes;
78  uint16_t wMaxPacketSize;
79  uint8_t bInterval;
80 }
82 
105 /********************************************************************************
106 EXPORTED FUNCTION FROM THE USB-OTG LAYER
107 ********************************************************************************/
108 void DCD_Init(USB_OTG_CORE_HANDLE *pdev ,
109  USB_OTG_CORE_ID_TypeDef coreID);
110 
114  uint8_t address);
115 uint32_t DCD_EP_Open(USB_OTG_CORE_HANDLE *pdev ,
116  uint8_t ep_addr,
117  uint16_t ep_mps,
118  uint8_t ep_type);
119 
120 uint32_t DCD_EP_Close (USB_OTG_CORE_HANDLE *pdev,
121  uint8_t ep_addr);
122 
123 
124 uint32_t DCD_EP_PrepareRx ( USB_OTG_CORE_HANDLE *pdev,
125  uint8_t ep_addr,
126  uint8_t *pbuf,
127  uint16_t buf_len);
128 
129 uint32_t DCD_EP_Tx (USB_OTG_CORE_HANDLE *pdev,
130  uint8_t ep_addr,
131  uint8_t *pbuf,
132  uint32_t buf_len);
133 uint32_t DCD_EP_Stall (USB_OTG_CORE_HANDLE *pdev,
134  uint8_t epnum);
135 uint32_t DCD_EP_ClrStall (USB_OTG_CORE_HANDLE *pdev,
136  uint8_t epnum);
137 uint32_t DCD_EP_Flush (USB_OTG_CORE_HANDLE *pdev,
138  uint8_t epnum);
139 uint32_t DCD_Handle_ISR(USB_OTG_CORE_HANDLE *pdev);
140 
141 uint32_t DCD_GetEPStatus(USB_OTG_CORE_HANDLE *pdev ,
142  uint8_t epnum);
143 
145  uint8_t epnum ,
146  uint32_t Status);
147 
153 #endif /* __DCD_H__ */
154 
155 
163 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
164 
uint32_t DCD_EP_Tx(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint8_t *pbuf, uint32_t buf_len)
Transmit data over USB.
Definition: usb_dcd.c:271
uint32_t DCD_EP_Close(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr)
called when an EP is disabled
Definition: usb_dcd.c:204
uint32_t DCD_EP_Flush(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
This Function flushes the FIFOs.
Definition: usb_dcd.c:360
uint32_t DCD_EP_Stall(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
Stall an endpoint.
Definition: usb_dcd.c:306
USB_OTG_CORE_ID_TypeDef
Definition: usb_defines.h:190
void DCD_DevConnect(USB_OTG_CORE_HANDLE *pdev)
Connect device (enable internal pull-up)
Definition: usb_dcd.c:395
uint8_t bDescriptorType
Definition: usb_dcd.h:75
uint32_t DCD_EP_Open(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint16_t ep_mps, uint8_t ep_type)
Configure an EP.
Definition: usb_dcd.c:165
uint8_t bEndpointAddress
Definition: usb_dcd.h:76
void DCD_SetEPStatus(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum, uint32_t Status)
Set the EP Status.
Definition: usb_dcd.c:460
uint8_t bLength
Definition: usb_dcd.h:74
uint32_t DCD_EP_ClrStall(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
Clear stall condition on endpoints.
Definition: usb_dcd.c:333
Header of the Core Layer.
uint16_t wMaxPacketSize
Definition: usb_dcd.h:78
uint32_t DCD_EP_PrepareRx(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t buf_len)
DCD_EP_PrepareRx.
Definition: usb_dcd.c:231
struct EP_DESCRIPTOR * PEP_DESCRIPTOR
void DCD_EP_SetAddress(USB_OTG_CORE_HANDLE *pdev, uint8_t address)
This Function set USB device address.
Definition: usb_dcd.c:382
uint32_t DCD_GetEPStatus(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
returns the EP Status
Definition: usb_dcd.c:433
uint8_t bInterval
Definition: usb_dcd.h:79
void DCD_Init(USB_OTG_CORE_HANDLE *pdev, USB_OTG_CORE_ID_TypeDef coreID)
Definition: usb_dcd.c:91
uint8_t bmAttributes
Definition: usb_dcd.h:77
uint32_t DCD_Handle_ISR(USB_OTG_CORE_HANDLE *pdev)
void DCD_DevDisconnect(USB_OTG_CORE_HANDLE *pdev)
Disconnect device (disable internal pull-up)
Definition: usb_dcd.c:413


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:26