rename lpc 17/18 irq to dcd_isr/hcd_isr
This commit is contained in:
@@ -623,7 +623,7 @@ static void xfer_error_isr(uint8_t hostid)
|
||||
}
|
||||
|
||||
//------------- Host Controller Driver's Interrupt Handler -------------//
|
||||
void hal_hcd_isr(uint8_t rhport)
|
||||
void hcd_isr(uint8_t rhport)
|
||||
{
|
||||
ehci_registers_t* regs = ehci_data.regs;
|
||||
|
||||
|
||||
@@ -599,7 +599,7 @@ static void done_queue_isr(uint8_t hostid)
|
||||
}
|
||||
}
|
||||
|
||||
void hal_hcd_isr(uint8_t hostid)
|
||||
void hcd_isr(uint8_t hostid)
|
||||
{
|
||||
uint32_t const int_en = OHCI_REG->interrupt_enable;
|
||||
uint32_t const int_status = OHCI_REG->interrupt_status & int_en;
|
||||
|
||||
@@ -495,7 +495,7 @@ static void dd_complete_isr(uint8_t rhport, uint8_t ep_id)
|
||||
}
|
||||
|
||||
// main USB IRQ handler
|
||||
void hal_dcd_isr(uint8_t rhport)
|
||||
void dcd_isr(uint8_t rhport)
|
||||
{
|
||||
uint32_t const dev_int_status = LPC_USB->DevIntSt & LPC_USB->DevIntEn;
|
||||
LPC_USB->DevIntClr = dev_int_status;// Acknowledge handled interrupt
|
||||
|
||||
@@ -30,17 +30,17 @@
|
||||
|
||||
#include "chip.h"
|
||||
|
||||
extern void hal_hcd_isr(uint8_t hostid);
|
||||
extern void hal_dcd_isr(uint8_t rhport);
|
||||
extern void hcd_isr(uint8_t hostid);
|
||||
extern void dcd_isr(uint8_t rhport);
|
||||
|
||||
void USB_IRQHandler(void)
|
||||
{
|
||||
#if TUSB_OPT_HOST_ENABLED
|
||||
hal_hcd_isr(0);
|
||||
hcd_isr(0);
|
||||
#endif
|
||||
|
||||
#if TUSB_OPT_DEVICE_ENABLED
|
||||
hal_dcd_isr(0);
|
||||
dcd_isr(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "tusb_option.h"
|
||||
|
||||
#if TUSB_OPT_DEVICE_ENABLED && (CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX)
|
||||
#if TUSB_OPT_DEVICE_ENABLED && (CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_RT10XX)
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// INCLUDE
|
||||
@@ -35,7 +35,11 @@
|
||||
#include "device/dcd.h"
|
||||
#include "dcd_lpc18_43.h"
|
||||
|
||||
#include "chip.h"
|
||||
#if CFG_TUSB_MCU == OPT_MCU_RT10XX
|
||||
#include "fsl_device_registers.h"
|
||||
#else
|
||||
#include "chip.h"
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// MACRO CONSTANT TYPEDEF
|
||||
@@ -270,7 +274,7 @@ bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t t
|
||||
//--------------------------------------------------------------------+
|
||||
// ISR
|
||||
//--------------------------------------------------------------------+
|
||||
void hal_dcd_isr(uint8_t rhport)
|
||||
void dcd_isr(uint8_t rhport)
|
||||
{
|
||||
LPC_USBHS_T* const lpc_usb = LPC_USB[rhport];
|
||||
|
||||
|
||||
@@ -26,35 +26,43 @@
|
||||
|
||||
#include "tusb.h"
|
||||
|
||||
#if (CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX)
|
||||
#if (CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_RT10XX)
|
||||
|
||||
#include "chip.h"
|
||||
|
||||
extern void hal_dcd_isr(uint8_t rhport);
|
||||
extern void hal_hcd_isr(uint8_t hostid);
|
||||
extern void dcd_isr(uint8_t rhport);
|
||||
extern void hcd_isr(uint8_t hostid);
|
||||
|
||||
#if CFG_TUSB_RHPORT0_MODE
|
||||
#if CFG_TUSB_MCU == OPT_MCU_RT10XX
|
||||
void USB_OTG1_IRQHandler(void)
|
||||
#else
|
||||
void USB0_IRQHandler(void)
|
||||
#endif
|
||||
{
|
||||
#if TUSB_OPT_HOST_ENABLED
|
||||
hal_hcd_isr(0);
|
||||
hcd_isr(0);
|
||||
#endif
|
||||
|
||||
#if TUSB_OPT_DEVICE_ENABLED
|
||||
hal_dcd_isr(0);
|
||||
dcd_isr(0);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CFG_TUSB_RHPORT1_MODE
|
||||
#if CFG_TUSB_MCU == OPT_MCU_RT10XX
|
||||
void USB_OTG2_IRQHandler(void)
|
||||
#else
|
||||
void USB1_IRQHandler(void)
|
||||
#endif
|
||||
{
|
||||
#if TUSB_OPT_HOST_ENABLED
|
||||
hal_hcd_isr(1);
|
||||
hcd_isr(1);
|
||||
#endif
|
||||
|
||||
#if TUSB_OPT_DEVICE_ENABLED
|
||||
hal_dcd_isr(1);
|
||||
dcd_isr(1);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user