aboutsummaryrefslogtreecommitdiff
path: root/common/print.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/print.h')
-rw-r--r--common/print.h13
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
32extern 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
40extern "C" {
41#endif
42extern bool print_enable;
37 43
38void print_S(const char *s); 44void print_S(const char *s);
39void print_P(const char *s); 45void print_P(const char *s);
@@ -41,5 +47,8 @@ void phex(unsigned char c);
41void phex16(unsigned int i); 47void phex16(unsigned int i);
42void pbin(unsigned char c); 48void pbin(unsigned char c);
43void pbin_reverse(unsigned char c); 49void pbin_reverse(unsigned char c);
50#ifdef __cplusplus
51}
52#endif
44 53
45#endif 54#endif