From f3a88477dc39a5eccc8d4de61d8943ace2b74e44 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 30 Jun 2020 16:18:43 +0700 Subject: [PATCH] revert rhport config in nxp mcus --- hw/bsp/ea4357/ea4357.c | 8 ++++---- hw/bsp/mcb1800/mcb1800.c | 8 ++++---- hw/bsp/mimxrt1050_evkb/mimxrt1050_evkb.c | 4 ++-- hw/bsp/mimxrt1060_evk/mimxrt1060_evk.c | 4 ++-- hw/bsp/mimxrt1064_evk/mimxrt1064_evk.c | 4 ++-- hw/bsp/ngx4330/ngx4330.c | 8 ++++---- hw/bsp/teensy_40/teensy40.c | 4 ++-- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/hw/bsp/ea4357/ea4357.c b/hw/bsp/ea4357/ea4357.c index 04c4e60a6..b7e7f7a5c 100644 --- a/hw/bsp/ea4357/ea4357.c +++ b/hw/bsp/ea4357/ea4357.c @@ -149,7 +149,7 @@ void board_init(void) * status feedback from the distribution switch. GPIO54 is used for VBUS sensing. 15Kohm pull-down * resistors are always active */ -#if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE | OPT_MODE_HOST) +#if CFG_TUSB_RHPORT0_MODE Chip_USB0_Init(); // // Reset controller @@ -185,7 +185,7 @@ void board_init(void) * of VBUS can be read via U31. * JP16 shall not be inserted. */ -#if CFG_TUSB_RHPORT0_MODE & ((OPT_MODE_DEVICE | OPT_MODE_HOST) << 8) +#if CFG_TUSB_RHPORT1_MODE Chip_USB1_Init(); // // Reset controller @@ -232,11 +232,11 @@ void USB0_IRQHandler(void) void USB1_IRQHandler(void) { - #if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_HOST << 8) + #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_HOST tuh_isr(1); #endif - #if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE << 8) + #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE tud_int_handler(1); #endif } diff --git a/hw/bsp/mcb1800/mcb1800.c b/hw/bsp/mcb1800/mcb1800.c index 6387f983e..ae9f1b62f 100644 --- a/hw/bsp/mcb1800/mcb1800.c +++ b/hw/bsp/mcb1800/mcb1800.c @@ -43,11 +43,11 @@ void USB0_IRQHandler(void) void USB1_IRQHandler(void) { - #if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_HOST << 8) + #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_HOST tuh_isr(1); #endif - #if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE << 8) + #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE tud_int_handler(1); #endif } @@ -163,7 +163,7 @@ void board_init(void) }; // USB0 -#if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE | OPT_MODE_HOST) +#if CFG_TUSB_RHPORT0_MODE Chip_USB0_Init(); // // Reset controller @@ -180,7 +180,7 @@ void board_init(void) #endif // USB1 -#if CFG_TUSB_RHPORT0_MODE & ((OPT_MODE_DEVICE | OPT_MODE_HOST) << 8) +#if CFG_TUSB_RHPORT1_MODE Chip_USB1_Init(); // // Reset controller diff --git a/hw/bsp/mimxrt1050_evkb/mimxrt1050_evkb.c b/hw/bsp/mimxrt1050_evkb/mimxrt1050_evkb.c index 8dae7a0c2..be0ae3ea8 100644 --- a/hw/bsp/mimxrt1050_evkb/mimxrt1050_evkb.c +++ b/hw/bsp/mimxrt1050_evkb/mimxrt1050_evkb.c @@ -134,11 +134,11 @@ void USB_OTG1_IRQHandler(void) void USB_OTG2_IRQHandler(void) { - #if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_HOST << 8) + #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_HOST tuh_isr(1); #endif - #if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE << 8) + #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE tud_int_handler(1); #endif } diff --git a/hw/bsp/mimxrt1060_evk/mimxrt1060_evk.c b/hw/bsp/mimxrt1060_evk/mimxrt1060_evk.c index 8dae7a0c2..0f55c2b00 100644 --- a/hw/bsp/mimxrt1060_evk/mimxrt1060_evk.c +++ b/hw/bsp/mimxrt1060_evk/mimxrt1060_evk.c @@ -134,11 +134,11 @@ void USB_OTG1_IRQHandler(void) void USB_OTG2_IRQHandler(void) { - #if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_HOST << 8) + #if CFG_TUSB_RHPORT0_MODE & OPT_MODE_HOST tuh_isr(1); #endif - #if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE << 8) + #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE tud_int_handler(1); #endif } diff --git a/hw/bsp/mimxrt1064_evk/mimxrt1064_evk.c b/hw/bsp/mimxrt1064_evk/mimxrt1064_evk.c index 8dae7a0c2..be0ae3ea8 100644 --- a/hw/bsp/mimxrt1064_evk/mimxrt1064_evk.c +++ b/hw/bsp/mimxrt1064_evk/mimxrt1064_evk.c @@ -134,11 +134,11 @@ void USB_OTG1_IRQHandler(void) void USB_OTG2_IRQHandler(void) { - #if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_HOST << 8) + #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_HOST tuh_isr(1); #endif - #if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE << 8) + #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE tud_int_handler(1); #endif } diff --git a/hw/bsp/ngx4330/ngx4330.c b/hw/bsp/ngx4330/ngx4330.c index 85d11d6ad..5296ddcb3 100644 --- a/hw/bsp/ngx4330/ngx4330.c +++ b/hw/bsp/ngx4330/ngx4330.c @@ -161,7 +161,7 @@ void board_init(void) * status feedback from the distribution switch. GPIO54 is used for VBUS sensing. 15Kohm pull-down * resistors are always active */ -#if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE | OPT_MODE_HOST) +#if CFG_TUSB_RHPORT0_MODE Chip_USB0_Init(); // // Reset controller @@ -197,7 +197,7 @@ void board_init(void) * of VBUS can be read via U31. * JP16 shall not be inserted. */ -#if CFG_TUSB_RHPORT0_MODE & ((OPT_MODE_DEVICE | OPT_MODE_HOST) << 8) +#if CFG_TUSB_RHPORT1_MODE Chip_USB1_Init(); // // Reset controller @@ -235,11 +235,11 @@ void USB0_IRQHandler(void) void USB1_IRQHandler(void) { - #if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_HOST << 8) + #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_HOST tuh_isr(1); #endif - #if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE << 8) + #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE tud_int_handler(1); #endif } diff --git a/hw/bsp/teensy_40/teensy40.c b/hw/bsp/teensy_40/teensy40.c index 0ca86f602..f45a98ef3 100644 --- a/hw/bsp/teensy_40/teensy40.c +++ b/hw/bsp/teensy_40/teensy40.c @@ -135,11 +135,11 @@ void USB_OTG1_IRQHandler(void) void USB_OTG2_IRQHandler(void) { - #if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_HOST << 8) + #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_HOST tuh_isr(1); #endif - #if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE << 8) + #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE tud_int_handler(1); #endif }