139#if MODULE_HMC5883L_INT || DOXYGEN
160#if MODULE_HMC5883L_INT
175#if MODULE_HMC5883L_INT
197#if MODULE_HMC5883L_INT || DOXYGEN
Low-level GPIO peripheral driver interface definitions.
hmc5883l_dor_t
Data output rates (DOR)
int hmc5883l_power_down(hmc5883l_t *dev)
Power down the sensor.
int hmc5883l_data_ready(const hmc5883l_t *dev)
Data-ready status function.
int hmc5883l_init(hmc5883l_t *dev, const hmc5883l_params_t *params)
Initialize the HMC5883L sensor device.
int hmc5883l_init_int(hmc5883l_t *dev, hmc5883l_drdy_int_cb_t cb, void *arg)
Initialize and activate the DRDY interrupt of HMC5883L sensor device.
hmc5883l_error_codes_t
Definition of error codes.
hmc5883l_gain_t
Gain (determines the sensitivity and the range)
int hmc5883l_read_raw(const hmc5883l_t *dev, hmc5883l_raw_data_t *raw)
Read one sample of raw sensor data as 16 bit two's complements.
hmc5883l_meas_mode_t
Measurement modes.
int hmc5883l_read(const hmc5883l_t *dev, hmc5883l_data_t *data)
Read one sample of magnetic field values in milli-Gauss (mGs)
int hmc5883l_power_up(hmc5883l_t *dev)
Power up the sensor.
void(* hmc5883l_drdy_int_cb_t)(void *)
HMC5883L DRDY interrupt callback function type.
hmc5883l_meas_avg_t
Measurement avaraging (number of samples are averaged for output)
hmc5883l_op_mode_t
Operation modes.
@ HMC5883L_DOR_0_75
0.75 Hz
@ HMC5883L_DOR_15
15 Hz (default)
@ HMC5883L_ERROR_COMMON
common error
@ HMC5883L_ERROR_NO_DATA
no data are available
@ HMC5883L_ERROR_WRONG_ID
wrong id read
@ HMC5883L_ERROR_RAW_DATA
reading raw data failed
@ HMC5883L_ERROR_I2C
any I2C communication error
@ HMC5883L_GAIN_390
Range +-4.7 Gs, Resolution 2.56 mGs/LSB.
@ HMC5883L_GAIN_330
Range +-5.6 Gs, Resolution 3.03 mGs/LSB.
@ HMC5883L_GAIN_1090
Range +-1.3 Gs, Resolution 0.92 mGs/LSB.
@ HMC5883L_GAIN_1370
Range +-0.88 Gs, Resolution 0.73 mGs/LSB.
@ HMC5883L_GAIN_820
Range +-1.9 Gs, Resolution 1.22 mGs/LSB.
@ HMC5883L_GAIN_230
Range +-8.1 Gs, Resolution 4.35 mGs/LSB.
@ HMC5883L_GAIN_440
Range +-4.0 Gs, Resolution 2.27 mGs/LSB.
@ HMC5883L_GAIN_660
Range +-2.5 Gs, Resolution 1.52 mGs/LSB.
@ HMC5883L_MEAS_MODE_BIAS_NEG
Negative bias config for all axes.
@ HMC5883L_MEAS_MODE_BIAS_POS
Positive bias config for all axes.
@ HMC5883L_MEAS_MODE_NORMAL
Normal measurement config.
@ HMC5883L_MEAS_AVG_NONE
No averaging.
@ HMC5883L_MEAS_AVG_2
2 samples are averaged
@ HMC5883L_MEAS_AVG_8
8 samples are averaged
@ HMC5883L_MEAS_AVG_4
4 samples are averaged
@ HMC5883L_OP_MODE_IDLE
Idle mode.
@ HMC5883L_OP_MODE_SINGLE
Single measurement.
@ HMC5883L_OP_MODE_CONTINUOUS
Continuous measurement.
Low-level I2C peripheral driver interface definition.
Magnetic field values in milli-Gauss (mGs)
int16_t z
magnetic field y-axis
int16_t y
magnetic field y-axis
int16_t x
magnetic field x-axis
HMC5883L device initialization parameters.
hmc5883l_dor_t dor
Data output rate (default HMC5883L_DOR_15)
hmc5883l_meas_mode_t meas_mode
Measurement mode (default HMC5883L_MEAS_MODE_NORMAL)
hmc5883l_meas_avg_t meas_avg
Measurement avaraging (default HMC5883L_MEAS_AVG_NONE)
hmc5883l_gain_t gain
Gain (default HMC5883L_GAIN_1090)
hmc5883l_op_mode_t op_mode
Operation mode (HMC5883L_OP_MODE_CONTINUOUS)
Raw data set as two complements.
int16_t z
magnetic field z-axis as 16 bit two's complements
int16_t x
magnetic field x-axis as 16 bit two's complements
int16_t y
magnetic field y-axis as 16 bit two's complements
HMC5883L sensor device data structure type.
hmc5883l_op_mode_t op_mode
Operation mode (HMC5883L_OP_MODE_CONTINUOUS)
hmc5883l_gain_t gain
Gain (default HMC5883L_GAIN_1090)