X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fdrivers%2Fao_hmc5883.c;fp=src%2Fdrivers%2Fao_hmc5883.c;h=fc339334c51889181cae88d37f80bf33a20ef3f6;hb=71c3652d6c511db03402f5b7487bc4098e6d850f;hp=55a193ac5adb58236acb51be0e3a3f9eb78fe5e5;hpb=c783aafd89777626c362e15c47360b399d03c45d;p=fw%2Faltos diff --git a/src/drivers/ao_hmc5883.c b/src/drivers/ao_hmc5883.c index 55a193ac..fc339334 100644 --- a/src/drivers/ao_hmc5883.c +++ b/src/drivers/ao_hmc5883.c @@ -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 }