X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdrivers%2Fao_mpu9250.c;h=a77abf98dfe7bcfa2d6ce3b8267b1571dd7d642b;hb=28c389c08a37010fdbb26e9923d16c3204862e67;hp=09b65bfa749c8cd7de7b1e5f6ff712d5cc602c74;hpb=341157c7415fcf879696c9d8167722a0c5ff264c;p=fw%2Faltos diff --git a/src/drivers/ao_mpu9250.c b/src/drivers/ao_mpu9250.c index 09b65bfa..a77abf98 100644 --- a/src/drivers/ao_mpu9250.c +++ b/src/drivers/ao_mpu9250.c @@ -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 }