128 bool init()
override;
155 Config configuration;
157 unsigned tempCounter = 0;
158 bool isInitialized =
false;
159 float currentUnit = 0;
161 enum Registers : uint8_t
187 static constexpr uint32_t WHO_AM_I_VALUE = 0x3d;
188 static constexpr uint32_t CONTINUOS_CONVERSION = 0x0;
190 static constexpr uint32_t REFERENCE_TEMPERATURE = 25;
191 static constexpr float DEG_PER_LSB = 0.125;
193 static constexpr float GAUSS_PER_LSB_FS_4 = 0.000146156;
194 static constexpr float GAUSS_PER_LSB_FS_8 = 0.000292312;
195 static constexpr float GAUSS_PER_LSB_FS_12 = 0.000438404;
196 static constexpr float GAUSS_PER_LSB_FS_16 = 0.000584454;
198 static constexpr uint32_t ENABLE_TEMPERATURE = 1 << 7;
199 static constexpr uint32_t ENABLE_SELF_TEST = 1 << 0;
200 static constexpr uint32_t ENABLE_BDU = 1 << 6;
202 static constexpr uint32_t ENABLE_INT_PIN = 1 << 0;
203 static constexpr uint32_t ENABLE_INT_X = 1 << 7;
204 static constexpr uint32_t ENABLE_INT_Y = 1 << 6;
205 static constexpr uint32_t ENABLE_INT_Z = 1 << 5;
212 static constexpr uint8_t INCREMENT_REG_FLAG = 0x40;