diff options
author | Keith Packard <keithp@keithp.com> | 2011-05-23 16:20:30 -0600 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-05-23 16:20:30 -0600 |
commit | c5433affea877e73a98505f174c70374c0980987 (patch) | |
tree | 471aac14cae5af27338a918504a9e8c1ee172298 | |
parent | 41d76a850d7ded2d02c41f5a4b1f1a68936598ac (diff) |
src-avr: Move logging printfs out of ISR call chain
Probably not the best plan to call printf from an interrupt handler.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | src-avr/ao_log_telescience.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src-avr/ao_log_telescience.c b/src-avr/ao_log_telescience.c index bda89129..04e494fd 100644 --- a/src-avr/ao_log_telescience.c +++ b/src-avr/ao_log_telescience.c @@ -88,7 +88,6 @@ ao_log_valid(struct ao_log_telescience *log) void ao_log_start(void) { - printf("Log goes from %ld to %ld\n", ao_log_current_pos, ao_log_end_pos); ao_log_running = 1; ao_wakeup(&ao_log_running); } @@ -96,7 +95,6 @@ ao_log_start(void) void ao_log_stop(void) { - printf ("Log stopped at %ld\n", ao_log_current_pos); ao_log_running = 0; ao_wakeup((void *) &ao_adc_head); } @@ -159,10 +157,13 @@ ao_log_set(void) { ao_cmd_hex(); if (ao_cmd_status == ao_cmd_success) { - if (ao_cmd_lex_i) + if (ao_cmd_lex_i) { + printf("Logging from %ld to %ld\n", ao_log_current_pos, ao_log_end_pos); ao_log_start(); - else + } else { + printf ("Log stopped at %ld\n", ao_log_current_pos); ao_log_stop(); + } } } |