diff options
author | Keith Packard <keithp@keithp.com> | 2011-08-12 05:42:05 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-08-13 18:46:12 -0700 |
commit | aa642cf55c43188e9a21198d828d7ea90ff54280 (patch) | |
tree | 43243107c7175a88f4392cd68724bb730cc1d1c4 /src | |
parent | f87f0787fa5aa528674f3f4919eb22646c87c25a (diff) |
altos: add the 'L' command to show the status of a linked companion board
This prints out whether there is a board connected, along with the
various values fetched from it.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ao_companion.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ao_companion.c b/src/ao_companion.c index e2e6d05a..b424dd89 100644 --- a/src/ao_companion.c +++ b/src/ao_companion.c @@ -85,6 +85,15 @@ ao_companion(void) void ao_companion_status(void) __reentrant { + uint8_t i; + printf("Companion running: %d\n", ao_companion_running); + printf("device: %d\n", ao_companion_setup.board_id); + printf("update period: %d\n", ao_companion_setup.update_period); + printf("channels: %d\n", ao_companion_setup.channels); + printf("data:"); + for(i = 0; i < ao_companion_setup.channels; i++) + printf(" %5u", ao_companion_data[i]); + printf("\n"); } __code struct ao_cmds ao_companion_cmds[] = { @@ -102,6 +111,5 @@ ao_companion_init(void) COMPANION_CS_SEL &= ~COMPANION_CS_MASK; /* set CS pins as GPIO */ ao_cmd_register(&ao_companion_cmds[0]); - ao_add_task(&ao_companion_task, ao_companion, "companion"); } |