change at86rf to 1ghznode

rom device runs ok with lpc11uxx
This commit is contained in:
hathach
2013-05-31 13:57:57 +07:00
parent 04a641f067
commit 3b9a616ca9
14 changed files with 654 additions and 1777 deletions
+2 -2
View File
@@ -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
@@ -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_ */
/** @} */
+2 -2
View File
@@ -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 ?
+1 -1
View File
@@ -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;
+5
View File
@@ -57,4 +57,9 @@ tusb_error_t hal_init()
return TUSB_ERROR_NONE;
}
void USB_IRQHandler(void)
{
tusb_isr(0);
}
#endif
-3
View File
@@ -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
+1 -3
View File
@@ -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;
}