usbd_ioreq.c
Go to the documentation of this file.
1 
28 /* Includes ------------------------------------------------------------------*/
29 #include "usbd_ioreq.h"
30 
96  uint8_t *pbuf,
97  uint16_t len)
98 {
99  USBD_Status ret = USBD_OK;
100 
101  pdev->dev.in_ep[0].total_data_len = len;
102  pdev->dev.in_ep[0].rem_data_len = len;
103  pdev->dev.device_state = USB_OTG_EP0_DATA_IN;
104 
105  DCD_EP_Tx (pdev, 0, pbuf, len);
106 
107  return ret;
108 }
109 
119  uint8_t *pbuf,
120  uint16_t len)
121 {
122  USBD_Status ret = USBD_OK;
123 
124  DCD_EP_Tx (pdev, 0, pbuf, len);
125 
126 
127  return ret;
128 }
129 
139  uint8_t *pbuf,
140  uint16_t len)
141 {
142  USBD_Status ret = USBD_OK;
143 
144  pdev->dev.out_ep[0].total_data_len = len;
145  pdev->dev.out_ep[0].rem_data_len = len;
146  pdev->dev.device_state = USB_OTG_EP0_DATA_OUT;
147 
148  DCD_EP_PrepareRx (pdev,
149  0,
150  pbuf,
151  len);
152 
153 
154  return ret;
155 }
156 
166  uint8_t *pbuf,
167  uint16_t len)
168 {
169  USBD_Status ret = USBD_OK;
170 
171  DCD_EP_PrepareRx (pdev,
172  0,
173  pbuf,
174  len);
175  return ret;
176 }
184 {
185  USBD_Status ret = USBD_OK;
186  pdev->dev.device_state = USB_OTG_EP0_STATUS_IN;
187  DCD_EP_Tx (pdev,
188  0,
189  NULL,
190  0);
191 
192  USB_OTG_EP0_OutStart(pdev);
193 
194  return ret;
195 }
196 
204 {
205  USBD_Status ret = USBD_OK;
206  pdev->dev.device_state = USB_OTG_EP0_STATUS_OUT;
207  DCD_EP_PrepareRx ( pdev,
208  0,
209  NULL,
210  0);
211 
212  USB_OTG_EP0_OutStart(pdev);
213 
214  return ret;
215 }
216 
217 
225 uint16_t USBD_GetRxCount (USB_OTG_CORE_HANDLE *pdev , uint8_t epnum)
226 {
227  return pdev->dev.out_ep[epnum].xfer_count;
228 }
229 
244 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
#define USB_OTG_EP0_STATUS_IN
Definition: usb_core.h:56
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
USBD_Status
Definition: usbd_core.h:51
#define USB_OTG_EP0_STATUS_OUT
Definition: usb_core.h:57
USBD_Status USBD_CtlSendData(USB_OTG_CORE_HANDLE *pdev, uint8_t *pbuf, uint16_t len)
USBD_CtlSendData send data on the ctl pipe.
Definition: usbd_ioreq.c:95
#define USB_OTG_EP0_DATA_OUT
Definition: usb_core.h:55
USBD_Status USBD_CtlPrepareRx(USB_OTG_CORE_HANDLE *pdev, uint8_t *pbuf, uint16_t len)
USBD_CtlPrepareRx receive data on the ctl pipe.
Definition: usbd_ioreq.c:138
USBD_Status USBD_CtlContinueSendData(USB_OTG_CORE_HANDLE *pdev, uint8_t *pbuf, uint16_t len)
USBD_CtlContinueSendData continue sending data on the ctl pipe.
Definition: usbd_ioreq.c:118
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
header file for the usbd_ioreq.c file
#define USB_OTG_EP0_DATA_IN
Definition: usb_core.h:54
USBD_Status USBD_CtlSendStatus(USB_OTG_CORE_HANDLE *pdev)
USBD_CtlSendStatus send zero length packet on the ctl pipe.
Definition: usbd_ioreq.c:183
USBD_Status USBD_CtlReceiveStatus(USB_OTG_CORE_HANDLE *pdev)
USBD_CtlReceiveStatus receive zero length packet on the ctl pipe.
Definition: usbd_ioreq.c:203
#define NULL
Definition: usbd_def.h:50
uint16_t USBD_GetRxCount(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
USBD_GetRxCount returns the received data length.
Definition: usbd_ioreq.c:225
USBD_Status USBD_CtlContinueRx(USB_OTG_CORE_HANDLE *pdev, uint8_t *pbuf, uint16_t len)
USBD_CtlContinueRx continue receive data on the ctl pipe.
Definition: usbd_ioreq.c:165


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Oct 24 2019 03:17:20