add windows driver for cdc
add simple echo cdc serial demo add cdc device send/receive API refractor descriptor refractor cdc.h add usbd driver function - init - bus_reset
This commit is contained in:
@@ -72,6 +72,8 @@ static tusb_error_t hal_controller_reset(uint8_t coreid)
|
||||
|
||||
tusb_error_t hal_init(void)
|
||||
{
|
||||
LPC_CREG->CREG0 &= ~(1<<5); /* Turn on the phy */
|
||||
|
||||
//------------- USB0 -------------//
|
||||
#if TUSB_CFG_CONTROLLER_0_MODE
|
||||
CGU_EnableEntity(CGU_CLKSRC_PLL0, DISABLE); /* Disable PLL first */
|
||||
@@ -79,6 +81,7 @@ tusb_error_t hal_init(void)
|
||||
CGU_EntityConnect(CGU_CLKSRC_XTAL_OSC, CGU_CLKSRC_PLL0);
|
||||
CGU_EnableEntity(CGU_CLKSRC_PLL0, ENABLE); /* Enable PLL after all setting is done */
|
||||
|
||||
|
||||
// reset controller & set role
|
||||
ASSERT_STATUS( hal_controller_reset(0) );
|
||||
|
||||
@@ -118,8 +121,6 @@ tusb_error_t hal_init(void)
|
||||
hal_interrupt_enable(1);
|
||||
#endif
|
||||
|
||||
LPC_CREG->CREG0 &= ~(1<<5); /* Turn on the phy */
|
||||
|
||||
return TUSB_ERROR_NONE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user