From d2269527b744e0ab249d38663436613158b0a282 Mon Sep 17 00:00:00 2001 From: Mark Harris Date: Tue, 12 Sep 2017 16:55:01 +0200 Subject: implement ptxfe_int for outbound INT ep --- os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c | 18 +++++++++++++++--- 1 file changed, 15 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 4723508..05054d0 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,21 @@ static inline void _nptxfe_int(USBHDriver *host) { } static inline void _ptxfe_int(USBHDriver *host) { - //TODO: implement - (void)host; - uinfo("PTXFE"); + // //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_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) { -- cgit v1.2.3 From f5f3c8ffdb666682868c0280995f2a5fb8c62aa3 Mon Sep 17 00:00:00 2001 From: Mark Harris Date: Thu, 14 Sep 2017 14:41:28 +0200 Subject: usbh:_ptxfe_int, use HPTXSTS, introduce usbhSyncrhonousTransfer --- os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c | 10 +++------- 1 file changed, 3 insertions(+), 7 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 05054d0..0403eae 100644 --- a/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c +++ b/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c @@ -1172,18 +1172,14 @@ 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_CTRL], - otg->HNPTXSTS & HPTXSTS_PTXFSAVL_MASK); + 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->HNPTXSTS & HPTXSTS_PTXFSAVL_MASK); + otg->HPTXSTS & HPTXSTS_PTXFSAVL_MASK); if (!rem) otg->GINTMSK &= ~GINTMSK_PTXFEM; -- cgit v1.2.3 From eb10a7d52faa133a699d859322246f654ccd9042 Mon Sep 17 00:00:00 2001 From: Diego Ismirlian Date: Sun, 29 Sep 2019 19:31:05 -0300 Subject: Update copyright --- os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c | 2 +- os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.h | 2 +- 2 files changed, 2 insertions(+), 2 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 192b008..787a831 100644 --- a/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c +++ b/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c @@ -1,6 +1,6 @@ /* ChibiOS - Copyright (C) 2006..2017 Giovanni Di Sirio - Copyright (C) 2015..2017 Diego Ismirlian, (dismirlian (at) google's mail) + Copyright (C) 2015..2019 Diego Ismirlian, (dismirlian(at)google's mail) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.h b/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.h index fd7f4e0..bb92ede 100644 --- a/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.h +++ b/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.h @@ -1,6 +1,6 @@ /* ChibiOS - Copyright (C) 2006..2017 Giovanni Di Sirio - Copyright (C) 2015..2017 Diego Ismirlian, (dismirlian (at) google's mail) + Copyright (C) 2015..2019 Diego Ismirlian, (dismirlian(at)google's mail) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -- cgit v1.2.3