working on suspend and resume
change dcd_init signature
This commit is contained in:
@@ -153,7 +153,7 @@ void dcd_set_address(uint8_t rhport, uint8_t dev_addr)
|
||||
LPC_USB->DEVCMDSTAT |= dev_addr;
|
||||
}
|
||||
|
||||
bool dcd_init(uint8_t rhport)
|
||||
void dcd_init(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
|
||||
@@ -166,8 +166,6 @@ bool dcd_init(uint8_t rhport)
|
||||
CMDSTAT_RESET_CHANGE_MASK | CMDSTAT_CONNECT_CHANGE_MASK | CMDSTAT_SUSPEND_CHANGE_MASK;
|
||||
|
||||
NVIC_EnableIRQ(USB0_IRQn);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
@@ -166,7 +166,7 @@ static void bus_reset(void)
|
||||
tu_memclr(&_dcd, sizeof(dcd_data_t));
|
||||
}
|
||||
|
||||
bool dcd_init(uint8_t rhport)
|
||||
void dcd_init(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
|
||||
@@ -186,8 +186,6 @@ bool dcd_init(uint8_t rhport)
|
||||
// USB IRQ priority should be set by application previously
|
||||
NVIC_ClearPendingIRQ(USB_IRQn);
|
||||
NVIC_EnableIRQ(USB_IRQn);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void dcd_int_enable(uint8_t rhport)
|
||||
|
||||
@@ -121,7 +121,7 @@ static void bus_reset(uint8_t rhport)
|
||||
p_dcd->qhd[0].int_on_setup = 1; // OUT only
|
||||
}
|
||||
|
||||
bool dcd_init(uint8_t rhport)
|
||||
void dcd_init(uint8_t rhport)
|
||||
{
|
||||
LPC_USBHS_T* const lpc_usb = LPC_USB[rhport];
|
||||
dcd_data_t* p_dcd = dcd_data_ptr[rhport];
|
||||
@@ -134,8 +134,6 @@ bool dcd_init(uint8_t rhport)
|
||||
|
||||
lpc_usb->USBCMD_D &= ~0x00FF0000; // Interrupt Threshold Interval = 0
|
||||
lpc_usb->USBCMD_D |= TU_BIT(0); // connect
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void dcd_int_enable(uint8_t rhport)
|
||||
|
||||
Reference in New Issue
Block a user