From: Keith Packard Date: Tue, 5 Jun 2012 03:53:53 +0000 (-0700) Subject: altos: Other half of the ms5607 prom reporting patch X-Git-Tag: 1.0.9.6~82 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=a9ad342ae4c34626df4f2891da4c7f6d2c14d73e altos: Other half of the ms5607 prom reporting patch Signed-off-by: Keith Packard --- diff --git a/src/drivers/ao_ms5607.c b/src/drivers/ao_ms5607.c index 7db7022f..0f0625d0 100644 --- a/src/drivers/ao_ms5607.c +++ b/src/drivers/ao_ms5607.c @@ -215,12 +215,9 @@ ao_ms5607(void) __xdata struct ao_task ao_ms5607_task; -static void -ao_ms5607_dump(void) +void +ao_ms5607_info(void) { - struct ao_ms5607_sample sample; - struct ao_ms5607_value value; - printf ("ms5607 reserved: %u\n", ms5607_prom.reserved); printf ("ms5607 sens: %u\n", ms5607_prom.sens); printf ("ms5607 off: %u\n", ms5607_prom.off); @@ -229,6 +226,13 @@ ao_ms5607_dump(void) printf ("ms5607 tref: %u\n", ms5607_prom.tref); printf ("ms5607 tempsens: %u\n", ms5607_prom.tempsens); printf ("ms5607 crc: %u\n", ms5607_prom.crc); +} + +static void +ao_ms5607_dump(void) +{ + struct ao_ms5607_sample sample; + struct ao_ms5607_value value; sample = ao_ms5607_current; ao_ms5607_convert(&sample, &value); @@ -238,7 +242,7 @@ ao_ms5607_dump(void) } __code struct ao_cmds ao_ms5607_cmds[] = { - { ao_ms5607_dump, "p\0Display MS5607 data" }, + { ao_ms5607_dump, "B\0Display MS5607 data" }, { 0, NULL }, }; diff --git a/src/drivers/ao_ms5607.h b/src/drivers/ao_ms5607.h index 1384d3a2..fa3b1c5b 100644 --- a/src/drivers/ao_ms5607.h +++ b/src/drivers/ao_ms5607.h @@ -62,6 +62,9 @@ struct ao_ms5607_value { void ao_ms5607_init(void); +void +ao_ms5607_info(void); + void ao_ms5607_sample(struct ao_ms5607_sample *sample);