summaryrefslogtreecommitdiff
path: root/tinyusb/common/compiler
diff options
context:
space:
mode:
authorhathach <[email protected]>2012-12-02 11:07:59 +0700
committerhathach <[email protected]>2012-12-02 11:07:59 +0700
commitb36a85ad3625596ce57f1a9fc2ddde2ea98b33d8 (patch)
treed73d19e9d96075369ffdb3f20a6878fdde0d51d6 /tinyusb/common/compiler
parenta636d75fc6c8af025a5f5a6229bd02334f82e976 (diff)
add extern "C" for cpp
start to work on hal layer
Diffstat (limited to 'tinyusb/common/compiler')
-rw-r--r--tinyusb/common/compiler/compiler_gcc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tinyusb/common/compiler/compiler_gcc.h b/tinyusb/common/compiler/compiler_gcc.h
index 787f9f6ae..ee651140b 100644
--- a/tinyusb/common/compiler/compiler_gcc.h
+++ b/tinyusb/common/compiler/compiler_gcc.h
@@ -49,6 +49,10 @@
#ifndef _TUSB_COMPILER_GCC_H_
#define _TUSB_COMPILER_GCC_H_
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
/// Normally, the compiler places the objects it generates in sections like data or bss & function in text. Sometimes, however, you need additional sections, or you need certain particular variables to appear in special sections, for example to map to special hardware. The section attribute specifies that a variable (or function) lives in a particular section
#define ATTR_SECTION(section) __attribute__ ((#section))
@@ -117,6 +121,10 @@
/** @} */
+#ifdef __cplusplus
+ }
+#endif
+
#endif /* _TUSB_COMPILER_GCC_H_ */
/// @}