summaryrefslogtreecommitdiff
path: root/tinyusb/hal
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-11-11 12:48:21 +0700
committerhathach <[email protected]>2013-11-11 12:48:21 +0700
commitf00a4b448d85c4cf36edb8dc7245d7c3fa1c07ec (patch)
tree8a0187580fbc26779f32515d54cb5e2a4190f4b8 /tinyusb/hal
parent9cb99d371693a4294d8d9fb190ca23c1043da755 (diff)
adding support for lpc13uxx
Diffstat (limited to 'tinyusb/hal')
-rw-r--r--tinyusb/hal/hal.h4
-rw-r--r--tinyusb/hal/hal_lpc13uxx.c3
-rw-r--r--tinyusb/hal/hal_lpc13uxx.h8
3 files changed, 8 insertions, 7 deletions
diff --git a/tinyusb/hal/hal.h b/tinyusb/hal/hal.h
index a53f3e0db..a48852be3 100644
--- a/tinyusb/hal/hal.h
+++ b/tinyusb/hal/hal.h
@@ -86,9 +86,7 @@ static inline void hal_interrupt_disable(uint8_t coreid) ATTR_ALWAYS_INLINE;
//--------------------------------------------------------------------+
// INCLUDE DRIVEN
//--------------------------------------------------------------------+
-#if MCU == 0
- #error MCU is not defined or supported yet
-#elif MCU == MCU_LPC11UXX
+#if MCU == MCU_LPC11UXX
#include "hal_lpc11uxx.h"
#elif MCU == MCU_LPC13UXX
#include "hal_lpc13uxx.h"
diff --git a/tinyusb/hal/hal_lpc13uxx.c b/tinyusb/hal/hal_lpc13uxx.c
index d4e3fa984..fad4ea888 100644
--- a/tinyusb/hal/hal_lpc13uxx.c
+++ b/tinyusb/hal/hal_lpc13uxx.c
@@ -57,6 +57,9 @@ 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_lpc13uxx.h b/tinyusb/hal/hal_lpc13uxx.h
index 259f9de11..fefa58d20 100644
--- a/tinyusb/hal/hal_lpc13uxx.h
+++ b/tinyusb/hal/hal_lpc13uxx.h
@@ -58,15 +58,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_IRQ_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_IRQ_IRQn);
}