diff options
author | tmk <nobody@nowhere> | 2012-09-04 14:24:52 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2012-09-04 14:24:52 +0900 |
commit | dc79a8521946a3a2e5b86945b8043b87a8b8d78c (patch) | |
tree | 737827112555c00a7f2ebbb88e61079c460be71a /common/print.h | |
parent | 7350b7c6aa300a234244c264b10d1732803c27df (diff) | |
parent | 232ab308e358e41f3253d66fa009c1ebca0951a2 (diff) |
Merge branch 'usb_hid'
Diffstat (limited to 'common/print.h')
-rw-r--r-- | common/print.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/common/print.h b/common/print.h index 686fa89acc..d55f5695dc 100644 --- a/common/print.h +++ b/common/print.h @@ -29,11 +29,17 @@ #include <avr/pgmspace.h> -extern bool print_enable; - +// avoid collision with arduino/Print.h +#ifndef __cplusplus // this macro allows you to write print("some text") and // the string is automatically placed into flash memory :) #define print(s) print_P(PSTR(s)) +#endif + +#ifdef __cplusplus +extern "C" { +#endif +extern bool print_enable; void print_S(const char *s); void print_P(const char *s); @@ -41,5 +47,8 @@ void phex(unsigned char c); void phex16(unsigned int i); void pbin(unsigned char c); void pbin_reverse(unsigned char c); +#ifdef __cplusplus +} +#endif #endif |