summaryrefslogtreecommitdiffstats
path: root/include/debug_ll.h
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2011-07-18 17:06:09 +0400
committerSascha Hauer <s.hauer@pengutronix.de>2011-07-18 23:04:18 +0200
commit0051f97069141518e1222c77d0c560b12077e492 (patch)
tree2d88c68c4e376c7275b295d0ae106fe8d7232037 /include/debug_ll.h
parent0c9635395772866a369b553a33ae6378c825eae1 (diff)
downloadbarebox-0051f97069141518e1222c77d0c560b12077e492.tar.gz
barebox-0051f97069141518e1222c77d0c560b12077e492.tar.xz
debug_ll.h: add PUTS_LL() function
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/debug_ll.h')
-rw-r--r--include/debug_ll.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/debug_ll.h b/include/debug_ll.h
index e99ae7d207..6b1b174ad4 100644
--- a/include/debug_ll.h
+++ b/include/debug_ll.h
@@ -35,9 +35,22 @@
ch = ((v >> (i*4)) & 0xf);\
ch += (ch >= 10) ? 'a' - 10 : '0';\
PUTC_LL (ch); }})
+
+static __inline__ void PUTS_LL(char * str)
+{
+ while (*str) {
+ if (*str == '\n') {
+ PUTC_LL('\r');
+ }
+ PUTC_LL(*str);
+ str++;
+ }
+}
+
#else
# define PUTC_LL(c) do {} while (0)
# define PUTHEX_LL(v) do {} while (0)
+# define PUTS_LL(c) do {} while (0)
#endif