X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdrivers%2Fao_hmc5883.c;h=55a193ac5adb58236acb51be0e3a3f9eb78fe5e5;hb=HEAD;hp=f470570829e82eebd6ae34a978acf9eee3a8a683;hpb=684741765117611b7d666efbdfafd87c6199752c;p=fw%2Faltos diff --git a/src/drivers/ao_hmc5883.c b/src/drivers/ao_hmc5883.c index f4705708..fc339334 100644 --- a/src/drivers/ao_hmc5883.c +++ b/src/drivers/ao_hmc5883.c @@ -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 }