mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-14 04:18:56 +00:00
added _cplusplus extern wrapper
This commit is contained in:
parent
06c16ae03f
commit
829c8672bb
@ -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_ */
|
||||
|
@ -38,10 +38,18 @@
|
||||
#ifndef _TUSB_DCD_H_
|
||||
#define _TUSB_DCD_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "tusb_cfg.h"
|
||||
|
||||
#ifdef DEVICE_ROMDRIVER
|
||||
#include "romdriver/mw_usbd_rom_api.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_DCD_H_ */
|
||||
|
@ -35,3 +35,15 @@
|
||||
* This file is part of the tiny usb stack.
|
||||
*/
|
||||
|
||||
#ifndef _TUSB_HCD_H_
|
||||
#define _TUSB_HCD_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_HCD_H_ */
|
||||
|
@ -35,8 +35,12 @@
|
||||
* This file is part of the tiny usb stack.
|
||||
*/
|
||||
|
||||
#ifndef TUSB_H_
|
||||
#define TUSB_H_
|
||||
#ifndef _TUSB_H_
|
||||
#define _TUSB_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "common/common.h"
|
||||
#include "tusb_cfg.h"
|
||||
@ -45,4 +49,8 @@
|
||||
#include "device/dcd.h"
|
||||
#endif
|
||||
|
||||
#endif /* TUSB_H_ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_H_ */
|
||||
|
@ -38,6 +38,10 @@
|
||||
#ifndef _TUSB_CFG_H_
|
||||
#define _TUSB_CFG_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "common/common.h"
|
||||
|
||||
#define CFG_TUSB_HOST
|
||||
@ -66,4 +70,8 @@
|
||||
#define CDC_NOTIFICATION_EP_MAXPACKETSIZE 8
|
||||
#define CDC_DATA_EP_MAXPACKET_SIZE 16
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_CFG_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user