Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos] / src / drivers / ao_mpu9250.c
index 09b65bfa749c8cd7de7b1e5f6ff712d5cc602c74..a77abf98dfe7bcfa2d6ce3b8267b1571dd7d642b 100644 (file)
@@ -176,7 +176,7 @@ _ao_mpu9250_sample(struct ao_mpu9250_sample *sample)
        /* byte swap */
        while (i--) {
                uint16_t        t = *d;
-               *d++ = (t >> 8) | (t << 8);
+               *d++ = (uint16_t) ((uint16_t) (t >> 8) | (uint16_t) (t << 8));
        }
 #endif
 }