From c5060ea81942b0e3f8577536ff78402a19abe3d3 Mon Sep 17 00:00:00 2001 From: tmk Date: Sat, 25 Aug 2012 15:49:08 +0900 Subject: test build of 'Host shield' in minimal env. --- common/print.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'common/print.h') 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 -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 -- cgit v1.2.3