1
0
forked from me/IronOS

Make I2C mag optional

This commit is contained in:
Ben V. Brown
2023-07-22 18:18:29 +10:00
parent 1396363eaa
commit 296aecab00
4 changed files with 15 additions and 8 deletions

View File

@@ -13,6 +13,7 @@
#include "I2C_Wrapper.hpp"
#include "Si7210_defines.h"
#include <Si7210.h>
#ifdef MAG_SLEEP_SUPPORT
bool Si7210::detect() { return FRToSI2C::wakePart(SI7210_ADDRESS); }
bool Si7210::init() {
@@ -175,3 +176,4 @@ bool Si7210::set_high_range() {
worked &= write_reg(SI7210_A5, 0, val);
return worked;
}
#endif // MAG_SLEEP_SUPPORT