diff options
| author | hathach <[email protected]> | 2012-12-04 18:18:29 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2012-12-04 18:18:29 +0700 |
| commit | f31ade6151089a0d6d99b73c23a7a6e1a538c268 (patch) | |
| tree | 10dbf649bf16f6a6ce4fd9d9e66c1401ad1918a0 /tinyusb/common | |
| parent | 82820a206666a6415148b0d26985ac5c7a9eb279 (diff) | |
add board abstract layer
rename arch to mcu
Diffstat (limited to 'tinyusb/common')
| -rw-r--r-- | tinyusb/common/common.h | 2 | ||||
| -rw-r--r-- | tinyusb/common/compiler/compiler_iar.h (renamed from tinyusb/common/arch/arm_mx.h) | 33 | ||||
| -rw-r--r-- | tinyusb/common/mcu/mcu.h (renamed from tinyusb/common/arch/arch.h) | 34 | ||||
| -rw-r--r-- | tinyusb/common/mcu/mcu_lpc11xx.h (renamed from tinyusb/common/arch/arch_lpc11xx.h) | 16 | ||||
| -rw-r--r-- | tinyusb/common/mcu/mcu_lpc134x.h (renamed from tinyusb/common/arch/arch_lpc134x.h) | 16 | ||||
| -rw-r--r-- | tinyusb/common/mcu/mcu_lpc43xx.h (renamed from tinyusb/common/arch/arch_lpc43xx.h) | 14 |
6 files changed, 57 insertions, 58 deletions
diff --git a/tinyusb/common/common.h b/tinyusb/common/common.h index d073b8cca..4b6fc645b 100644 --- a/tinyusb/common/common.h +++ b/tinyusb/common/common.h @@ -62,7 +62,7 @@ #include <stdio.h> #include "tusb_cfg.h" -#include "arch/arch.h" +#include "mcu/mcu.h" #include "hal/hal.h" #include "compiler/compiler.h" #include "errors.h" diff --git a/tinyusb/common/arch/arm_mx.h b/tinyusb/common/compiler/compiler_iar.h index b806f7b73..9682f2145 100644 --- a/tinyusb/common/arch/arm_mx.h +++ b/tinyusb/common/compiler/compiler_iar.h @@ -1,7 +1,7 @@ /* - * arm_mx.h + * compiler_iar.h * - * Created on: Nov 26, 2012 + * Created on: Dec 3, 2012 * Author: hathach */ @@ -32,27 +32,32 @@ * 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. + * This file is part of the tiny usb stack. */ /** \file - * \brief ARM Cortex Mx Header - * - * \note TBD + * \brief IAR Compiler */ -/** \ingroup Group_Arch - * +/** \ingroup Group_Compiler + * \defgroup Group_IAR IAR ARM * @{ */ -#ifndef _TUSB_ARM_MX_H_ -#define _TUSB_ARM_MX_H_ +#ifndef _TUSB_COMPILER_IAR_H_ +#define _TUSB_COMPILER_IAR_H_ + +#ifdef __cplusplus + extern "C" { +#endif + +#define ATTR_PREPACKED __packed +#define ATTR_PACKED -// #ifdef ARM_M3 ARM_M4 ARM_M0 +#ifdef __cplusplus + } +#endif -#define ENDIAN_LITTLE -#define ALIGNMENT (4) +#endif /* _TUSB_COMPILER_IAR_H_ */ -#endif /* _TUSB_ARM_MX_H_ */ /** @} */ diff --git a/tinyusb/common/arch/arch.h b/tinyusb/common/mcu/mcu.h index 1cc3fc83d..2bff2a017 100644 --- a/tinyusb/common/arch/arch.h +++ b/tinyusb/common/mcu/mcu.h @@ -1,5 +1,5 @@ /* - * arch.h + * mcu.h * * Created on: Nov 26, 2012 * Author: hathach @@ -42,33 +42,35 @@ */ /** \ingroup Group_Common - * \defgroup Group_Arch Architecture - * \brief Group_Arch brief + * \defgroup Group_MCU MicroController + * \brief Group_MCU brief * * @{ */ -#ifndef _TUSB_ARCH_H_ -#define _TUSB_ARCH_H_ +#ifndef _TUSB_MCU_H_ +#define _TUSB_MCU_H_ -//#define ARCH_LPC134X -//#define ARCH_LPC11XX -#define ARCH_LPC43XX +//#define MCU MCU_LPC43XX + +#define MCU_LPC134X 1 +#define MCU_LPC11XX 2 +#define MCU_LPC43XX 3 #define ENDIAN_LITTLE ///< MCU Endian #define ALIGNMENT (4) ///< MCU Alignment -#if defined ARCH_LPC134X - #include "arch_lpc134x.h" -#elif defined ARCH_LPC43XX - #include "arch_lpc43xx.h" -#elif defined ARCH_LPC11XX - #include "arch_lpc11xx.h" +#if MCU == MCU_LPC134X + #include "mcu_lpc134x.h" +#elif MCU == MCU_LPC43XX + #include "mcu_lpc43xx.h" +#elif MCU == MCU_LPC11XX + #include "mcu_lpc11xx.h" #else - #error Arch is not found + #error Arch is not supported yet #endif -#endif /* _TUSB_ARCH_H_ */ +#endif /* _TUSB_MCU_H_ */ /** @} */ diff --git a/tinyusb/common/arch/arch_lpc11xx.h b/tinyusb/common/mcu/mcu_lpc11xx.h index 38d391700..3b7c00f63 100644 --- a/tinyusb/common/arch/arch_lpc11xx.h +++ b/tinyusb/common/mcu/mcu_lpc11xx.h @@ -1,5 +1,5 @@ /* - * arch_lpc11xx.h + * mcu_lpc11xx.h * * Created on: Nov 29, 2012 * Author: hathach @@ -41,20 +41,18 @@ * \note TBD */ -/** \ingroup Group_Arch +/** \ingroup Group_MCU * * @{ */ -#ifndef ARCH_LPC11XX_H_ -#define ARCH_LPC11XX_H_ +#ifndef MCU_LPC11XX_H_ +#define MCU_LPC11XX_H_ -#define ARM_M0 -#define DEVICE_ROMDRIVER - -#include "arm_mx.h" #include "LPC11Uxx.h" -#endif /* ARCH_LPC11XX_H_ */ +#define DEVICE_ROMDRIVER + +#endif /* MCU_LPC11XX_H_ */ /** @} */ diff --git a/tinyusb/common/arch/arch_lpc134x.h b/tinyusb/common/mcu/mcu_lpc134x.h index 1779b784b..d5ac1e053 100644 --- a/tinyusb/common/arch/arch_lpc134x.h +++ b/tinyusb/common/mcu/mcu_lpc134x.h @@ -1,5 +1,5 @@ /* - * arch_lpc134x.h + * mcu_lpc134x.h * * Created on: Nov 26, 2012 * Author: hathach @@ -41,21 +41,19 @@ * \note TBD */ -/** \ingroup Group_Arch +/** \ingroup Group_MCU * * @{ */ -#ifndef _TUSB_ARCH_LPC134_X_H_ -#define _TUSB_ARCH_LPC134_X_H_ +#ifndef _TUSB_MCU_LPC134_X_H_ +#define _TUSB_MCU_LPC134_X_H_ -#define ARM_M3 -#define DEVICE_ROMDRIVER - -#include "arm_mx.h" #include "LPC13Uxx.h" -#endif /* _TUSB_ARCH_LPC134_X_H_ */ +#define DEVICE_ROMDRIVER + +#endif /* _TUSB_MCU_LPC134_X_H_ */ /** @} */ diff --git a/tinyusb/common/arch/arch_lpc43xx.h b/tinyusb/common/mcu/mcu_lpc43xx.h index f96bbb0dc..fc022c4cb 100644 --- a/tinyusb/common/arch/arch_lpc43xx.h +++ b/tinyusb/common/mcu/mcu_lpc43xx.h @@ -1,5 +1,5 @@ /* - * arch_lpc43xx.h + * mcu_lpc43xx.h * * Created on: Nov 26, 2012 * Author: hathach @@ -41,21 +41,17 @@ * \note TBD */ -/** \ingroup Group_Arch +/** \ingroup Group_MCU * * @{ */ -#ifndef _TUSB_ARCH_LPC43XX_H_ -#define _TUSB_ARCH_LPC43XX_H_ +#ifndef _TUSB_MCU_LPC43XX_H_ +#define _TUSB_MCU_LPC43XX_H_ -#define ARM_M4 -//#define ARM_M0 - -#include "arm_mx.h" #include "LPC43xx.h" #include "lpc43xx_cgu.h" -#endif /* _TUSB_ARCH_LPC43XX_H_ */ +#endif /* _TUSB_MCU_LPC43XX_H_ */ /// @} |
