altosui: Add config and pyro tabs to graph widget
[fw/altos] / src / drivers / ao_hmc5883.c
index f470570829e82eebd6ae34a978acf9eee3a8a683..fc339334c51889181cae88d37f80bf33a20ef3f6 100644 (file)
@@ -66,7 +66,7 @@ ao_hmc5883_isr(void)
 
 static uint32_t        ao_hmc5883_missed_irq;
 
-void
+static void
 ao_hmc5883_sample(struct ao_hmc5883_sample *sample)
 {
        uint16_t        *d = (uint16_t *) sample;
@@ -87,7 +87,7 @@ ao_hmc5883_sample(struct ao_hmc5883_sample *sample)
        /* byte swap */
        while (i--) {
                uint16_t        t = *d;
-               *d++ = (t >> 8) | (t << 8);
+               *d++ = (uint16_t) ((t >> 8) | (t << 8));
        }
 #endif
 }