summaryrefslogtreecommitdiff
path: root/tinyusb/hal
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-11-13 12:40:11 +0700
committerhathach <[email protected]>2013-11-13 12:40:11 +0700
commit92d9c36dbcfd933f872c91ad061e2e5ab184b020 (patch)
tree1864f26f579d65878f1cbd09d65b8cbb90b3f02b /tinyusb/hal
parentd8f32a79fc9e04136afcd8f4d79abe7a9b0c2eb9 (diff)
able to build and run cdc device demo on lpc11uxx
Diffstat (limited to 'tinyusb/hal')
-rw-r--r--tinyusb/hal/hal_lpc11uxx.c1
-rw-r--r--tinyusb/hal/hal_lpc11uxx.h14
-rw-r--r--tinyusb/hal/hal_lpc13uxx.c3
-rw-r--r--tinyusb/hal/hal_lpc43xx.c6
4 files changed, 5 insertions, 19 deletions
diff --git a/tinyusb/hal/hal_lpc11uxx.c b/tinyusb/hal/hal_lpc11uxx.c
index 4395a705c..9cb188e9c 100644
--- a/tinyusb/hal/hal_lpc11uxx.c
+++ b/tinyusb/hal/hal_lpc11uxx.c
@@ -51,6 +51,7 @@ tusb_error_t hal_init(void)
address the wrong status in VBUSDebouncing bit in CmdStatus register. */
LPC_IOCON->PIO0_3 &= ~0x1F;
LPC_IOCON->PIO0_3 |= (0x01<<0); /* Secondary function VBUS */
+
LPC_IOCON->PIO0_6 &= ~0x07;
LPC_IOCON->PIO0_6 |= (0x01<<0); /* Secondary function SoftConn */
diff --git a/tinyusb/hal/hal_lpc11uxx.h b/tinyusb/hal/hal_lpc11uxx.h
index 65e75d46f..b9764ce65 100644
--- a/tinyusb/hal/hal_lpc11uxx.h
+++ b/tinyusb/hal/hal_lpc11uxx.h
@@ -36,12 +36,6 @@
*/
/**************************************************************************/
-/** \file
- * \brief TBD
- *
- * \note TBD
- */
-
/** \ingroup TBD
* \defgroup TBD
* \brief TBD
@@ -58,15 +52,15 @@
extern "C" {
#endif
-static inline void hal_interrupt_enable(uint8_t controller_id)
+static inline void hal_interrupt_enable(uint8_t coreid)
{
- (void) controller_id; // discard compiler's warning
+ (void) coreid; // discard compiler's warning
NVIC_EnableIRQ(USB_IRQn);
}
-static inline void hal_interrupt_disable(uint8_t controller_id)
+static inline void hal_interrupt_disable(uint8_t coreid)
{
- (void) controller_id; // discard compiler's warning
+ (void) coreid; // discard compiler's warning
NVIC_DisableIRQ(USB_IRQn);
}
diff --git a/tinyusb/hal/hal_lpc13uxx.c b/tinyusb/hal/hal_lpc13uxx.c
index fad4ea888..d4e3fa984 100644
--- a/tinyusb/hal/hal_lpc13uxx.c
+++ b/tinyusb/hal/hal_lpc13uxx.c
@@ -57,9 +57,6 @@ tusb_error_t hal_init(void)
LPC_IOCON->PIO0_6 &= ~0x07;
LPC_IOCON->PIO0_6 |= (0x01<<0); /* Secondary function SoftConn */
- dcd_controller_connect(0);
- hal_interrupt_enable(0);
-
return TUSB_ERROR_NONE;
}
diff --git a/tinyusb/hal/hal_lpc43xx.c b/tinyusb/hal/hal_lpc43xx.c
index fc7b78904..9cb07deff 100644
--- a/tinyusb/hal/hal_lpc43xx.c
+++ b/tinyusb/hal/hal_lpc43xx.c
@@ -81,7 +81,6 @@ 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) );
@@ -93,10 +92,7 @@ tusb_error_t hal_init(void)
#if TUSB_CFG_DEVICE_FULLSPEED // TODO for easy testing
LPC_USB0->PORTSC1_D |= (1<<24); // force full speed
#endif
- dcd_controller_connect(0);
#endif
-
- hal_interrupt_enable(0);
#endif
//------------- USB1 -------------//
@@ -114,11 +110,9 @@ tusb_error_t hal_init(void)
LPC_USB1->USBMODE_H = LPC43XX_USBMODE_HOST | (LPC43XX_USBMODE_VBUS_HIGH << 5);
#else // TODO OTG
LPC_USB1->USBMODE_D = LPC43XX_USBMODE_DEVICE;
- dcd_controller_connect(1);
#endif
LPC_USB1->PORTSC1_D |= (1<<24); // TODO abtract, force port to fullspeed
- hal_interrupt_enable(1);
#endif
return TUSB_ERROR_NONE;