summaryrefslogtreecommitdiff
path: root/tinyusb/hal
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-05-31 13:57:57 +0700
committerhathach <[email protected]>2013-05-31 13:57:57 +0700
commit3b9a616ca926172f299eb93eab0269bcea26d105 (patch)
tree986a87fd7e483f8f8b7fd9ee80f2dec55fffa6f2 /tinyusb/hal
parent04a641f0670eb448f561aa945ecc2a7cf0365469 (diff)
change at86rf to 1ghznode
rom device runs ok with lpc11uxx
Diffstat (limited to 'tinyusb/hal')
-rw-r--r--tinyusb/hal/hal.h2
-rw-r--r--tinyusb/hal/hal_lpc11uxx.c5
-rw-r--r--tinyusb/hal/hal_lpc11uxx.h3
-rw-r--r--tinyusb/hal/hal_lpc13uxx.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/tinyusb/hal/hal.h b/tinyusb/hal/hal.h
index d97f5463f..98c1c7e46 100644
--- a/tinyusb/hal/hal.h
+++ b/tinyusb/hal/hal.h
@@ -87,7 +87,7 @@ static inline void hal_interrupt_disable(uint8_t controller_id) ATTR_ALWAYS_INLI
static inline bool hal_debugger_is_attached(void) ATTR_PURE ATTR_ALWAYS_INLINE;
static inline bool hal_debugger_is_attached(void)
{
-#ifndef _TEST_
+#if !defined(_TEST_) && !(MCU==MCU_LPC11UXX)
return (CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk) == CoreDebug_DHCSR_C_DEBUGEN_Msk;
#else
return false;
diff --git a/tinyusb/hal/hal_lpc11uxx.c b/tinyusb/hal/hal_lpc11uxx.c
index ec7ddfc1b..a6e3312c4 100644
--- a/tinyusb/hal/hal_lpc11uxx.c
+++ b/tinyusb/hal/hal_lpc11uxx.c
@@ -57,4 +57,9 @@ tusb_error_t hal_init()
return TUSB_ERROR_NONE;
}
+void USB_IRQHandler(void)
+{
+ tusb_isr(0);
+}
+
#endif
diff --git a/tinyusb/hal/hal_lpc11uxx.h b/tinyusb/hal/hal_lpc11uxx.h
index 4374586d2..77d03e3fb 100644
--- a/tinyusb/hal/hal_lpc11uxx.h
+++ b/tinyusb/hal/hal_lpc11uxx.h
@@ -54,9 +54,6 @@
#include "LPC11Uxx.h"
-#define DEVICE_ROM_REG_BASE LPC_USB_BASE
-#define DEVICE_ROM_DRIVER_ADDR 0x1FFF1FF8
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/tinyusb/hal/hal_lpc13uxx.c b/tinyusb/hal/hal_lpc13uxx.c
index 8a9503e23..6f8d72fff 100644
--- a/tinyusb/hal/hal_lpc13uxx.c
+++ b/tinyusb/hal/hal_lpc13uxx.c
@@ -43,7 +43,7 @@
tusb_error_t hal_init()
{
- // TODO usb abstract later
+ // TODO remove magic number
/* Enable AHB clock to the USB block and USB RAM. */
LPC_SYSCON->SYSAHBCLKCTRL |= ((0x1<<14) | (0x1<<27));
@@ -54,8 +54,6 @@ tusb_error_t hal_init()
LPC_IOCON->PIO0_6 &= ~0x07;
LPC_IOCON->PIO0_6 |= (0x01<<0); /* Secondary function SoftConn */
- hal_interrupt_enable(0);
-
return TUSB_ERROR_NONE;
}