1#ifndef SERIAL_SIM_LIS3MDL_H
2#define SERIAL_SIM_LIS3MDL_H
6#ifndef LIS3MDL_DATARATE_155_HZ
7#define LIS3MDL_DATARATE_155_HZ 0x06
10#ifndef LIS3MDL_RANGE_4_GAUSS
11#define LIS3MDL_RANGE_4_GAUSS 0x01
14#ifndef LIS3MDL_CONTINUOUSMODE
15#define LIS3MDL_CONTINUOUSMODE 0x00
18#ifndef LIS3MDL_MEDIUMMODE
19#define LIS3MDL_MEDIUMMODE 0x01
36 void setRange(
int range) { this->range_ = range; }
39 void setIntThreshold(
int threshold) { intThreshold_ =
static_cast<uint16_t
>(threshold); }
61 uint16_t intThreshold_ = 0;
#define LIS3MDL_DATARATE_155_HZ
#define LIS3MDL_MEDIUMMODE
#define LIS3MDL_RANGE_4_GAUSS
#define LIS3MDL_CONTINUOUSMODE
void configInterrupt(bool a, bool b, bool c, bool d, bool e, bool f)
void getEvent(sensors_event_t *mag)
void setDataRate(int rate)
void setIntThreshold(int threshold)
void configInterrupt(bool a, bool b, bool c)
void setOperationMode(int mode)
uint16_t getIntThreshold()
void setPerformanceMode(int mode)
void updateMag(sensors_event_t *mag)
static SerialSim & getInstance()