diff options
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 686fa89ac..d55f5695d 100644 --- a/common/print.h +++ b/common/print.h | |||
@@ -29,11 +29,17 @@ | |||
29 | #include <avr/pgmspace.h> | 29 | #include <avr/pgmspace.h> |
30 | 30 | ||
31 | 31 | ||
32 | extern bool print_enable; | 32 | // avoid collision with arduino/Print.h |
33 | 33 | #ifndef __cplusplus | |
34 | // this macro allows you to write print("some text") and | 34 | // this macro allows you to write print("some text") and |
35 | // the string is automatically placed into flash memory :) | 35 | // the string is automatically placed into flash memory :) |
36 | #define print(s) print_P(PSTR(s)) | 36 | #define print(s) print_P(PSTR(s)) |
37 | #endif | ||
38 | |||
39 | #ifdef __cplusplus | ||
40 | extern "C" { | ||
41 | #endif | ||
42 | extern bool print_enable; | ||
37 | 43 | ||
38 | void print_S(const char *s); | 44 | void print_S(const char *s); |
39 | void print_P(const char *s); | 45 | void print_P(const char *s); |
@@ -41,5 +47,8 @@ void phex(unsigned char c); | |||
41 | void phex16(unsigned int i); | 47 | void phex16(unsigned int i); |
42 | void pbin(unsigned char c); | 48 | void pbin(unsigned char c); |
43 | void pbin_reverse(unsigned char c); | 49 | void pbin_reverse(unsigned char c); |
50 | #ifdef __cplusplus | ||
51 | } | ||
52 | #endif | ||
44 | 53 | ||
45 | #endif | 54 | #endif |