STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
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  /* Set EP0 State */
100  pdev->ep0_state = USBD_EP0_DATA_IN;
101  pdev->ep_in[0].total_length = len;
102  pdev->ep_in[0].rem_length = len;
103  /* Start the transfer */
104  USBD_LL_Transmit (pdev, 0x00, pbuf, len);
105 
106  return USBD_OK;
107 }
108 
118  uint8_t *pbuf,
119  uint16_t len)
120 {
121  /* Start the next transfer */
122  USBD_LL_Transmit (pdev, 0x00, pbuf, len);
123 
124  return USBD_OK;
125 }
126 
136  uint8_t *pbuf,
137  uint16_t len)
138 {
139  /* Set EP0 State */
140  pdev->ep0_state = USBD_EP0_DATA_OUT;
141  pdev->ep_out[0].total_length = len;
142  pdev->ep_out[0].rem_length = len;
143  /* Start the transfer */
145  0,
146  pbuf,
147  len);
148 
149  return USBD_OK;
150 }
151 
161  uint8_t *pbuf,
162  uint16_t len)
163 {
164 
166  0,
167  pbuf,
168  len);
169  return USBD_OK;
170 }
178 {
179 
180  /* Set EP0 State */
182 
183  /* Start the transfer */
184  USBD_LL_Transmit (pdev, 0x00, NULL, 0);
185 
186  return USBD_OK;
187 }
188 
196 {
197  /* Set EP0 State */
199 
200  /* Start the transfer */
201  USBD_LL_PrepareReceive ( pdev,
202  0,
203  NULL,
204  0);
205 
206  return USBD_OK;
207 }
208 
209 
217 uint16_t USBD_GetRxCount (USBD_HandleTypeDef *pdev , uint8_t ep_addr)
218 {
219  return USBD_LL_GetRxDataSize(pdev, ep_addr);
220 }
221 
236 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
#define USBD_EP0_STATUS_IN
Definition: usbd_def.h:129
USBD_StatusTypeDef
Definition: usbd_def.h:194
USBD_EndpointTypeDef ep_in[15]
Definition: usbd_def.h:232
uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
Returns the last transferred packet size.
Definition: usbd_conf.c:606
USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t size)
Transmits data over an endpoint.
Definition: usbd_conf.c:574
USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev)
USBD_CtlSendStatus send zero lzngth packet on the ctl pipe.
Definition: usbd_ioreq.c:177
USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev, uint8_t *pbuf, uint16_t len)
USBD_CtlPrepareRx receive data on the ctl pipe.
Definition: usbd_ioreq.c:135
#define USBD_EP0_STATUS_OUT
Definition: usbd_def.h:130
USBD_StatusTypeDef USBD_CtlContinueSendData(USBD_HandleTypeDef *pdev, uint8_t *pbuf, uint16_t len)
USBD_CtlContinueSendData continue sending data on the ctl pipe.
Definition: usbd_ioreq.c:117
USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t size)
Prepares an endpoint for reception.
Definition: usbd_conf.c:591
USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev)
USBD_CtlReceiveStatus receive zero lzngth packet on the ctl pipe.
Definition: usbd_ioreq.c:195
#define NULL
Definition: usbd_def.h:53
#define USBD_EP0_DATA_OUT
Definition: usbd_def.h:128
uint16_t USBD_GetRxCount(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
USBD_GetRxCount returns the received data length.
Definition: usbd_ioreq.c:217
uint32_t ep0_state
Definition: usbd_def.h:234
Definition: pbuf.h:108
USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev, uint8_t *pbuf, uint16_t len)
USBD_CtlSendData send data on the ctl pipe.
Definition: usbd_ioreq.c:95
#define USBD_EP0_DATA_IN
Definition: usbd_def.h:127
Header file for the usbd_ioreq.c file.
uint32_t rem_length
Definition: usbd_def.h:220
USBD_EndpointTypeDef ep_out[15]
Definition: usbd_def.h:233
USBD_StatusTypeDef USBD_CtlContinueRx(USBD_HandleTypeDef *pdev, uint8_t *pbuf, uint16_t len)
USBD_CtlContinueRx continue receive data on the ctl pipe.
Definition: usbd_ioreq.c:160
uint32_t total_length
Definition: usbd_def.h:219