STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
usbh_ioreq.c
Go to the documentation of this file.
1 
27 /* Includes ------------------------------------------------------------------*/
28 
29 #include "usbh_ioreq.h"
30 
101  uint8_t *buff,
102  uint8_t pipe_num)
103 {
104 
105  USBH_LL_SubmitURB (phost, /* Driver handle */
106  pipe_num, /* Pipe index */
107  0, /* Direction : OUT */
108  USBH_EP_CONTROL, /* EP type */
109  USBH_PID_SETUP, /* Type setup */
110  buff, /* data buffer */
111  USBH_SETUP_PKT_SIZE, /* data length */
112  0);
113  return USBH_OK;
114 }
115 
116 
127  uint8_t *buff,
128  uint16_t length,
129  uint8_t pipe_num,
130  uint8_t do_ping )
131 {
132  if(phost->device.speed != USBH_SPEED_HIGH)
133  {
134  do_ping = 0;
135  }
136 
137  USBH_LL_SubmitURB (phost, /* Driver handle */
138  pipe_num, /* Pipe index */
139  0, /* Direction : OUT */
140  USBH_EP_CONTROL, /* EP type */
141  USBH_PID_DATA, /* Type Data */
142  buff, /* data buffer */
143  length, /* data length */
144  do_ping); /* do ping (HS Only)*/
145 
146  return USBH_OK;
147 }
148 
149 
160  uint8_t* buff,
161  uint16_t length,
162  uint8_t pipe_num)
163 {
164  USBH_LL_SubmitURB (phost, /* Driver handle */
165  pipe_num, /* Pipe index */
166  1, /* Direction : IN */
167  USBH_EP_CONTROL, /* EP type */
168  USBH_PID_DATA, /* Type Data */
169  buff, /* data buffer */
170  length, /* data length */
171  0);
172  return USBH_OK;
173 
174 }
175 
176 
187  uint8_t *buff,
188  uint16_t length,
189  uint8_t pipe_num,
190  uint8_t do_ping )
191 {
192  if(phost->device.speed != USBH_SPEED_HIGH)
193  {
194  do_ping = 0;
195  }
196 
197  USBH_LL_SubmitURB (phost, /* Driver handle */
198  pipe_num, /* Pipe index */
199  0, /* Direction : IN */
200  USBH_EP_BULK, /* EP type */
201  USBH_PID_DATA, /* Type Data */
202  buff, /* data buffer */
203  length, /* data length */
204  do_ping); /* do ping (HS Only)*/
205  return USBH_OK;
206 }
207 
208 
219  uint8_t *buff,
220  uint16_t length,
221  uint8_t pipe_num)
222 {
223  USBH_LL_SubmitURB (phost, /* Driver handle */
224  pipe_num, /* Pipe index */
225  1, /* Direction : IN */
226  USBH_EP_BULK, /* EP type */
227  USBH_PID_DATA, /* Type Data */
228  buff, /* data buffer */
229  length, /* data length */
230  0);
231  return USBH_OK;
232 }
233 
234 
245  uint8_t *buff,
246  uint8_t length,
247  uint8_t pipe_num)
248 {
249  USBH_LL_SubmitURB (phost, /* Driver handle */
250  pipe_num, /* Pipe index */
251  1, /* Direction : IN */
252  USBH_EP_INTERRUPT, /* EP type */
253  USBH_PID_DATA, /* Type Data */
254  buff, /* data buffer */
255  length, /* data length */
256  0);
257 
258  return USBH_OK;
259 }
260 
271  uint8_t *buff,
272  uint8_t length,
273  uint8_t pipe_num)
274 {
275  USBH_LL_SubmitURB (phost, /* Driver handle */
276  pipe_num, /* Pipe index */
277  0, /* Direction : OUT */
278  USBH_EP_INTERRUPT, /* EP type */
279  USBH_PID_DATA, /* Type Data */
280  buff, /* data buffer */
281  length, /* data length */
282  0);
283 
284  return USBH_OK;
285 }
286 
297  uint8_t *buff,
298  uint32_t length,
299  uint8_t pipe_num)
300 {
301  USBH_LL_SubmitURB (phost, /* Driver handle */
302  pipe_num, /* Pipe index */
303  1, /* Direction : IN */
304  USBH_EP_ISO, /* EP type */
305  USBH_PID_DATA, /* Type Data */
306  buff, /* data buffer */
307  length, /* data length */
308  0);
309 
310 
311  return USBH_OK;
312 }
313 
324  uint8_t *buff,
325  uint32_t length,
326  uint8_t pipe_num)
327 {
328  USBH_LL_SubmitURB (phost, /* Driver handle */
329  pipe_num, /* Pipe index */
330  0, /* Direction : OUT */
331  USBH_EP_ISO, /* EP type */
332  USBH_PID_DATA, /* Type Data */
333  buff, /* data buffer */
334  length, /* data length */
335  0);
336 
337  return USBH_OK;
338 }
355 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
356 
357 
358 
USBH_StatusTypeDef USBH_BulkReceiveData(USBH_HandleTypeDef *phost, uint8_t *buff, uint16_t length, uint8_t pipe_num)
USBH_BulkReceiveData Receives IN bulk packet from device.
Definition: usbh_ioreq.c:218
USBH_StatusTypeDef USBH_IsocSendData(USBH_HandleTypeDef *phost, uint8_t *buff, uint32_t length, uint8_t pipe_num)
USBH_IsocSendData Sends the data on Isochronous OUT Endpoint.
Definition: usbh_ioreq.c:323
USBH_DeviceTypeDef device
Definition: usbh_def.h:456
#define USBH_EP_INTERRUPT
Definition: usbh_ioreq.h:64
#define USBH_PID_SETUP
Definition: usbh_ioreq.h:58
Header file for usbh_ioreq.c.
USBH_StatusTypeDef USBH_BulkSendData(USBH_HandleTypeDef *phost, uint8_t *buff, uint16_t length, uint8_t pipe_num, uint8_t do_ping)
USBH_BulkSendData Sends the Bulk Packet to the device.
Definition: usbh_ioreq.c:186
#define USBH_SETUP_PKT_SIZE
Definition: usbh_ioreq.h:66
#define USBH_EP_CONTROL
Definition: usbh_ioreq.h:61
USBH_StatusTypeDef USBH_IsocReceiveData(USBH_HandleTypeDef *phost, uint8_t *buff, uint32_t length, uint8_t pipe_num)
USBH_IsocReceiveData Receives the Device Response to the Isochronous IN token.
Definition: usbh_ioreq.c:296
#define USBH_PID_DATA
Definition: usbh_ioreq.h:59
#define USBH_EP_ISO
Definition: usbh_ioreq.h:62
USBH_StatusTypeDef USBH_InterruptReceiveData(USBH_HandleTypeDef *phost, uint8_t *buff, uint8_t length, uint8_t pipe_num)
USBH_InterruptReceiveData Receives the Device Response to the Interrupt IN token. ...
Definition: usbh_ioreq.c:244
USBH_StatusTypeDef USBH_CtlSendSetup(USBH_HandleTypeDef *phost, uint8_t *buff, uint8_t pipe_num)
USBH_CtlSendSetup Sends the Setup Packet to the Device.
Definition: usbh_ioreq.c:100
#define USBH_EP_BULK
Definition: usbh_ioreq.h:63
USBH_StatusTypeDef USBH_InterruptSendData(USBH_HandleTypeDef *phost, uint8_t *buff, uint8_t length, uint8_t pipe_num)
USBH_InterruptSendData Sends the data on Interrupt OUT Endpoint.
Definition: usbh_ioreq.c:270
USBH_StatusTypeDef USBH_LL_SubmitURB(USBH_HandleTypeDef *phost, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t *, uint16_t, uint8_t)
USBH_LL_SubmitURB Submit a new URB to the low level driver.
USBH_StatusTypeDef
Definition: usbh_def.h:302
USBH_StatusTypeDef USBH_CtlSendData(USBH_HandleTypeDef *phost, uint8_t *buff, uint16_t length, uint8_t pipe_num, uint8_t do_ping)
USBH_CtlSendData Sends a data Packet to the Device.
Definition: usbh_ioreq.c:126
USBH_StatusTypeDef USBH_CtlReceiveData(USBH_HandleTypeDef *phost, uint8_t *buff, uint16_t length, uint8_t pipe_num)
USBH_CtlReceiveData Receives the Device Response to the Setup Packet.
Definition: usbh_ioreq.c:159