aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorAustin Morton <austinpmorton@gmail.com>2017-07-18 01:01:16 -0400
committerAustin Morton <austinpmorton@gmail.com>2018-10-01 17:53:07 -0400
commit36ccd9f43a5e090bdf1796f121e155b3a8135fbe (patch)
treeced3fdfa7c77c233858872164192d2a0f0f1bb99 /os
parent4344e6d1797b35dfb13a86c4cc8dcfe404b39910 (diff)
downloadChibiOS-Contrib-36ccd9f43a5e090bdf1796f121e155b3a8135fbe.tar.gz
ChibiOS-Contrib-36ccd9f43a5e090bdf1796f121e155b3a8135fbe.tar.bz2
ChibiOS-Contrib-36ccd9f43a5e090bdf1796f121e155b3a8135fbe.zip
implement _ptxfe_int to support ISO and INT out transfers
Diffstat (limited to 'os')
-rw-r--r--os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c14
1 files changed, 11 insertions, 3 deletions
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) {