From 36ccd9f43a5e090bdf1796f121e155b3a8135fbe Mon Sep 17 00:00:00 2001 From: Austin Morton Date: Tue, 18 Jul 2017 01:01:16 -0400 Subject: implement _ptxfe_int to support ISO and INT out transfers --- os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'os/hal/ports/STM32/LLD/USBHv1') diff --git a/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c b/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c index 2894907..226f1bb 100644 --- a/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c +++ b/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c @@ -1172,9 +1172,17 @@ static inline void _nptxfe_int(USBHDriver *host) { } static inline void _ptxfe_int(USBHDriver *host) { - //TODO: implement - (void)host; - uinfo("PTXFE"); + uint32_t rem; + stm32_otg_t *const otg = host->otg; + + rem = _write_packet(&host->ep_active_lists[USBH_EPTYPE_ISO], + otg->HPTXSTS & HPTXSTS_PTXFSAVL_MASK); + + rem += _write_packet(&host->ep_active_lists[USBH_EPTYPE_INT], + otg->HPTXSTS & HPTXSTS_PTXFSAVL_MASK); + + if (!rem) + otg->GINTMSK &= ~GINTMSK_PTXFEM; } static void _disable(USBHDriver *host) { -- cgit v1.2.3