aboutsummaryrefslogtreecommitdiffstats
path: root/print.h
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2010-08-10 13:34:06 +0900
committertmk <nobody@nowhere>2010-08-10 13:34:06 +0900
commitac3134ffeb3a2fb998e628e97a06b413fba8ee48 (patch)
treed282f111c15e95018baf7c4c65c3aabc702ce6c1 /print.h
downloadfirmware-ac3134ffeb3a2fb998e628e97a06b413fba8ee48.tar.gz
firmware-ac3134ffeb3a2fb998e628e97a06b413fba8ee48.tar.bz2
firmware-ac3134ffeb3a2fb998e628e97a06b413fba8ee48.zip
add initial files from teensy's usb_keyboard_debug.
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 000000000..1de618fba
--- /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