From 15d3a418bd0d109d926ea95c3be1bbc83757734b Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 8 Nov 2013 12:03:32 +0700 Subject: 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 --- tinyusb/hal/hal_lpc43xx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tinyusb/hal') diff --git a/tinyusb/hal/hal_lpc43xx.c b/tinyusb/hal/hal_lpc43xx.c index f9e0921b6..fc7b78904 100644 --- a/tinyusb/hal/hal_lpc43xx.c +++ b/tinyusb/hal/hal_lpc43xx.c @@ -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; } -- cgit v1.3.1