diff options
author | Keith Packard <keithp@keithp.com> | 2012-03-18 22:07:07 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-03-28 21:37:02 -0700 |
commit | 4bfce11873f34af9621c60f83a8355f85769f6d3 (patch) | |
tree | 0682c61a983accc7629f94c1eab1f4f2ab766815 | |
parent | 93481fd3d9305a107b88c8a64de4194a6d94dc0e (diff) |
When debugging, send pre-init output to ao_debug_out
Before tasking is running, send output to ao_debug_out to help debug
system initialization.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | src/core/ao_stdio.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/ao_stdio.c b/src/core/ao_stdio.c index c0138a30..2967e705 100644 --- a/src/core/ao_stdio.c +++ b/src/core/ao_stdio.c @@ -30,6 +30,15 @@ __pdata int8_t ao_num_stdios; void putchar(char c) { +#if LOW_LEVEL_DEBUG + if (!ao_cur_task) { + extern void ao_debug_out(char c); + if (c == '\n') + ao_debug_out('\r'); + ao_debug_out(c); + return; + } +#endif if (c == '\n') (*ao_stdios[ao_cur_stdio].putchar)('\r'); (*ao_stdios[ao_cur_stdio].putchar)(c); |