added _cplusplus extern wrapper
This commit is contained in:
@@ -38,6 +38,10 @@
|
||||
#ifndef _TUSB_ARCH_H_
|
||||
#define _TUSB_ARCH_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ARCH_LPC134X 1
|
||||
#define ARCH_LPC43XX 2
|
||||
#define ARCH ARCH_LPC134X
|
||||
@@ -51,4 +55,8 @@
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_ARCH_H_ */
|
||||
|
@@ -38,10 +38,18 @@
|
||||
#ifndef _TUSB_ARCH_LPC134_X_H_
|
||||
#define _TUSB_ARCH_LPC134_X_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "arm_mx.h"
|
||||
|
||||
#define ARM ARM_M3
|
||||
|
||||
#define DEVICE_ROMDRIVER
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_ARCH_LPC134_X_H_ */
|
||||
|
@@ -38,9 +38,17 @@
|
||||
#ifndef _TUSB_ARCH_LPC43XX_H_
|
||||
#define _TUSB_ARCH_LPC43XX_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ARM ARM_M4
|
||||
//#define ARM ARM_M0
|
||||
|
||||
#include "arm_mx.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_ARCH_LPC43XX_H_ */
|
||||
|
@@ -38,7 +38,15 @@
|
||||
#ifndef _TUSB_ARM_MX_H_
|
||||
#define _TUSB_ARM_MX_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ENDIAN_LITTLE
|
||||
#define ALIGNMENT (4)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_ARM_MX_H_ */
|
||||
|
@@ -38,8 +38,16 @@
|
||||
#ifndef _TUSB_COMMON_H_
|
||||
#define _TUSB_COMMON_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "arch/arch.h"
|
||||
#include "compiler/compiler.h"
|
||||
#include "errors.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_COMMON_H_ */
|
||||
|
@@ -38,8 +38,16 @@
|
||||
#ifndef _TUSB_COMPILER_H_
|
||||
#define _TUSB_COMPILER_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#include "compiler_gcc.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_COMPILER_H_ */
|
||||
|
@@ -35,6 +35,10 @@
|
||||
* This file is part of the tiny usb stack.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _TUSB_COMPILER_GCC_H_
|
||||
#define _TUSB_COMPILER_GCC_H_
|
||||
|
||||
@@ -52,4 +56,8 @@
|
||||
#define ATTR_WARN_UNUSED_RESULT __attribute__ ((warn_unused_result))
|
||||
#define ATTR_ALWAYS_INLINE __attribute__ ((always_inline))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_COMPILER_GCC_H_ */
|
||||
|
@@ -38,5 +38,13 @@
|
||||
#ifndef _TUSB_ERRORS_H_
|
||||
#define _TUSB_ERRORS_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_ERRORS_H_ */
|
||||
|
Reference in New Issue
Block a user