diff options
| author | hathach <[email protected]> | 2013-05-31 13:57:57 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-05-31 13:57:57 +0700 |
| commit | 3b9a616ca926172f299eb93eab0269bcea26d105 (patch) | |
| tree | 986a87fd7e483f8f8b7fd9ee80f2dec55fffa6f2 /tinyusb | |
| parent | 04a641f0670eb448f561aa945ecc2a7cf0365469 (diff) | |
change at86rf to 1ghznode
rom device runs ok with lpc11uxx
Diffstat (limited to 'tinyusb')
| -rw-r--r-- | tinyusb/class/hid_device.c | 4 | ||||
| -rw-r--r-- | tinyusb/device/dcd_lpc11uxx_lpc13xx.h (renamed from tinyusb/device/dcd_lpc13xx.h) | 9 | ||||
| -rw-r--r-- | tinyusb/device/dcd_nxp_romdriver.h | 4 | ||||
| -rw-r--r-- | tinyusb/hal/hal.h | 2 | ||||
| -rw-r--r-- | tinyusb/hal/hal_lpc11uxx.c | 5 | ||||
| -rw-r--r-- | tinyusb/hal/hal_lpc11uxx.h | 3 | ||||
| -rw-r--r-- | tinyusb/hal/hal_lpc13uxx.c | 4 |
7 files changed, 16 insertions, 15 deletions
diff --git a/tinyusb/class/hid_device.c b/tinyusb/class/hid_device.c index 91c31e04a..2e68fd4d0 100644 --- a/tinyusb/class/hid_device.c +++ b/tinyusb/class/hid_device.c @@ -59,12 +59,12 @@ // IMPLEMENTATION //--------------------------------------------------------------------+ #if TUSB_CFG_DEVICE_HID_KEYBOARD -tusb_keyboard_report_t hid_keyboard_report; +TUSB_CFG_ATTR_USBRAM tusb_keyboard_report_t hid_keyboard_report; static volatile bool bKeyChanged = false; #endif #if TUSB_CFG_DEVICE_HID_MOUSE -tusb_mouse_report_t hid_mouse_report; +TUSB_CFG_ATTR_USBRAM tusb_mouse_report_t hid_mouse_report; static volatile bool bMouseChanged = false; #endif diff --git a/tinyusb/device/dcd_lpc13xx.h b/tinyusb/device/dcd_lpc11uxx_lpc13xx.h index 9d9780b36..ce7fc90ea 100644 --- a/tinyusb/device/dcd_lpc13xx.h +++ b/tinyusb/device/dcd_lpc11uxx_lpc13xx.h @@ -1,6 +1,6 @@ /**************************************************************************/ /*! - @file dcd_lpc13xx.h + @file dcd_lpc11uxx_lpc13xx.h @author hathach (tinyusb.org) @section LICENSE @@ -43,8 +43,8 @@ * @{ */ -#ifndef _TUSB_DCD_LPC13XX_H_ -#define _TUSB_DCD_LPC13XX_H_ +#ifndef _TUSB_DCD_LPC11UXX_LPC13XX_H_ +#define _TUSB_DCD_LPC11UXX_LPC13XX_H_ #define DEVICE_ROM_REG_BASE LPC_USB_BASE #define DEVICE_ROM_DRIVER_ADDR 0x1FFF1FF8 @@ -54,10 +54,11 @@ #endif + #ifdef __cplusplus } #endif -#endif /* _TUSB_DCD_LPC13XX_H_ */ +#endif /* _TUSB_DCD_LPC11UXX_LPC13XX_H_ */ /** @} */ diff --git a/tinyusb/device/dcd_nxp_romdriver.h b/tinyusb/device/dcd_nxp_romdriver.h index 28e7e2989..840ff0f6f 100644 --- a/tinyusb/device/dcd_nxp_romdriver.h +++ b/tinyusb/device/dcd_nxp_romdriver.h @@ -55,8 +55,8 @@ #if (MCU == MCU_LPC18XX) || (MCU == MCU_LPC43XX) #include "dcd_lpc18xx_lpc43xx.h" #define ROM_API ( * ((USBD_API_T**) DEVICE_ROM_DRIVER_ADDR) ) -#elif (MCU == MCU_LPC13UXX) - #include "dcd_lpc13xx.h" +#elif (MCU == MCU_LPC13UXX) || (MCU == MCU_LPC11UXX) + #include "dcd_lpc11uxx_lpc13xx.h" #define ROM_API ( * (*((USBD_API_T***) DEVICE_ROM_DRIVER_ADDR)) ) #else #error forgot something, thach ? 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; } |
