28 #include <mraa/common.hpp> 29 #include <mraa/i2c.hpp> 31 #define H3LIS331DL_I2C_BUS 0 32 #define H3LIS331DL_DEFAULT_I2C_ADDR 0x18 82 REG_HP_FILTER_RESET = 0x25,
194 REG3_I1_CFG_SHIFT = 0,
200 REG3_I2_CFG_SHIFT = 3,
300 H3LIS331DL(
int bus, uint8_t address = H3LIS331DL_DEFAULT_I2C_ADDR);
596 void getXYZ(
int *x,
int *y,
int *z);
617 std::vector<int>
getXYZ();
629 int16_t m_rawX, m_rawY, m_rawZ;
630 int16_t m_adjX, m_adjY, m_adjZ;
uint8_t getStatus()
Definition: h3lis331dl.cxx:432
REG2_BITS_T
Definition: h3lis331dl.hpp:153
I_CFG_BITS_T
Definition: h3lis331dl.hpp:210
DR_BITS_T
Definition: h3lis331dl.hpp:130
uint8_t getChipID()
Definition: h3lis331dl.cxx:78
std::vector< float > getAcceleration()
Definition: h3lis331dl.cxx:603
std::vector< int > getRawXYZ()
Definition: h3lis331dl.cxx:610
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.hpp:245
bool setHPCF(HPCF_BITS_T val)
Definition: h3lis331dl.cxx:151
REG1_BITS_T
Definition: h3lis331dl.hpp:112
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
std::vector< int > getXYZ()
Definition: h3lis331dl.cxx:617
HPM_BITS_T
Definition: h3lis331dl.hpp:182
bool enableHPF1(bool enable)
Definition: h3lis331dl.cxx:207
H3LIS331DL_REG_T
Definition: h3lis331dl.hpp:65
bool enableHPF2(bool enable)
Definition: h3lis331dl.cxx:226
void update()
Definition: h3lis331dl.cxx:553
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
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
mraa::I2c & i2cContext()
Definition: h3lis331dl.hpp:625
API for the H3LIS331DL-based Grove 3-Axis Digital Accelerometer (400g)
Definition: h3lis331dl.hpp:59
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.hpp:236
bool setInterrupt1Threshold(uint8_t val)
Definition: h3lis331dl.cxx:471
PM_BITS_T
Definition: h3lis331dl.hpp:140
REG3_BITS_T
Definition: h3lis331dl.hpp:191
STATUS_BITS_T
Definition: h3lis331dl.hpp:255
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.hpp:172
REG4_BITS_T
Definition: h3lis331dl.hpp:220
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.hpp:269
~H3LIS331DL()
Definition: h3lis331dl.cxx:54
bool setInterrupt1PadConfig(I_CFG_BITS_T val)
Definition: h3lis331dl.cxx:340
INT_SRC_BITS_T
Definition: h3lis331dl.hpp:283
bool enableFDS(bool enable)
Definition: h3lis331dl.cxx:245