altos: Other half of the ms5607 prom reporting patch
authorKeith Packard <keithp@keithp.com>
Tue, 5 Jun 2012 03:53:53 +0000 (20:53 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 5 Jun 2012 03:53:53 +0000 (20:53 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
src/drivers/ao_ms5607.c
src/drivers/ao_ms5607.h

index 7db7022fda4f0965641f11001c739fe373aab989..0f0625d09bd305e87c6c4a33a378ae2db887a749 100644 (file)
@@ -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 },
 };
 
index 1384d3a2ce6a026749769a485b1ec47bf9967fb2..fa3b1c5b83df662386411e1a36d7439b2e7c29b9 100644 (file)
@@ -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);