aboutsummaryrefslogtreecommitdiffhomepage
path: root/source/Core/Drivers/Si7210.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Core/Drivers/Si7210.cpp')
-rw-r--r--source/Core/Drivers/Si7210.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/Core/Drivers/Si7210.cpp b/source/Core/Drivers/Si7210.cpp
index 0bffb671..8683672f 100644
--- a/source/Core/Drivers/Si7210.cpp
+++ b/source/Core/Drivers/Si7210.cpp
@@ -13,7 +13,8 @@
#include "Si7210_defines.h"
#include "accelerometers_common.h"
#include <Si7210.h>
-bool Si7210::detect() { return ACCEL_I2C_CLASS::wakePart(SI7210_ADDRESS); }
+#ifdef MAG_SLEEP_SUPPORT
+bool Si7210::detect() { return FRToSI2C::wakePart(SI7210_ADDRESS); }
bool Si7210::init() {
// Turn on auto increment and sanity check ID
@@ -185,3 +186,4 @@ bool Si7210::set_high_range() {
worked &= write_reg(SI7210_A5, 0, val);
return worked;
}
+#endif // MAG_SLEEP_SUPPORT \ No newline at end of file