From 88f1291c095b72ce13f63bc31c21ef4b3e7294f1 Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 4 Aug 2014 02:30:08 +0700 Subject: replacing RF1GHZNODE with LPCXPRESSO11U68 (not yet implement the actual board) --- boards/board.h | 21 +-- boards/lpcxpresso/board_lpcxpresso11u14.h | 6 +- boards/lpcxpresso/board_lpcxpresso11u68.c | 114 +++++++++++++++ boards/lpcxpresso/board_lpcxpresso11u68.h | 57 ++++++++ boards/microbuilder/board_rf1ghznode.c | 114 --------------- boards/microbuilder/board_rf1ghznode.h | 57 -------- demos/device/device_cmsis_rtx/.cproject | 207 +++++++++++++-------------- demos/device/device_freertos/.cproject | 63 +++++---- demos/device/device_os_none/.cproject | 226 ++++++++++++++---------------- demos/host/host_cmsis_rtx/.cproject | 20 ++- demos/host/host_freertos/.cproject | 19 ++- demos/host/host_os_none/.cproject | 165 +++++++++++----------- tests/.cproject | 2 +- 13 files changed, 540 insertions(+), 531 deletions(-) create mode 100644 boards/lpcxpresso/board_lpcxpresso11u68.c create mode 100644 boards/lpcxpresso/board_lpcxpresso11u68.h delete mode 100644 boards/microbuilder/board_rf1ghznode.c delete mode 100644 boards/microbuilder/board_rf1ghznode.h diff --git a/boards/board.h b/boards/board.h index f4f2503c0..f14e4e663 100644 --- a/boards/board.h +++ b/boards/board.h @@ -59,15 +59,16 @@ /** \defgroup group_supported_board Supported Boards * @{ */ #define BOARD_LPCXPRESSO11U14 1114 ///< LPCXpresso 11u14, some APIs requires the base board -#define BOARD_RF1GHZNODE 1100 ///< LPC11U37 from microbuilder http://www.microbuilder.eu/Blog/13-03-14/LPC1xxx_1GHZ_Wireless_Board_Preview.aspx -#define BOARD_LPCXPRESSO1347 1300 ///< LPCXpresso 1347, some APIs requires the base board -#define BOARD_LPCXPRESSO1769 1700 ///< LPCXpresso 1769, some APIs requires the base board +#define BOARD_LPCXPRESSO11U68 1168 ///< LPC11U37 from microbuilder http://www.microbuilder.eu/Blog/13-03-14/LPC1xxx_1GHZ_Wireless_Board_Preview.aspx +#define BOARD_LPCXPRESSO1347 1347 ///< LPCXpresso 1347, some APIs requires the base board +#define BOARD_LPCXPRESSO1769 1769 ///< LPCXpresso 1769, some APIs requires the base board -#define BOARD_NGX4330 4300 ///< NGX 4330 Xplorer -#define BOARD_EA4357 4301 ///< Embedded Artists LPC4357 developer kit -#define BOARD_MCB4300 4302 ///< Keil MCB4300 -#define BOARD_HITEX4350 4303 ///< Hitex 4350 -#define BOARD_LPC4357USB 4304 +#define BOARD_NGX4330 4330 ///< NGX 4330 Xplorer +#define BOARD_EA4357 4357 ///< Embedded Artists LPC4357 developer kit +#define BOARD_MCB4300 4300 ///< Keil MCB4300 +#define BOARD_HITEX4350 4350 ///< Hitex 4350 + +#define BOARD_LPC4357USB 4304 ///< microbuilder.eu #define BOARD_LPCLINK2 4370 ///< LPClink2 uses as LPC4370 development board /** @} */ @@ -91,8 +92,8 @@ //--------------------------------------------------------------------+ #if BOARD == BOARD_LPCXPRESSO11U14 #include "lpcxpresso/board_lpcxpresso11u14.h" -#elif BOARD == BOARD_RF1GHZNODE - #include "microbuilder/board_rf1ghznode.h" +#elif BOARD == BOARD_LPCXPRESSO11U68 + #include "lpcxpresso/board_lpcxpresso11u68.h" #elif BOARD == BOARD_LPCXPRESSO1347 #include "lpcxpresso/board_lpcxpresso1347.h" #elif BOARD == BOARD_LPCXPRESSO1769 diff --git a/boards/lpcxpresso/board_lpcxpresso11u14.h b/boards/lpcxpresso/board_lpcxpresso11u14.h index cd4314d30..5da48c33b 100644 --- a/boards/lpcxpresso/board_lpcxpresso11u14.h +++ b/boards/lpcxpresso/board_lpcxpresso11u14.h @@ -36,8 +36,8 @@ */ /**************************************************************************/ -#ifndef _TUSB_BOARD_RF1GHZNODE_H_ -#define _TUSB_BOARD_RF1GHZNODE_H_ +#ifndef _TUSB_BOARD_LPCXPRESSO11U14_H_ +#define _TUSB_BOARD_LPCXPRESSO11U14_H_ #ifdef __cplusplus extern "C" { @@ -54,4 +54,4 @@ } #endif -#endif /* _TUSB_BOARD_RF1GHZNODE_H_ */ +#endif /* _TUSB_BOARD_LPCXPRESSO11U14_H_ */ diff --git a/boards/lpcxpresso/board_lpcxpresso11u68.c b/boards/lpcxpresso/board_lpcxpresso11u68.c new file mode 100644 index 000000000..4e6f4cb16 --- /dev/null +++ b/boards/lpcxpresso/board_lpcxpresso11u68.c @@ -0,0 +1,114 @@ +/**************************************************************************/ +/*! + @file board_rf1ghznode.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_LPCXPRESSO11U68 + +#define LED_PORT (1) +#define LED_PIN (31) +#define LED_ON (0) +#define LED_OFF (1) + +const static struct { + uint8_t port; + uint8_t pin; +} buttons[] = { { 0, 1 } }; + +enum { + BOARD_BUTTON_COUNT = sizeof(buttons) / sizeof(buttons[0]) +}; + +void board_init(void) +{ + SystemInit(); + +#if TUSB_CFG_OS == TUSB_OS_NONE // TODO may move to main.c + SysTick_Config(SystemCoreClock / TUSB_CFG_TICKS_HZ); // 1 msec tick timer +#endif + + GPIOInit(); + + //------------- LED -------------// + GPIOSetDir(LED_PORT, LED_PIN, 1); + + //------------- BUTTON -------------// + for(uint8_t i=0; i - - -