hal clean up
- replace tusb_hal_int_enable/disable to dcd_int_enable/disable, hcd_int_enable/disable - remove tusb_hal_init(), this will be part of dcd_init/hcd_init, anything beyond dcd/hcd should be inited by bsp
This commit is contained in:
@@ -158,12 +158,19 @@ bool dcd_init(uint8_t rhport)
|
||||
lpc_usb->USBCMD_D &= ~0x00FF0000; // Interrupt Threshold Interval = 0
|
||||
lpc_usb->USBCMD_D |= BIT_(0); // connect
|
||||
|
||||
// enable interrupt
|
||||
NVIC_EnableIRQ(rhport ? USB1_IRQn : USB0_IRQn);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void dcd_int_enable(uint8_t rhport)
|
||||
{
|
||||
NVIC_EnableIRQ(rhport ? USB1_IRQn : USB0_IRQn);
|
||||
}
|
||||
|
||||
void dcd_int_disable(uint8_t rhport)
|
||||
{
|
||||
NVIC_DisableIRQ(rhport ? USB1_IRQn : USB0_IRQn);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// HELPER
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
@@ -42,21 +42,6 @@
|
||||
|
||||
#include "chip.h"
|
||||
|
||||
void tusb_hal_int_enable(uint8_t rhport)
|
||||
{
|
||||
NVIC_EnableIRQ(rhport ? USB1_IRQn : USB0_IRQn);
|
||||
}
|
||||
|
||||
void tusb_hal_int_disable(uint8_t rhport)
|
||||
{
|
||||
NVIC_DisableIRQ(rhport ? USB1_IRQn : USB0_IRQn);
|
||||
}
|
||||
|
||||
bool tusb_hal_init(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void hal_dcd_isr(uint8_t rhport);
|
||||
|
||||
#if CFG_TUSB_RHPORT0_MODE
|
||||
|
||||
Reference in New Issue
Block a user