X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=common%2Fprint.h;h=1c4567862fa264361a8a981dcc3c070f75c2383c;hb=b56717b843859aa3188f9a40532b077241269482;hp=686fa89accfb8af96991bb2b2b3c2dabe6f31d34;hpb=f4125707399d11a7d80587659c464b9bcddb8c56;p=max%2Ftmk_keyboard.git diff --git a/common/print.h b/common/print.h index 686fa89a..1c456786 100644 --- a/common/print.h +++ b/common/print.h @@ -29,17 +29,27 @@ #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); void phex(unsigned char c); void phex16(unsigned int i); +void pdec(uint8_t i); void pbin(unsigned char c); void pbin_reverse(unsigned char c); +#ifdef __cplusplus +} +#endif #endif