1 /**
2 **************************************************************************
3 * @file usbh_int.c
4 * @brief usb host interrupt request
5 **************************************************************************
6 * Copyright notice & Disclaimer
7 *
8 * The software Board Support Package (BSP) that is made available to
9 * download from Artery official website is the copyrighted work of Artery.
10 * Artery authorizes customers to use, copy, and distribute the BSP
11 * software and its related documentation for the purpose of design and
12 * development in conjunction with Artery microcontrollers. Use of the
13 * software is governed by this copyright notice and the following disclaimer.
14 *
15 * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES,
16 * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS,
17 * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR
18 * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS,
19 * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
21 *
22 **************************************************************************
23 */
24 #include "usbh_int.h"
25
26 #ifdef USE_OTG_HOST_MODE
27
28 /** @defgroup USBH_drivers_interrupt
29 * @brief usb host interrupt
30 * @{
31 */
32
33 /** @defgroup USBH_int_private_functions
34 * @{
35 */
36
37 /**
38 * @brief usb host interrupt handler
39 * @param otgdev: to the structure of otg_core_type
40 * @retval none
41 */
usbh_irq_handler(otg_core_type * otgdev)42 void usbh_irq_handler(otg_core_type *otgdev)
43 {
44 otg_global_type *usbx = otgdev->usb_reg;
45 usbh_core_type *uhost = &otgdev->host;
46 uint32_t intsts = usb_global_get_all_interrupt(usbx);
47
48 if(usbx->gintsts_bit.curmode == 1)
49 {
50 if(intsts & USB_OTG_HCH_FLAG)
51 {
52 usbh_hch_handler(uhost);
53 usb_global_clear_interrupt(usbx, USB_OTG_HCH_FLAG);
54 }
55 if(intsts & USB_OTG_SOF_FLAG)
56 {
57 usbh_sof_handler(uhost);
58 usb_global_clear_interrupt(usbx, USB_OTG_SOF_FLAG);
59 }
60 if(intsts & USB_OTG_MODEMIS_FLAG)
61 {
62 usb_global_clear_interrupt(usbx, USB_OTG_MODEMIS_FLAG);
63 }
64 if(intsts & USB_OTG_WKUP_FLAG)
65 {
66 usbh_wakeup_handler(uhost);
67 usb_global_clear_interrupt(usbx, USB_OTG_WKUP_FLAG);
68 }
69 while(usbx->gintsts & USB_OTG_RXFLVL_FLAG)
70 {
71 usbh_rx_qlvl_handler(uhost);
72 usb_global_clear_interrupt(usbx, USB_OTG_RXFLVL_FLAG);
73 }
74 if(intsts & USB_OTG_DISCON_FLAG)
75 {
76 usbh_disconnect_handler(uhost);
77 usb_global_clear_interrupt(usbx, USB_OTG_DISCON_FLAG);
78 }
79 if(intsts & USB_OTG_PRT_FLAG)
80 {
81 usbh_port_handler(uhost);
82 }
83 if(intsts & USB_OTG_INCOMPIP_INCOMPISOOUT_FLAG)
84 {
85 usb_global_clear_interrupt(usbx, USB_OTG_INCOMPIP_INCOMPISOOUT_FLAG);
86 }
87 if(intsts & USB_OTG_INCOMISOIN_FLAG)
88 {
89 usb_global_clear_interrupt(usbx, USB_OTG_INCOMISOIN_FLAG);
90 }
91 if(intsts & USB_OTG_PTXFEMP_FLAG)
92 {
93 usb_global_clear_interrupt(usbx, USB_OTG_PTXFEMP_FLAG);
94 }
95 if(intsts & USB_OTG_ISOOUTDROP_FLAG)
96 {
97 usb_global_clear_interrupt(usbx, USB_OTG_ISOOUTDROP_FLAG);
98 }
99
100 }
101 }
102
103 /**
104 * @brief usb host wakeup handler
105 * @param uhost: to the structure of usbh_core_type
106 * @retval none
107 */
usbh_wakeup_handler(usbh_core_type * uhost)108 void usbh_wakeup_handler(usbh_core_type *uhost)
109 {
110 uhost->global_state = USBH_WAKEUP;
111 }
112
113 /**
114 * @brief usb host sof handler
115 * @param uhost: to the structure of usbh_core_type
116 * @retval none
117 */
usbh_sof_handler(usbh_core_type * uhost)118 void usbh_sof_handler(usbh_core_type *uhost)
119 {
120 uhost->timer ++;
121 }
122
123 /**
124 * @brief usb host disconnect handler
125 * @param uhost: to the structure of usbh_core_type
126 * @retval none
127 */
usbh_disconnect_handler(usbh_core_type * uhost)128 void usbh_disconnect_handler(usbh_core_type *uhost)
129 {
130 otg_global_type *usbx = uhost->usb_reg;
131
132 uint8_t i_index;
133
134 usb_host_disable(usbx);
135
136 uhost->conn_sts = 0;
137
138 uhost->global_state = USBH_DISCONNECT;
139
140 for(i_index = 0; i_index < USB_HOST_CHANNEL_NUM; i_index ++)
141 {
142 usbh_free_channel(uhost, i_index);
143 }
144 usbh_fsls_clksel(usbx, USB_HCFG_CLK_48M);
145
146 usbh_disconnect_callback(uhost);
147 }
148
149 /**
150 * @brief usb host in transfer request handler
151 * @param uhost: to the structure of usbh_core_type
152 * @param chn: channel number
153 * @retval none
154 */
usbh_hch_in_handler(usbh_core_type * uhost,uint8_t chn)155 void usbh_hch_in_handler(usbh_core_type *uhost, uint8_t chn)
156 {
157 otg_global_type *usbx = uhost->usb_reg;
158 otg_hchannel_type *usb_chh = USB_CHL(usbx, chn);
159 uint32_t hcint_value = usb_chh->hcint & usb_chh->hcintmsk;
160
161 if( hcint_value & USB_OTG_HC_ACK_FLAG)
162 {
163 usb_chh->hcint = USB_OTG_HC_ACK_FLAG;
164 }
165 else if(hcint_value & USB_OTG_HC_STALL_FLAG)
166 {
167 usb_chh->hcintmsk_bit.chhltdmsk = TRUE;
168 usb_chh->hcint = USB_OTG_HC_NAK_FLAG | USB_OTG_HC_STALL_FLAG;
169 uhost->hch[chn].state = HCH_STALL;
170 usb_hch_halt(usbx, chn);
171 }
172 else if(hcint_value & USB_OTG_HC_DTGLERR_FLAG)
173 {
174 usb_chh->hcintmsk_bit.chhltdmsk = TRUE;
175 usb_hch_halt(usbx, chn);
176 usb_chh->hcint = USB_OTG_HC_DTGLERR_FLAG | USB_OTG_HC_NAK_FLAG;
177 uhost->hch[chn].state = HCH_DATATGLERR;
178 }
179
180 else if(hcint_value & USB_OTG_HC_FRMOVRRUN_FLAG)
181 {
182 usb_chh->hcintmsk_bit.chhltdmsk = TRUE;
183 usb_hch_halt(usbx, chn);
184 usb_chh->hcint = USB_OTG_HC_FRMOVRRUN_FLAG;
185 }
186 else if(hcint_value & USB_OTG_HC_XFERC_FLAG)
187 {
188 uhost->hch[chn].state = HCH_XFRC;
189 uhost->err_cnt[chn] = 0;
190 if(uhost->dma_en == TRUE)
191 {
192 uhost->hch[chn].trans_count = uhost->hch[chn].trans_len - usb_chh->hctsiz_bit.xfersize;
193 }
194 usb_chh->hcint = USB_OTG_HC_XFERC_FLAG;
195
196 if(usb_chh->hcchar_bit.eptype == EPT_BULK_TYPE || usb_chh->hcchar_bit.eptype == EPT_CONTROL_TYPE)
197 {
198 usb_chh->hcintmsk_bit.chhltdmsk = TRUE;
199 usb_hch_halt(usbx, chn);
200 usb_chh->hcint = USB_OTG_HC_NAK_FLAG;
201 }
202 else if(usb_chh->hcchar_bit.eptype == EPT_INT_TYPE)
203 {
204 usb_chh->hcchar_bit.oddfrm = TRUE;
205 uhost->urb_state[chn] = URB_DONE;
206
207 usbd_notify_urbchange_callback(uhost, chn, uhost->urb_state[chn]);
208 }
209 else if(usb_chh->hcchar_bit.eptype == EPT_ISO_TYPE)
210 {
211 uhost->urb_state[chn] = URB_DONE;
212 usbd_notify_urbchange_callback(uhost, chn, uhost->urb_state[chn]);
213 }
214 if(uhost->dma_en == TRUE)
215 {
216 if(((uhost->hch[chn].trans_len / uhost->hch[chn].maxpacket) & 1) != 0)
217 {
218 uhost->hch[chn].toggle_in ^= 1;
219 }
220 }
221 else
222 {
223 uhost->hch[chn].toggle_in ^= 1;
224 }
225 }
226 else if(hcint_value & USB_OTG_HC_CHHLTD_FLAG)
227 {
228 usb_chh->hcintmsk_bit.chhltdmsk = FALSE;
229 if(uhost->hch[chn].state == HCH_XFRC )
230 {
231 uhost->urb_state[chn] = URB_DONE;
232 }
233 else if(uhost->hch[chn].state == HCH_STALL)
234 {
235 uhost->urb_state[chn] = URB_STALL;
236 }
237 else if(uhost->hch[chn].state == HCH_XACTERR ||
238 uhost->hch[chn].state == HCH_DATATGLERR)
239 {
240 uhost->err_cnt[chn] ++;
241 if(uhost->err_cnt[chn] > 3)
242 {
243 uhost->urb_state[chn] = URB_ERROR;
244 uhost->err_cnt[chn] = 0;
245 }
246 else
247 {
248 uhost->urb_state[chn] = URB_NOTREADY;
249 }
250 usb_chh->hcchar_bit.chdis = FALSE;
251 usb_chh->hcchar_bit.chena = TRUE;
252 }
253 else if(uhost->hch[chn].state == HCH_NAK)
254 {
255 if(usb_chh->hcchar_bit.eptype != EPT_INT_TYPE)
256 {
257 usb_chh->hcchar_bit.chdis = FALSE;
258 usb_chh->hcchar_bit.chena = TRUE;
259 }
260 uhost->urb_state[chn] = URB_NOTREADY;
261 }
262 usb_chh->hcint = USB_OTG_HC_CHHLTD_FLAG;
263 usbd_notify_urbchange_callback(uhost, chn, uhost->urb_state[chn]);
264 }
265 else if(hcint_value & USB_OTG_HC_XACTERR_FLAG)
266 {
267 usb_chh->hcintmsk_bit.chhltdmsk = TRUE;
268 uhost->hch[chn].state = HCH_XACTERR;
269 usb_hch_halt(usbx, chn);
270 uhost->err_cnt[chn] ++;
271 usb_chh->hcint = USB_OTG_HC_XACTERR_FLAG;
272 }
273 else if(hcint_value & USB_OTG_HC_NAK_FLAG)
274 {
275 if(usb_chh->hcchar_bit.eptype == EPT_INT_TYPE)
276 {
277 uhost->err_cnt[chn] = 0;
278 if(uhost->dma_en == FALSE)
279 {
280 usb_chh->hcintmsk_bit.chhltdmsk = TRUE;
281 usb_hch_halt(usbx, chn);
282 }
283 }
284 else if(usb_chh->hcchar_bit.eptype == EPT_BULK_TYPE ||
285 usb_chh->hcchar_bit.eptype == EPT_CONTROL_TYPE)
286 {
287 uhost->err_cnt[chn] = 0;
288 if(uhost->dma_en == FALSE)
289 {
290 usb_chh->hcintmsk_bit.chhltdmsk = TRUE;
291 usb_hch_halt(usbx, chn);
292 }
293 }
294 uhost->hch[chn].state = HCH_NAK;
295 usb_chh->hcint = USB_OTG_HC_NAK_FLAG;
296 }
297 else if(hcint_value & USB_OTG_HC_BBLERR_FLAG)
298 {
299 usb_chh->hcint = USB_OTG_HC_BBLERR_FLAG;
300 }
301 }
302
303 /**
304 * @brief usb host out transfer request handler
305 * @param uhost: to the structure of usbh_core_type
306 * @param chn: channel number
307 * @retval none
308 */
usbh_hch_out_handler(usbh_core_type * uhost,uint8_t chn)309 void usbh_hch_out_handler(usbh_core_type *uhost, uint8_t chn)
310 {
311 otg_global_type *usbx = uhost->usb_reg;
312 otg_hchannel_type *usb_chh = USB_CHL(usbx, chn);
313 uint32_t hcint_value = usb_chh->hcint & usb_chh->hcintmsk;
314
315 if( hcint_value & USB_OTG_HC_ACK_FLAG)
316 {
317 usb_chh->hcint = USB_OTG_HC_ACK_FLAG;
318 #if defined (SOC_SERIES_AT32F402) || defined (SOC_SERIES_AT32F405)
319 if(uhost->hch[chn].do_ping == TRUE)
320 {
321 uhost->urb_state[chn] = URB_NOTREADY;
322 uhost->hch[chn].do_ping = FALSE;
323 usb_chh->hcintmsk_bit.chhltdmsk = TRUE;
324 usb_hch_halt(usbx, chn);
325 }
326 #endif
327 }
328 else if( hcint_value & USB_OTG_HC_FRMOVRRUN_FLAG)
329 {
330 usb_chh->hcintmsk_bit.chhltdmsk = TRUE;
331 usb_hch_halt(usbx, chn);
332 usb_chh->hcint = USB_OTG_HC_FRMOVRRUN_FLAG;
333 }
334 else if( hcint_value & USB_OTG_HC_XFERC_FLAG)
335 {
336 usb_chh->hcintmsk_bit.chhltdmsk = TRUE;
337 uhost->err_cnt[chn] = 0;
338
339 if(usb_chh->hcint & USB_OTG_HC_NYET_FLAG)
340 {
341 #if defined (SOC_SERIES_AT32F402) || defined (SOC_SERIES_AT32F405)
342 uhost->hch[chn].do_ping = TRUE;
343 #endif
344 usb_chh->hcint = USB_OTG_HC_NYET_FLAG;
345 }
346 usb_hch_halt(usbx, chn);
347 uhost->hch[chn].state = HCH_XFRC;
348 usb_chh->hcint = USB_OTG_HC_XFERC_FLAG;
349 }
350 else if( hcint_value & USB_OTG_HC_STALL_FLAG)
351 {
352 usb_chh->hcintmsk_bit.chhltdmsk = TRUE;
353 usb_chh->hcint = USB_OTG_HC_STALL_FLAG;
354 uhost->hch[chn].state = HCH_STALL;
355 usb_hch_halt(usbx, chn);
356 }
357 else if(hcint_value & USB_OTG_HC_NYET_FLAG)
358 {
359 #if defined (SOC_SERIES_AT32F402) || defined (SOC_SERIES_AT32F405)
360 uhost->hch[chn].do_ping = TRUE;
361 #endif
362 uhost->err_cnt[chn] = 0;
363 usb_chh->hcintmsk_bit.chhltdmsk = TRUE;
364 usb_hch_halt(usbx, chn);
365 uhost->hch[chn].state = HCH_NYET;
366 usb_chh->hcint = USB_OTG_HC_NYET_FLAG;
367 }
368 else if( hcint_value & USB_OTG_HC_DTGLERR_FLAG)
369 {
370 usb_chh->hcintmsk_bit.chhltdmsk = TRUE;
371 usb_hch_halt(usbx, chn);
372 usb_chh->hcint = USB_OTG_HC_DTGLERR_FLAG | USB_OTG_HC_NAK_FLAG;
373 uhost->hch[chn].state = HCH_DATATGLERR;
374 }
375 else if( hcint_value & USB_OTG_HC_CHHLTD_FLAG)
376 {
377 usb_chh->hcintmsk_bit.chhltdmsk = FALSE;
378 if(uhost->hch[chn].state == HCH_XFRC)
379 {
380 uhost->urb_state[chn] = URB_DONE;
381 if(uhost->hch[chn].ept_type == EPT_BULK_TYPE ||
382 uhost->hch[chn].ept_type == EPT_INT_TYPE)
383 {
384 uhost->hch[chn].toggle_out ^= 1;
385 }
386 }
387 else if(uhost->hch[chn].state == HCH_NAK || uhost->hch[chn].state == HCH_NYET)
388 {
389 uhost->urb_state[chn] = URB_NOTREADY;
390 }
391 else if(uhost->hch[chn].state == HCH_STALL)
392 {
393 uhost->hch[chn].urb_sts = URB_STALL;
394 }
395 else if(uhost->hch[chn].state == HCH_XACTERR ||
396 uhost->hch[chn].state == HCH_DATATGLERR)
397 {
398 uhost->err_cnt[chn] ++;
399 if(uhost->err_cnt[chn] > 3)
400 {
401 uhost->urb_state[chn] = URB_ERROR;
402 uhost->err_cnt[chn] = 0;
403 usbd_notify_urbchange_callback(uhost, chn, uhost->urb_state[chn]);
404 }
405 else
406 {
407 uhost->urb_state[chn] = URB_NOTREADY;
408 }
409
410 usb_chh->hcchar_bit.chdis = FALSE;
411 usb_chh->hcchar_bit.chena = TRUE;
412 }
413 usb_chh->hcint = USB_OTG_HC_CHHLTD_FLAG;
414 usbd_notify_urbchange_callback(uhost, chn, uhost->urb_state[chn]);
415 }
416 else if( hcint_value & USB_OTG_HC_XACTERR_FLAG)
417 {
418 if(uhost->dma_en == TRUE)
419 {
420 uhost->err_cnt[chn] ++;
421 if(uhost->err_cnt[chn] > 2)
422 {
423 uhost->urb_state[chn] = URB_ERROR;
424 uhost->err_cnt[chn] = 0;
425 }
426 else
427 {
428 uhost->urb_state[chn] = URB_NOTREADY;
429 }
430 }
431 else
432 {
433 usb_chh->hcintmsk_bit.chhltdmsk = TRUE;
434 uhost->err_cnt[chn] ++;
435 uhost->hch[chn].state = HCH_XACTERR;
436 usb_hch_halt(usbx, chn);
437 }
438 usb_chh->hcint = USB_OTG_HC_XACTERR_FLAG;
439 }
440 else if( hcint_value & USB_OTG_HC_NAK_FLAG)
441 {
442 usb_chh->hcintmsk_bit.chhltdmsk = TRUE;
443 uhost->err_cnt[chn] = 0;
444 usb_hch_halt(usbx, chn);
445 uhost->hch[chn].state = HCH_NAK;
446 usb_chh->hcint = USB_OTG_HC_NAK_FLAG;
447 #if defined (SOC_SERIES_AT32F402) || defined (SOC_SERIES_AT32F405)
448 if(uhost->hch[chn].do_ping == 0)
449 {
450 if(uhost->hch[chn].speed == USB_PRTSPD_HIGH_SPEED)
451 {
452 uhost->hch[chn].do_ping = 1;
453 }
454 }
455 #endif
456 }
457 }
458
459 /**
460 * @brief usb host channel request handler
461 * @param uhost: to the structure of usbh_core_type
462 * @retval none
463 */
usbh_hch_handler(usbh_core_type * uhost)464 void usbh_hch_handler(usbh_core_type *uhost)
465 {
466 otg_global_type *usbx = uhost->usb_reg;
467 otg_host_type *usb_host = OTG_HOST(usbx);
468 uint32_t intsts, i_index;
469
470 intsts = usb_host->haint & 0xFFFF;
471 for(i_index = 0; i_index < 16; i_index ++)
472 {
473 if(intsts & (1 << i_index))
474 {
475 if(USB_CHL(usbx, i_index)->hcchar_bit.eptdir)
476 {
477 //hc in
478 usbh_hch_in_handler(uhost, i_index);
479 }
480 else
481 {
482 //hc out
483 usbh_hch_out_handler(uhost, i_index);
484 }
485 }
486 }
487 }
488
489 /**
490 * @brief usb host rx buffer not empty request handler
491 * @param uhost: to the structure of usbh_core_type
492 * @retval none
493 */
usbh_rx_qlvl_handler(usbh_core_type * uhost)494 void usbh_rx_qlvl_handler(usbh_core_type *uhost)
495 {
496 uint8_t chn;
497 uint32_t pktsts;
498 uint32_t pktcnt;
499 uint32_t tmp;
500 otg_hchannel_type *ch;
501 otg_global_type *usbx = uhost->usb_reg;
502
503 usbx->gintmsk_bit.rxflvlmsk = 0;
504
505 tmp = usbx->grxstsp;
506 chn = tmp & 0xF;
507 pktsts = (tmp >> 17) & 0xF;
508 pktcnt = (tmp >> 4) & 0x7FF;
509 ch = USB_CHL(usbx, chn);
510 switch(pktsts)
511 {
512 case PKTSTS_IN_DATA_PACKET_RECV:
513 if(pktcnt > 0 && (uhost->hch[chn].trans_buf) != 0)
514 {
515 usb_read_packet(usbx, uhost->hch[chn].trans_buf, chn, pktcnt);
516 uhost->hch[chn].trans_buf += pktcnt;
517 uhost->hch[chn].trans_count += pktcnt;
518
519 if(ch->hctsiz_bit.pktcnt > 0)
520 {
521 ch->hcchar_bit.chdis = FALSE;
522 ch->hcchar_bit.chena = TRUE;
523 uhost->hch[chn].toggle_in ^= 1;
524 }
525 }
526 break;
527 case PKTSTS_IN_TRANSFER_COMPLETE:
528 break;
529 case PKTSTS_DATA_BIT_ERROR:
530 break;
531 case PKTSTS_CHANNEL_STOP:
532 break;
533 default:
534 break;
535
536 }
537 usbx->gintmsk_bit.rxflvlmsk = 1;
538 }
539
540 /**
541 * @brief usb host port request handler
542 * @param uhost: to the structure of usbh_core_type
543 * @retval none
544 */
usbh_port_handler(usbh_core_type * uhost)545 void usbh_port_handler(usbh_core_type *uhost)
546 {
547 otg_global_type *usbx = uhost->usb_reg;
548 otg_host_type *usb_host = OTG_HOST(usbx);
549
550 uint32_t prt = 0, prt_0;
551
552 prt = usb_host->hprt;
553 prt_0 = prt;
554
555 prt_0 &= ~(USB_OTG_HPRT_PRTENA | USB_OTG_HPRT_PRTENCHNG |
556 USB_OTG_HPRT_PRTOVRCACT | USB_OTG_HPRT_PRTCONDET);
557 if(prt & USB_OTG_HPRT_PRTCONDET)
558 {
559 if(prt & USB_OTG_HPRT_PRTCONSTS)
560 {
561 /* connect callback */
562 uhost->conn_sts = 1;
563 }
564
565 usbh_connect_callback(uhost);
566 prt_0 |= USB_OTG_HPRT_PRTCONDET;
567 }
568
569 if(prt & USB_OTG_HPRT_PRTENCHNG)
570 {
571 prt_0 |= USB_OTG_HPRT_PRTENCHNG;
572
573 if(prt & USB_OTG_HPRT_PRTENA)
574 {
575 if((prt & USB_OTG_HPRT_PRTSPD) == (USB_PRTSPD_LOW_SPEED << 17))
576 {
577 usbh_fsls_clksel(usbx, USB_HCFG_CLK_6M);
578 }
579 else if((prt & USB_OTG_HPRT_PRTSPD) == (USB_PRTSPD_FULL_SPEED << 17))
580 {
581 usbh_fsls_clksel(usbx, USB_HCFG_CLK_48M);
582 }
583 else
584 {
585 usbh_fsls_clksel(usbx, USB_HCFG_CLK_60M);
586 }
587 /* connect callback */
588 uhost->port_enable = 1;
589 }
590 else
591 {
592 /* clean up hprt */
593 uhost->port_enable = 0;
594 }
595 }
596
597 if(prt & USB_OTG_HPRT_PRTOVRCACT)
598 {
599 prt_0 |= USB_OTG_HPRT_PRTOVRCACT;
600 }
601
602 usb_host->hprt = prt_0;
603 }
604
usbh_connect_callback(usbh_core_type * uhost)605 rt_weak void usbh_connect_callback(usbh_core_type *uhost)
606 {
607 }
608
usbh_disconnect_callback(usbh_core_type * uhost)609 rt_weak void usbh_disconnect_callback(usbh_core_type *uhost)
610 {
611 }
612
usbd_notify_urbchange_callback(usbh_core_type * uhost,uint8_t chnum,urb_sts_type sts)613 rt_weak void usbd_notify_urbchange_callback(usbh_core_type *uhost, uint8_t chnum, urb_sts_type sts)
614 {
615 }
616
617 /**
618 * @}
619 */
620
621 /**
622 * @}
623 */
624
625 #endif
626