You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2021/05/04 13:17:55 UTC
[incubator-nuttx] 01/02: sensor: Fix bad bit mask macro in mpu60x0
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit e155af891a88c97fd27a7ea94ebf77bd9699d6f5
Author: Brennan Ashton <ba...@brennanashton.com>
AuthorDate: Sun May 2 22:16:54 2021 -0700
sensor: Fix bad bit mask macro in mpu60x0
---
drivers/sensors/mpu60x0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/sensors/mpu60x0.c b/drivers/sensors/mpu60x0.c
index 35d622f..84edf65 100644
--- a/drivers/sensors/mpu60x0.c
+++ b/drivers/sensors/mpu60x0.c
@@ -77,7 +77,7 @@
/* Masks and shifts @v into bit field @m */
-#define TO_BITFIELD(m,v) ((v) & MASK(m ##__WIDTH) << (m ##__SHIFT))
+#define TO_BITFIELD(m,v) (((v) & MASK(m ##__WIDTH)) << (m ##__SHIFT))
/* Un-masks and un-shifts bit field @m from @v */