summaryrefslogtreecommitdiff
path: root/print.h
diff options
context:
space:
mode:
Diffstat (limited to 'print.h')
-rw-r--r--print.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/print.h b/print.h
new file mode 100644
index 0000000000..1de618fbaa
--- /dev/null
+++ b/print.h
@@ -0,0 +1,16 @@
+#ifndef print_h__
+#define print_h__
+
+#include <avr/pgmspace.h>
+#include "usb_keyboard_debug.h"
+
+// 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))
+#define pchar(c) usb_debug_putchar(c)
+
+void print_P(const char *s);
+void phex(unsigned char c);
+void phex16(unsigned int i);
+
+#endif