summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/accel.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/accel.c')
-rw-r--r--stmhal/accel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/stmhal/accel.c b/stmhal/accel.c
index 339a93ea40..47c7a1a494 100644
--- a/stmhal/accel.c
+++ b/stmhal/accel.c
@@ -12,6 +12,8 @@
#include "i2c.h"
#include "accel.h"
+#if MICROPY_HW_HAS_MMA7660
+
#define MMA_ADDR (0x98)
#define MMA_REG_X (0)
#define MMA_REG_Y (1)
@@ -174,3 +176,5 @@ const mp_obj_type_t pyb_accel_type = {
.make_new = pyb_accel_make_new,
.locals_dict = (mp_obj_t)&pyb_accel_locals_dict,
};
+
+#endif // MICROPY_HW_HAS_MMA7660