9
0
Fork 0

debug_ll.h: add PUTS_LL() function

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Antony Pavlov 2011-07-18 17:06:09 +04:00 committed by Sascha Hauer
parent 0c96353957
commit 0051f97069
1 changed files with 13 additions and 0 deletions

View File

@ -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