Go to the documentation of this file.
71 #define QMC5883L_ADDR (0x0d)
244 #if defined(MODULE_QMC5883L_INT) || defined(DOXYGEN)
qmc5883l_osr_t osr
oversampling rate
int qmc5883l_poweron(const qmc5883l_t *dev)
Power on the sensor (put it into continuous sampling mode)
int qmc5883l_irq_disable(const qmc5883l_t *dev)
Disable the data ready (DRDY) interrupt.
i2c_t i2c
I2C bus the sensor is connected to.
@ QMC5883L_OSR_64
64 samples per reading
qmc5883l_osr_t
Over sample rate (bandwidth of internal digital filter)
@ QMC5883L_ODR_10HZ
10Hz data output rate
QMC5883L initialization parameters.
qmc5883l_odr_t
Output data rate.
unsigned int i2c_t
Default i2c_t type definition.
int qmc5883l_read(const qmc5883l_t *dev, int16_t *data_out)
Read sampled data from the device [converted to milli-Gauss].
@ QMC5883L_OSR_256
256 samples per reading
qmc5883l_odr_t odr
output data rate
i2c_t i2c
I2C bus the sensor is connected to.
@ QMC5883L_ODR_200HZ
200Hz data output rate
gpio_t pin_drdy
DRDY ISR pin, set to GPIO_UNDEF if unused.
QMC5883L device descriptor.
@ QMC5883L_NOCFG
configuration error
@ QMC5883L_RNG_2G
2 Gauss data output range
@ QMC5883L_ODR_50HZ
50Hz data output rate
void(* gpio_cb_t)(void *arg)
Signature of event callback functions triggered from interrupts.
int qmc5883l_init_int(const qmc5883l_t *dev, gpio_cb_t cb, void *arg)
Initialize data ready (DRDY) interrupt notifications.
@ QMC5883L_BUSERR
i2c bus error
@ QMC5883L_NODATA
no data are available
Low-level GPIO peripheral driver interface definitions.
int qmc5883l_init(qmc5883l_t *dev, const qmc5883l_params_t *params)
Initialize the given QMC5883L magnetic sensor.
int qmc5883l_poweroff(const qmc5883l_t *dev)
Power off the sensor (put it into standby mode)
int qmc5883l_irq_enable(const qmc5883l_t *dev)
Enable the data ready (DRDY) interrupt.
@ QMC5883L_RNG_8G
8 Gauss data output range
uint8_t cfg
actual applied device configuration
@ QMC5883L_OVERFLOW
at least one axis overflowed its range
@ QMC5883L_OSR_512
512 samples per reading
qmc5883l_rng_t rng
output data range
qmc5883l_rng_t
Output value range.
gpio_t pin_drdy
DRDY interrupt pin.
int qmc5883l_read_raw(const qmc5883l_t *dev, int16_t *data_out)
Read RAW data from the device.
Low-level I2C peripheral driver interface definition.
@ QMC5883L_ODR_100HZ
100Hz data output rate
@ QMC5883L_OSR_128
128 samples per reading
int qmc5883l_data_ready(const qmc5883l_t *dev)
Check if new data is available.