implement ptxfe_int for outbound INT ep
This commit is contained in:
parent
354313f408
commit
d2269527b7
|
@ -1172,9 +1172,21 @@ static inline void _nptxfe_int(USBHDriver *host) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void _ptxfe_int(USBHDriver *host) {
|
static inline void _ptxfe_int(USBHDriver *host) {
|
||||||
//TODO: implement
|
// //TODO: implement
|
||||||
(void)host;
|
// (void)host;
|
||||||
uinfo("PTXFE");
|
// uinfo("PTXFE");
|
||||||
|
|
||||||
|
uint32_t rem;
|
||||||
|
stm32_otg_t *const otg = host->otg;
|
||||||
|
|
||||||
|
rem = _write_packet(&host->ep_active_lists[USBH_EPTYPE_CTRL],
|
||||||
|
otg->HNPTXSTS & HPTXSTS_PTXFSAVL_MASK);
|
||||||
|
|
||||||
|
rem += _write_packet(&host->ep_active_lists[USBH_EPTYPE_INT],
|
||||||
|
otg->HNPTXSTS & HPTXSTS_PTXFSAVL_MASK);
|
||||||
|
|
||||||
|
if (!rem)
|
||||||
|
otg->GINTMSK &= ~GINTMSK_PTXFEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _disable(USBHDriver *host) {
|
static void _disable(USBHDriver *host) {
|
||||||
|
|
|
@ -338,7 +338,7 @@ usbh_urbstatus_t usbhBulkTransfer(usbh_ep_t *ep,
|
||||||
|
|
||||||
osalDbgCheck(ep != NULL);
|
osalDbgCheck(ep != NULL);
|
||||||
osalDbgCheck((data != NULL) || (len == 0));
|
osalDbgCheck((data != NULL) || (len == 0));
|
||||||
osalDbgAssert(ep->type == USBH_EPTYPE_BULK, "wrong ep");
|
// osalDbgAssert(ep->type == USBH_EPTYPE_BULK, "wrong ep");
|
||||||
|
|
||||||
usbh_urb_t urb;
|
usbh_urb_t urb;
|
||||||
usbhURBObjectInit(&urb, ep, 0, 0, data, len);
|
usbhURBObjectInit(&urb, ep, 0, 0, data, len);
|
||||||
|
|
Loading…
Reference in New Issue