add board abstract layer
rename arch to mcu
This commit is contained in:
@@ -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"
|
||||
|
@@ -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 ARM_M3 ARM_M4 ARM_M0
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ENDIAN_LITTLE
|
||||
#define ALIGNMENT (4)
|
||||
#define ATTR_PREPACKED __packed
|
||||
#define ATTR_PACKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_COMPILER_IAR_H_ */
|
||||
|
||||
#endif /* _TUSB_ARM_MX_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_ */
|
||||
|
||||
/** @} */
|
||||
|
@@ -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_ */
|
||||
|
||||
/** @} */
|
@@ -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_ */
|
||||
|
||||
/** @} */
|
||||
|
@@ -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_ */
|
||||
|
||||
/// @}
|
@@ -37,7 +37,7 @@
|
||||
|
||||
#include "common/common.h"
|
||||
|
||||
#ifdef ARCH_LPC134X
|
||||
#if MCU == MCU_LPC134X
|
||||
|
||||
TUSB_Error_t hal_init()
|
||||
{
|
||||
|
@@ -37,7 +37,7 @@
|
||||
|
||||
#include "common/common.h"
|
||||
|
||||
#ifdef ARCH_LPC43XX
|
||||
#if MCU == MCU_LPC43XX
|
||||
|
||||
TUSB_Error_t hal_init()
|
||||
{
|
||||
|
Reference in New Issue
Block a user