26 reg_val = (reg_val & ~mask) | (val & mask);
Axis structure for 3D information.
bool _lsm303RmwReg(I2C_Device *dev, uint8_t addr, uint8_t reg, uint8_t val, uint8_t mask)
Internal function shared for both LSM303 drivers.
static uint16_t _lsm303RawDataToI16(uint8_t *data)
Function shared for both LSM303 drivers.
void _lsm303RawDataToAxis(uint8_t *data, Lsm303Axis *axis)
Internal function shared for both LSM303 drivers.
Structure defines OpenCores I2C Device.
bool i2cReadReg(I2C_Device *dev, i2cAddr addr, uint8_t regNo, uint8_t *rd, int rdLen)
Reads from the I2C device register.
bool i2cWriteReg(I2C_Device *dev, i2cAddr addr, uint8_t regNo, uint8_t *wr, int wrLen)
Writes to the I2C device register.
static bool errRebase(const char *name)
Rebases the cause of the error message.