31 #include <mraa/gpio.hpp> 88 LSM303AGR(
int bus=LSM303AGR_DEFAULT_I2C_BUS,
89 int acc_addr=LSM303AGR_DEFAULT_ACC_ADDR,
90 int mag_addr=LSM303AGR_DEFAULT_MAG_ADDR);
181 void init(LSM303AGR_POWER_MODE_T usage=LSM303AGR_POWER_HIGH_RESOLUTION);
318 void installISR(LSM303AGR_INTERRUPT_PINS_T intr,
int gpio,
320 void (*isr)(
void *),
void *arg);
350 int readRegs(uint8_t reg, uint8_t *buffer,
int len);
359 void writeReg(uint8_t reg, uint8_t val);
std::vector< float > getAccelerometer()
Definition: lsm303agr.cxx:104
uint8_t readReg(uint8_t reg)
Definition: lsm303agr.cxx:64
void setAccelerometerInt2Config(uint8_t bits)
Definition: lsm303agr.cxx:162
float getTemperature()
Definition: lsm303agr.cxx:112
uint8_t getMagnetometerIntConfig()
Definition: lsm303agr.cxx:169
void writeReg(uint8_t reg, uint8_t val)
Definition: lsm303agr.cxx:79
std::vector< float > getMagnetometer()
Definition: lsm303agr.cxx:91
LSM303AGR(int bus=LSM303AGR_DEFAULT_I2C_BUS, int acc_addr=LSM303AGR_DEFAULT_ACC_ADDR, int mag_addr=LSM303AGR_DEFAULT_MAG_ADDR)
Definition: lsm303agr.cxx:37
void setFullScale(LSM303AGR_A_FS_T fs)
Definition: lsm303agr.cxx:117
uint8_t getMagnetometerIntSrc()
Definition: lsm303agr.cxx:191
API for the LSM303AGR 3-Axis Geomagnetic Sensor.
Definition: lsm303agr.hpp:68
C API for the lsm303agr driver.
~LSM303AGR()
Definition: lsm303agr.cxx:45
void setAccelerometerInt1Config(uint8_t bits)
Definition: lsm303agr.cxx:155
Definition: lsm303agr.h:53
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
void setMagnetometerODR(LSM303AGR_CFG_A_M_ODR_T odr)
Definition: lsm303agr.cxx:138
void setAccelerometerODR(LSM303AGR_A_ODR_T odr)
Definition: lsm303agr.cxx:131
uint8_t getAccelerometerInt1Src()
Definition: lsm303agr.cxx:181
void uninstallISR(LSM303AGR_INTERRUPT_PINS_T intr)
Definition: lsm303agr.cxx:207
void init(LSM303AGR_POWER_MODE_T usage=LSM303AGR_POWER_HIGH_RESOLUTION)
Definition: lsm303agr.cxx:50
void update()
Definition: lsm303agr.cxx:57
int readRegs(uint8_t reg, uint8_t *buffer, int len)
Definition: lsm303agr.cxx:69
void installISR(LSM303AGR_INTERRUPT_PINS_T intr, int gpio, mraa::Edge level, void(*isr)(void *), void *arg)
Definition: lsm303agr.cxx:197
void setMagnetometerIntConfig(uint8_t bits)
Definition: lsm303agr.cxx:174
uint8_t getAccelerometerInt2Config()
Definition: lsm303agr.cxx:150
void setPowerMode(LSM303AGR_POWER_MODE_T mode)
Definition: lsm303agr.cxx:124
uint8_t getAccelerometerInt2Src()
Definition: lsm303agr.cxx:186
uint8_t getAccelerometerInt1Config()
Definition: lsm303agr.cxx:145