diff --git a/demos/bsp/boards/board.h b/demos/bsp/boards/board.h
index 6f9d256cd..52fac5699 100644
--- a/demos/bsp/boards/board.h
+++ b/demos/bsp/boards/board.h
@@ -69,6 +69,7 @@
#define BOARD_LPCXPRESSO1769 7
#define BOARD_LPC4357USB 8
+#define BOARD_LPCLINK2 9
//--------------------------------------------------------------------+
// PRINTF TARGET DEFINE
@@ -80,9 +81,7 @@
#define PRINTF(...) printf(__VA_ARGS__)
-#if BOARD == 0
- #error BOARD is not defined or supported yet
-#elif BOARD == BOARD_NGX4330
+#if BOARD == BOARD_NGX4330
#include "ngx/board_ngx4330.h"
#elif BOARD == BOARD_LPCXPRESSO1347
#include "lpcxpresso/board_lpcxpresso1347.h"
@@ -98,6 +97,8 @@
#include "lpcxpresso/board_lpcxpresso1769.h"
#elif BOARD == BOARD_LPC4357USB
#include "microbuilder/board_lpc4357usb.h"
+#elif BOARD == BOARD_LPCLINK2
+ #include "lpcxpresso/board_lpclink2.h"
#else
#error BOARD is not defined or supported yet
#endif
diff --git a/demos/bsp/boards/embedded_artists/ea4357/board_ea4357.h b/demos/bsp/boards/embedded_artists/ea4357/board_ea4357.h
index da57a0d1a..0e2a28d11 100644
--- a/demos/bsp/boards/embedded_artists/ea4357/board_ea4357.h
+++ b/demos/bsp/boards/embedded_artists/ea4357/board_ea4357.h
@@ -36,12 +36,6 @@
*/
/**************************************************************************/
-/** \file
- * \brief TBD
- *
- * \note TBD
- */
-
/** \ingroup TBD
* \defgroup TBD
* \brief TBD
@@ -65,12 +59,13 @@
#include "../oem_base_board/pca9532.h" // LEDs
-//#include "../oem_board/nand.h"
+//#include "../oem_board/nand.h"a
//#define CFG_PRINTF_TARGET PRINTF_TARGET_SWO
#define CFG_PRINTF_TARGET PRINTF_TARGET_UART // FIXME keil's cmsis rtx does not work with UART (work with SWO)
+// TODO clean up
/*=========================================================================
HARDWARE MAC ADDRESS
-----------------------------------------------------------------------*/
diff --git a/demos/bsp/boards/lpcxpresso/board_lpclink2.c b/demos/bsp/boards/lpcxpresso/board_lpclink2.c
new file mode 100644
index 000000000..8792ee933
--- /dev/null
+++ b/demos/bsp/boards/lpcxpresso/board_lpclink2.c
@@ -0,0 +1,126 @@
+/**************************************************************************/
+/*!
+ @file board_lpclink2.c
+ @author hathach (tinyusb.org)
+
+ @section LICENSE
+
+ Software License Agreement (BSD License)
+
+ Copyright (c) 2013, hathach (tinyusb.org)
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the copyright holders nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This file is part of the tinyusb stack.
+*/
+/**************************************************************************/
+
+#include "../board.h"
+
+#if BOARD == BOARD_LPCLINK2
+
+#define BOARD_UART_PORT LPC_USART0
+#define BOARD_UART_PIN_PORT 0x0f
+#define BOARD_UART_PIN_TX 10 // PF.10 : UART0_TXD
+#define BOARD_UART_PIN_RX 11 // PF.11 : UART0_RXD
+
+#define BOARD_MAX_LEDS 1
+
+const static struct {
+ uint8_t port;
+ uint8_t pin;
+}leds[BOARD_MAX_LEDS] = { {0, 8} };
+
+void board_init(void)
+{
+ CGU_Init();
+
+#if TUSB_CFG_OS == TUSB_OS_NONE // TODO may move to main.c
+ SysTick_Config(CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE) / CFG_TICKS_PER_SECOND); // 1 msec tick timer
+#endif
+
+ //------------- USB -------------//
+
+
+ //------------- LED -------------//
+ for (uint8_t i=0; i
-
+
-
+
@@ -62,7 +62,7 @@
-
+
@@ -120,7 +120,7 @@
-
+
-
+
@@ -152,7 +152,7 @@
-
+
@@ -209,7 +209,7 @@
-
+
-
+
@@ -244,7 +244,7 @@
-
+
@@ -303,7 +303,7 @@
-
+
-
+
@@ -335,7 +335,7 @@
-
+
@@ -347,6 +347,7 @@
+
@@ -365,6 +366,100 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -372,45 +467,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<TargetConfig>
-<Properties property_0="" property_3="NXP" property_4="LPC11U37/401" property_count="5" version="1"/>
-<infoList vendor="NXP"><info chip="LPC11U37/401" match_id="0x00017C40" name="LPC11U37/401" stub="crt_emu_lpc11_13_nxp"><chip><name>LPC11U37/401</name>
-<family>LPC11Uxx</family>
+<Properties property_0="" property_3="NXP" property_4="LPC4370" property_count="5" version="1"/>
+<infoList vendor="NXP"><info chip="LPC4370" match_id="0x0" name="LPC4370" resetscript="LPC18LPC43ExternalFLASHBootResetscript.scp" stub="crt_emu_lpc18_43_nxp"><chip><name>LPC4370</name>
+<family>LPC43xx</family>
<vendor>NXP (formerly Philips)</vendor>
<reset board="None" core="Real" sys="Real"/>
-<clock changeable="TRUE" freq="12MHz" is_accurate="TRUE"/>
+<clock changeable="TRUE" freq="20MHz" is_accurate="TRUE"/>
<memory can_program="true" id="Flash" is_ro="true" type="Flash"/>
<memory id="RAM" type="RAM"/>
<memory id="Periph" is_volatile="true" type="Peripheral"/>
-<memoryInstance derived_from="Flash" id="MFlash128" location="0x0" size="0x20000"/>
-<memoryInstance derived_from="RAM" id="RamLoc8" location="0x10000000" size="0x2000"/>
-<memoryInstance derived_from="RAM" id="RamUsb2" location="0x20004000" size="0x800"/>
-<prog_flash blocksz="0x1000" location="0x0" maxprgbuff="0x400" progwithcode="TRUE" size="0x20000"/>
-<peripheralInstance derived_from="CM0_NVIC" id="NVIC" location="0xe000e000"/>
-<peripheralInstance derived_from="LPC11U_GPIO" id="GPIO" location="0x50000000"/>
-<peripheralInstance derived_from="LPC11U_USBDEV" id="USB" location="0x40080000"/>
-<peripheralInstance derived_from="CM0_DCR" id="DCR" location="0xe000edf0"/>
-<peripheralInstance derived_from="LPC11U_GPIO_GROUP_INT" id="GPIOGROUP0INT" location="0x40060000"/>
-<peripheralInstance derived_from="LPC11U_GPIO_GROUP_INT" id="GPIOGROUP1INT" location="0x4005c000"/>
-<peripheralInstance derived_from="LPC11U_GPIO_INT" id="GPIOINT" location="0x4004c000"/>
-<peripheralInstance derived_from="LPC11_13_SSP" id="SSP1" location="0x40058000"/>
-<peripheralInstance derived_from="LPC11U_FMC" id="FMC" location="0x4003c000"/>
-<peripheralInstance derived_from="LPC11U_SYSCTL" id="SYSCTL" location="0x40048000"/>
-<peripheralInstance derived_from="LPC11U_IOCON" id="IOCON" location="0x40044000"/>
-<peripheralInstance derived_from="LPC11_13_SSP" id="SSP0" location="0x40040000"/>
-<peripheralInstance derived_from="LPC11_13_PMU" id="PMU" location="0x40038000"/>
-<peripheralInstance derived_from="LPC11_13_ADC" id="ADC" location="0x4001c000"/>
-<peripheralInstance derived_from="LPC11_13_TIMER32" id="TIMER1" location="0x40018000"/>
-<peripheralInstance derived_from="LPC11_13_TIMER32" id="TIMER0" location="0x40014000"/>
-<peripheralInstance derived_from="LPC11_13_TIMER16" id="TMR161" location="0x40010000"/>
-<peripheralInstance derived_from="LPC11_13_TIMER16" id="TMR160" location="0x4000c000"/>
-<peripheralInstance derived_from="LPC1xxx_UART_MODEM" id="UART0" location="0x40008000"/>
-<peripheralInstance derived_from="LPC11_13_WDT" id="WDT" location="0x40004000"/>
-<peripheralInstance derived_from="LPC11_13_I2C" id="I2C0" location="0x40000000"/>
+<memoryInstance derived_from="RAM" id="RamLoc128" location="0x10000000" size="0x20000"/>
+<memoryInstance derived_from="RAM" id="RamLoc72" location="0x10080000" size="0x12000"/>
+<memoryInstance derived_from="RAM" id="RamAHB32" location="0x20000000" size="0x8000"/>
+<memoryInstance derived_from="RAM" id="RamAHB16" location="0x20008000" size="0x4000"/>
+<memoryInstance derived_from="RAM" id="RamAHB_ETB16" location="0x2000c000" size="0x4000"/>
+<memoryInstance derived_from="RAM" id="RamM0Sub16" location="0x18000000" size="0x4000"/>
+<memoryInstance derived_from="RAM" id="RamM0Sub2" location="0x18004000" size="0x800"/>
+<peripheralInstance derived_from="V7M_MPU" id="MPU" location="0xe000ed90"/>
+<peripheralInstance derived_from="V7M_NVIC" id="NVIC" location="0xe000e000"/>
+<peripheralInstance derived_from="V7M_DCR" id="DCR" location="0xe000edf0"/>
+<peripheralInstance derived_from="V7M_ITM" id="ITM" location="0xe0000000"/>
+<peripheralInstance derived_from="SCT" id="SCT" location="0x40000000"/>
+<peripheralInstance derived_from="GPDMA" id="GPDMA" location="0x40002000"/>
+<peripheralInstance derived_from="SPIFI" id="SPIFI" location="0x40003000"/>
+<peripheralInstance derived_from="SDMMC" id="SDMMC" location="0x40004000"/>
+<peripheralInstance derived_from="EMC" id="EMC" location="0x40005000"/>
+<peripheralInstance derived_from="USB0" id="USB0" location="0x40006000"/>
+<peripheralInstance derived_from="USB1" id="USB1" location="0x40007000"/>
+<peripheralInstance derived_from="LCD" id="LCD" location="0x40008000"/>
+<peripheralInstance derived_from="EEPROM" id="EEPROM" location="0x4000e000"/>
+<peripheralInstance derived_from="ETHERNET" id="ETHERNET" location="0x40010000"/>
+<peripheralInstance derived_from="ATIMER" id="ATIMER" location="0x40040000"/>
+<peripheralInstance derived_from="REGFILE" id="REGFILE" location="0x40041000"/>
+<peripheralInstance derived_from="PMC" id="PMC" location="0x40042000"/>
+<peripheralInstance derived_from="CREG" id="CREG" location="0x40043000"/>
+<peripheralInstance derived_from="EVENTROUTER" id="EVENTROUTER" location="0x40044000"/>
+<peripheralInstance derived_from="RTC" id="RTC" location="0x40046000"/>
+<peripheralInstance derived_from="CGU" id="CGU" location="0x40050000"/>
+<peripheralInstance derived_from="CCU1" id="CCU1" location="0x40051000"/>
+<peripheralInstance derived_from="CCU2" id="CCU2" location="0x40052000"/>
+<peripheralInstance derived_from="RGU" id="RGU" location="0x40053000"/>
+<peripheralInstance derived_from="WWDT" id="WWDT" location="0x40080000"/>
+<peripheralInstance derived_from="USART0" id="USART0" location="0x40081000"/>
+<peripheralInstance derived_from="USART2" id="USART2" location="0x400c1000"/>
+<peripheralInstance derived_from="USART3" id="USART3" location="0x400c2000"/>
+<peripheralInstance derived_from="UART1" id="UART1" location="0x40082000"/>
+<peripheralInstance derived_from="SSP0" id="SSP0" location="0x40083000"/>
+<peripheralInstance derived_from="SSP1" id="SSP1" location="0x400c5000"/>
+<peripheralInstance derived_from="TIMER0" id="TIMER0" location="0x40084000"/>
+<peripheralInstance derived_from="TIMER1" id="TIMER1" location="0x40085000"/>
+<peripheralInstance derived_from="TIMER2" id="TIMER2" location="0x400c3000"/>
+<peripheralInstance derived_from="TIMER3" id="TIMER3" location="0x400c4000"/>
+<peripheralInstance derived_from="SCU" id="SCU" location="0x40086000"/>
+<peripheralInstance derived_from="GPIO-PIN-INT" id="GPIO-PIN-INT" location="0x40087000"/>
+<peripheralInstance derived_from="GPIO-GROUP-INT0" id="GPIO-GROUP-INT0" location="0x40088000"/>
+<peripheralInstance derived_from="GPIO-GROUP-INT1" id="GPIO-GROUP-INT1" location="0x40089000"/>
+<peripheralInstance derived_from="MCPWM" id="MCPWM" location="0x400a0000"/>
+<peripheralInstance derived_from="I2C0" id="I2C0" location="0x400a1000"/>
+<peripheralInstance derived_from="I2C1" id="I2C1" location="0x400e0000"/>
+<peripheralInstance derived_from="I2S0" id="I2S0" location="0x400a2000"/>
+<peripheralInstance derived_from="I2S1" id="I2S1" location="0x400a3000"/>
+<peripheralInstance derived_from="C-CAN1" id="C-CAN1" location="0x400a4000"/>
+<peripheralInstance derived_from="RITIMER" id="RITIMER" location="0x400c0000"/>
+<peripheralInstance derived_from="QEI" id="QEI" location="0x400c6000"/>
+<peripheralInstance derived_from="GIMA" id="GIMA" location="0x400c7000"/>
+<peripheralInstance derived_from="DAC" id="DAC" location="0x400e1000"/>
+<peripheralInstance derived_from="C-CAN0" id="C-CAN0" location="0x400e2000"/>
+<peripheralInstance derived_from="ADC0" id="ADC0" location="0x400e3000"/>
+<peripheralInstance derived_from="ADC1" id="ADC1" location="0x400e4000"/>
+<peripheralInstance derived_from="ADCHS" id="ADCHS" location="0x400f0000"/>
+<peripheralInstance derived_from="GPIO-PORT" id="GPIO-PORT" location="0x400f4000"/>
+<peripheralInstance derived_from="SPI" id="SPI" location="0x40100000"/>
+<peripheralInstance derived_from="SGPIO" id="SGPIO" location="0x40101000"/>
</chip>
-<processor><name gcc_name="cortex-m0">Cortex-M0</name>
+<processor><name gcc_name="cortex-m4">Cortex-M4</name>
<family>Cortex-M</family>
</processor>
-<link href="nxp_lpc11_13_peripheral.xme" show="embed" type="simple"/>
+<link href="nxp_lpc43xx_peripheral.xme" show="embed" type="simple"/>
</info>
</infoList>
</TargetConfig>
diff --git a/demos/device/device_os_none/tusb_config.h b/demos/device/device_os_none/tusb_config.h
index 8fa5e315a..cd7ab97a4 100644
--- a/demos/device/device_os_none/tusb_config.h
+++ b/demos/device/device_os_none/tusb_config.h
@@ -83,11 +83,12 @@
#define TUSB_CFG_DEVICE_FULLSPEED 1 // TODO refractor, remove
//------------- CLASS -------------//
-#define TUSB_CFG_DEVICE_HID_KEYBOARD 0
-#define TUSB_CFG_DEVICE_HID_MOUSE 0
+#define TUSB_CFG_DEVICE_HID_KEYBOARD 1
+#define TUSB_CFG_DEVICE_HID_MOUSE 1
#define TUSB_CFG_DEVICE_HID_GENERIC 0
#define TUSB_CFG_DEVICE_MSC 1
-#define TUSB_CFG_DEVICE_CDC 0
+#define TUSB_CFG_DEVICE_CDC 1
+
//--------------------------------------------------------------------+
diff --git a/tinyusb/device/dcd_lpc_11uxx_13uxx.c b/tinyusb/device/dcd_lpc_11uxx_13uxx.c
index 1ddf77d94..92f086c19 100644
--- a/tinyusb/device/dcd_lpc_11uxx_13uxx.c
+++ b/tinyusb/device/dcd_lpc_11uxx_13uxx.c
@@ -321,7 +321,6 @@ void dcd_isr(uint8_t coreid)
}
}
}
-
}
//--------------------------------------------------------------------+