remove tusb_isr(), rename hal_hcd_isr() and hal_dcd_isr()

This commit is contained in:
hathach
2018-03-06 17:38:35 +07:00
parent 98f12c9833
commit fce85875c4
13 changed files with 32 additions and 34 deletions

View File

@@ -75,7 +75,7 @@ bool hal_usb_init(void)
void USB_IRQHandler(void)
{
tusb_isr(0);
hal_dcd_isr(0);
}
#endif

View File

@@ -74,7 +74,7 @@ bool hal_usb_init(void)
void USB_IRQHandler(void)
{
tusb_isr(0);
hal_dcd_isr(0);
}

View File

@@ -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

View File

@@ -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];

View File

@@ -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