rename TUSB_OPT_HOST_ENABLED to CFG_TUH_ENABLED

This commit is contained in:
hathach
2022-02-23 21:49:11 +07:00
parent d10326cb4e
commit 31aa077cb0
31 changed files with 42 additions and 43 deletions
+3 -3
View File
@@ -33,7 +33,7 @@
//--------------------------------------------------------------------+
void USB0_IRQHandler(void)
{
#if TUSB_OPT_HOST_ENABLED
#if CFG_TUH_ENABLED
tuh_int_handler(0);
#endif
#if CFG_TUD_ENABLED
@@ -123,7 +123,7 @@ void board_init(void)
GPIOB->AMSEL = TU_BIT(0) | TU_BIT(1);
GPIOL->AMSEL = TU_BIT(6) | TU_BIT(7);
#if TUSB_OPT_HOST_ENABLED
#if CFG_TUH_ENABLED
/* USB PD6(EPEN) */
bits = TU_BIT(3);
SYSCTL->RCGCGPIO |= bits;
@@ -144,7 +144,7 @@ void board_init(void)
USB0->CC = USB_CC_CLKEN | (3u << USB_CC_CLKDIV_S); /* 60MHz = 240MHz / 4 */
__DMB(); /* Wait for completion of opening of the clock gate */
#if TUSB_OPT_HOST_ENABLED
#if CFG_TUH_ENABLED
USB0->GPCS = USB_GPCS_DEVMOD_OTG;
USB0->EPC = USB_EPC_EPENDE | USB_EPC_EPEN_HIGH;
#endif