projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/stm32f103-nucleo: Use more bits
[fw/altos]
/
src
/
drivers
/
ao_hmc5883.c
diff --git
a/src/drivers/ao_hmc5883.c
b/src/drivers/ao_hmc5883.c
index f470570829e82eebd6ae34a978acf9eee3a8a683..fc339334c51889181cae88d37f80bf33a20ef3f6 100644
(file)
--- 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;
static uint32_t ao_hmc5883_missed_irq;
-void
+
static
void
ao_hmc5883_sample(struct ao_hmc5883_sample *sample)
{
uint16_t *d = (uint16_t *) sample;
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;
/* byte swap */
while (i--) {
uint16_t t = *d;
- *d++ = (
t >> 8) | (t << 8
);
+ *d++ = (
uint16_t) ((t >> 8) | (t << 8)
);
}
#endif
}
}
#endif
}