27 #include <mraa/common.hpp>
28 #include <mraa/i2c.hpp>
30 #define H3LIS331DL_I2C_BUS 0
31 #define H3LIS331DL_DEFAULT_I2C_ADDR 0x18
81 REG_HP_FILTER_RESET = 0x25,
193 REG3_I1_CFG_SHIFT = 0,
199 REG3_I2_CFG_SHIFT = 3,
299 H3LIS331DL(
int bus, uint8_t address = H3LIS331DL_DEFAULT_I2C_ADDR);
595 void getXYZ(
int *x,
int *y,
int *z);
631 int16_t m_rawX, m_rawY, m_rawZ;
632 int16_t m_adjX, m_adjY, m_adjZ;
uint8_t getStatus()
Definition: h3lis331dl.cxx:432
REG2_BITS_T
Definition: h3lis331dl.h:152
I_CFG_BITS_T
Definition: h3lis331dl.h:209
DR_BITS_T
Definition: h3lis331dl.h:129
uint8_t getChipID()
Definition: h3lis331dl.cxx:78
H3LIS331DL(int bus, uint8_t address=H3LIS331DL_DEFAULT_I2C_ADDR)
Definition: h3lis331dl.cxx:37
bool setInterrupt1Source(uint8_t val)
Definition: h3lis331dl.cxx:454
bool setInterrupt1Duration(uint8_t val)
Definition: h3lis331dl.cxx:483
bool setFullScale(FS_BITS_T fs)
Definition: h3lis331dl.cxx:134
bool setInterrupt2PadConfig(I_CFG_BITS_T val)
Definition: h3lis331dl.cxx:357
REG5_BITS_T
Definition: h3lis331dl.h:244
bool setHPCF(HPCF_BITS_T val)
Definition: h3lis331dl.cxx:151
REG1_BITS_T
Definition: h3lis331dl.h:111
bool setInterrupt2Source(uint8_t val)
Definition: h3lis331dl.cxx:512
bool setDataRate(DR_BITS_T odr)
Definition: h3lis331dl.cxx:83
bool enableBDU(bool enable)
Definition: h3lis331dl.cxx:375
HPM_BITS_T
Definition: h3lis331dl.h:181
bool enableHPF1(bool enable)
Definition: h3lis331dl.cxx:207
H3LIS331DL_REG_T
Definition: h3lis331dl.h:64
bool enableHPF2(bool enable)
Definition: h3lis331dl.cxx:226
void update()
Definition: h3lis331dl.cxx:553
void getAcceleration(float *aX, float *aY, float *aZ)
Definition: h3lis331dl.cxx:580
bool enableBLE(bool enable)
Definition: h3lis331dl.cxx:394
void setAdjustmentOffsets(int adjX, int adjY, int adjZ)
Definition: h3lis331dl.cxx:573
bool setInterrupt2Threshold(uint8_t val)
Definition: h3lis331dl.cxx:529
bool setInterrupt1Latch(bool enable)
Definition: h3lis331dl.cxx:302
mraa::I2c & i2cContext()
Definition: h3lis331dl.h:627
API for the H3LIS331DL-based Grove 3-Axis Digital Accelerometer (400g)
Definition: h3lis331dl.h:58
void getXYZ(int *x, int *y, int *z)
Definition: h3lis331dl.cxx:596
bool boot()
Definition: h3lis331dl.cxx:185
bool enableSleepToWake(bool enable)
Definition: h3lis331dl.cxx:413
bool setInterruptActiveLow(bool enable)
Definition: h3lis331dl.cxx:264
bool setPowerMode(PM_BITS_T pm)
Definition: h3lis331dl.cxx:100
FS_BITS_T
Definition: h3lis331dl.h:235
bool setInterrupt1Threshold(uint8_t val)
Definition: h3lis331dl.cxx:471
PM_BITS_T
Definition: h3lis331dl.h:139
REG3_BITS_T
Definition: h3lis331dl.h:190
STATUS_BITS_T
Definition: h3lis331dl.h:254
bool setInterrupt2Duration(uint8_t val)
Definition: h3lis331dl.cxx:541
bool setInterrupt1Config(uint8_t val)
Definition: h3lis331dl.cxx:437
bool setInterrupt2Latch(bool enable)
Definition: h3lis331dl.cxx:321
bool setHPM(HPM_BITS_T val)
Definition: h3lis331dl.cxx:168
bool setInterrupt2Config(uint8_t val)
Definition: h3lis331dl.cxx:495
HPCF_BITS_T
Definition: h3lis331dl.h:171
REG4_BITS_T
Definition: h3lis331dl.h:219
bool setInterruptOpenDrain(bool enable)
Definition: h3lis331dl.cxx:283
bool init(DR_BITS_T odr=DR_50_37, PM_BITS_T pm=PM_NORMAL, FS_BITS_T fs=FS_100)
Definition: h3lis331dl.cxx:58
bool enableAxis(uint8_t axisEnable)
Definition: h3lis331dl.cxx:117
INT_CFG_BITS_T
Definition: h3lis331dl.h:268
~H3LIS331DL()
Definition: h3lis331dl.cxx:54
bool setInterrupt1PadConfig(I_CFG_BITS_T val)
Definition: h3lis331dl.cxx:340
INT_SRC_BITS_T
Definition: h3lis331dl.h:282
bool enableFDS(bool enable)
Definition: h3lis331dl.cxx:245
void getRawXYZ(int *x, int *y, int *z)
Definition: h3lis331dl.cxx:589