From fce85875c49a7d18115c4f0c2cf91d7f8e5df9d9 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 6 Mar 2018 17:38:35 +0700 Subject: remove tusb_isr(), rename hal_hcd_isr() and hal_dcd_isr() --- hw/mcu/nxp/lpc11uxx/hal_mcu/hal_lpc11uxx.c | 2 +- hw/mcu/nxp/lpc13uxx/hal_mcu/hal_lpc13uxx.c | 2 +- hw/mcu/nxp/lpc175x_6x/hal_mcu/hal_lpc175x_6x.c | 8 +++++++- hw/mcu/nxp/lpc43xx/tusb_port/dcd_lpc43xx.c | 2 +- hw/mcu/nxp/lpc43xx/tusb_port/hal_lpc43xx.c | 18 ++++++++++++++++-- 5 files changed, 26 insertions(+), 6 deletions(-) (limited to 'hw') diff --git a/hw/mcu/nxp/lpc11uxx/hal_mcu/hal_lpc11uxx.c b/hw/mcu/nxp/lpc11uxx/hal_mcu/hal_lpc11uxx.c index c8f5b490b..42f1f524d 100644 --- a/hw/mcu/nxp/lpc11uxx/hal_mcu/hal_lpc11uxx.c +++ b/hw/mcu/nxp/lpc11uxx/hal_mcu/hal_lpc11uxx.c @@ -75,7 +75,7 @@ bool hal_usb_init(void) void USB_IRQHandler(void) { - tusb_isr(0); + hal_dcd_isr(0); } #endif diff --git a/hw/mcu/nxp/lpc13uxx/hal_mcu/hal_lpc13uxx.c b/hw/mcu/nxp/lpc13uxx/hal_mcu/hal_lpc13uxx.c index 2f13a2f98..72d67aa60 100644 --- a/hw/mcu/nxp/lpc13uxx/hal_mcu/hal_lpc13uxx.c +++ b/hw/mcu/nxp/lpc13uxx/hal_mcu/hal_lpc13uxx.c @@ -74,7 +74,7 @@ bool hal_usb_init(void) void USB_IRQHandler(void) { - tusb_isr(0); + hal_dcd_isr(0); } diff --git a/hw/mcu/nxp/lpc175x_6x/hal_mcu/hal_lpc175x_6x.c b/hw/mcu/nxp/lpc175x_6x/hal_mcu/hal_lpc175x_6x.c index 5007217d6..0bb9c5411 100644 --- a/hw/mcu/nxp/lpc175x_6x/hal_mcu/hal_lpc175x_6x.c +++ b/hw/mcu/nxp/lpc175x_6x/hal_mcu/hal_lpc175x_6x.c @@ -102,7 +102,13 @@ bool hal_usb_init(void) void USB_IRQHandler(void) { - tusb_isr(0); + #if MODE_HOST_SUPPORTED + hal_hcd_isr(0); + #endif + + #if MODE_DEVICE_SUPPORTED + hal_dcd_isr(0); + #endif } #endif diff --git a/hw/mcu/nxp/lpc43xx/tusb_port/dcd_lpc43xx.c b/hw/mcu/nxp/lpc43xx/tusb_port/dcd_lpc43xx.c index cc34a2cec..666369c1d 100644 --- a/hw/mcu/nxp/lpc43xx/tusb_port/dcd_lpc43xx.c +++ b/hw/mcu/nxp/lpc43xx/tusb_port/dcd_lpc43xx.c @@ -512,7 +512,7 @@ void xfer_complete_isr(uint8_t coreid, uint32_t reg_complete) } } -void dcd_isr(uint8_t coreid) +void hal_dcd_isr(uint8_t coreid) { LPC_USB0_Type* const lpc_usb = LPC_USB[coreid]; diff --git a/hw/mcu/nxp/lpc43xx/tusb_port/hal_lpc43xx.c b/hw/mcu/nxp/lpc43xx/tusb_port/hal_lpc43xx.c index dd154d2e4..71b2f19ed 100644 --- a/hw/mcu/nxp/lpc43xx/tusb_port/hal_lpc43xx.c +++ b/hw/mcu/nxp/lpc43xx/tusb_port/hal_lpc43xx.c @@ -127,17 +127,31 @@ bool hal_usb_init(void) return true; } +void hal_dcd_isr(uint8_t coreid); + #if TUSB_CFG_CONTROLLER_0_MODE void USB0_IRQHandler(void) { - tusb_isr(0); + #if MODE_HOST_SUPPORTED + hal_hcd_isr(0); + #endif + + #if MODE_DEVICE_SUPPORTED + hal_dcd_isr(0); + #endif } #endif #if TUSB_CFG_CONTROLLER_1_MODE void USB1_IRQHandler(void) { - tusb_isr(1); + #if MODE_HOST_SUPPORTED + hal_hcd_isr(1); + #endif + + #if MODE_DEVICE_SUPPORTED + hal_dcd_isr(1); + #endif } #endif -- cgit v1.3.1