revert rhport config in nxp mcus

This commit is contained in:
hathach 2020-06-30 16:18:43 +07:00
parent ab75998316
commit f3a88477dc
7 changed files with 20 additions and 20 deletions

View File

@ -149,7 +149,7 @@ void board_init(void)
* status feedback from the distribution switch. GPIO54 is used for VBUS sensing. 15Kohm pull-down * status feedback from the distribution switch. GPIO54 is used for VBUS sensing. 15Kohm pull-down
* resistors are always active * resistors are always active
*/ */
#if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE | OPT_MODE_HOST) #if CFG_TUSB_RHPORT0_MODE
Chip_USB0_Init(); Chip_USB0_Init();
// // Reset controller // // Reset controller
@ -185,7 +185,7 @@ void board_init(void)
* of VBUS can be read via U31. * of VBUS can be read via U31.
* JP16 shall not be inserted. * 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(); Chip_USB1_Init();
// // Reset controller // // Reset controller
@ -232,11 +232,11 @@ void USB0_IRQHandler(void)
void USB1_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); tuh_isr(1);
#endif #endif
#if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE << 8) #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE
tud_int_handler(1); tud_int_handler(1);
#endif #endif
} }

View File

@ -43,11 +43,11 @@ void USB0_IRQHandler(void)
void USB1_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); tuh_isr(1);
#endif #endif
#if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE << 8) #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE
tud_int_handler(1); tud_int_handler(1);
#endif #endif
} }
@ -163,7 +163,7 @@ void board_init(void)
}; };
// USB0 // USB0
#if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE | OPT_MODE_HOST) #if CFG_TUSB_RHPORT0_MODE
Chip_USB0_Init(); Chip_USB0_Init();
// // Reset controller // // Reset controller
@ -180,7 +180,7 @@ void board_init(void)
#endif #endif
// USB1 // USB1
#if CFG_TUSB_RHPORT0_MODE & ((OPT_MODE_DEVICE | OPT_MODE_HOST) << 8) #if CFG_TUSB_RHPORT1_MODE
Chip_USB1_Init(); Chip_USB1_Init();
// // Reset controller // // Reset controller

View File

@ -134,11 +134,11 @@ void USB_OTG1_IRQHandler(void)
void USB_OTG2_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); tuh_isr(1);
#endif #endif
#if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE << 8) #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE
tud_int_handler(1); tud_int_handler(1);
#endif #endif
} }

View File

@ -134,11 +134,11 @@ void USB_OTG1_IRQHandler(void)
void USB_OTG2_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); tuh_isr(1);
#endif #endif
#if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE << 8) #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE
tud_int_handler(1); tud_int_handler(1);
#endif #endif
} }

View File

@ -134,11 +134,11 @@ void USB_OTG1_IRQHandler(void)
void USB_OTG2_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); tuh_isr(1);
#endif #endif
#if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE << 8) #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE
tud_int_handler(1); tud_int_handler(1);
#endif #endif
} }

View File

@ -161,7 +161,7 @@ void board_init(void)
* status feedback from the distribution switch. GPIO54 is used for VBUS sensing. 15Kohm pull-down * status feedback from the distribution switch. GPIO54 is used for VBUS sensing. 15Kohm pull-down
* resistors are always active * resistors are always active
*/ */
#if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE | OPT_MODE_HOST) #if CFG_TUSB_RHPORT0_MODE
Chip_USB0_Init(); Chip_USB0_Init();
// // Reset controller // // Reset controller
@ -197,7 +197,7 @@ void board_init(void)
* of VBUS can be read via U31. * of VBUS can be read via U31.
* JP16 shall not be inserted. * 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(); Chip_USB1_Init();
// // Reset controller // // Reset controller
@ -235,11 +235,11 @@ void USB0_IRQHandler(void)
void USB1_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); tuh_isr(1);
#endif #endif
#if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE << 8) #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE
tud_int_handler(1); tud_int_handler(1);
#endif #endif
} }

View File

@ -135,11 +135,11 @@ void USB_OTG1_IRQHandler(void)
void USB_OTG2_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); tuh_isr(1);
#endif #endif
#if CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE << 8) #if CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE
tud_int_handler(1); tud_int_handler(1);
#endif #endif
} }