Go to the documentation of this file.
39 #define LSM303DLHC_ACC_DEFAULT_ADDRESS (0x19)
40 #define LSM303DLHC_MAG_DEFAULT_ADDRESS (0x1e)
@ LSM303DLHC_ACC_SAMPLE_RATE_400HZ
400Hz sample rate
@ LSM303DLHC_ACC_SCALE_2G
+- 2g range
@ LSM303DLHC_ACC_SAMPLE_RATE_1620HZ
1620Hz sample rate
uint8_t acc_addr
accelerometer I2C address
int lsm303dlhc_read_mag(const lsm303dlhc_t *dev, lsm303dlhc_3d_data_t *data)
Read a magnetometer value from the sensor.
gpio_t acc_pin
accelerometer EXTI pin
lsm303dlhc_acc_scale_t
Possible accelerometer scales.
@ LSM303DLHC_MAG_GAIN_450_400_GAUSS
450Gauss XYZ 400Gauss Z
int16_t z_axis
surprise, holds the z axis value
lsm303dlhc_mag_gain_t mag_gain
magnetometer gain
@ LSM303DLHC_ACC_SAMPLE_RATE_1HZ
1Hz sample rate
unsigned int i2c_t
Default i2c_t type definition.
lsm303dlhc_acc_sample_rate_t
Possible accelerometer sample rates.
int lsm303dlhc_enable(const lsm303dlhc_t *dev)
Enable the given sensor.
int lsm303dlhc_read_temp(const lsm303dlhc_t *dev, int16_t *value)
Read a temperature value from the sensor.
lsm303dlhc_acc_sample_rate_t acc_rate
accelerometer sample rate
@ LSM303DLHC_ACC_SAMPLE_RATE_50HZ
50Hz sample rate
lsm303dlhc_mag_sample_rate_t mag_rate
magnetometer sample rate
int lsm303dlhc_disable(const lsm303dlhc_t *dev)
Disable the given sensor.
int16_t x_axis
holds the x axis value.
Device descriptor for LSM303DLHC sensors.
@ LSM303DLHC_ACC_SAMPLE_RATE_25HZ
25Hz sample rate
@ LSM303DLHC_MAG_GAIN_1100_980_GAUSS
1100Gauss XYZ 980Gauss Z
int lsm303dlhc_read_acc(const lsm303dlhc_t *dev, lsm303dlhc_3d_data_t *data)
Read a accelerometer value from the sensor.
@ LSM303DLHC_MAG_SAMPLE_RATE_30HZ
30 Hz sample rate
@ LSM303DLHC_MAG_GAIN_855_760_GAUSS
855Gauss XYZ 760Gauss Z
@ LSM303DLHC_MAG_SAMPLE_RATE_1_5HZ
1.5 Hz sample rate
@ LSM303DLHC_MAG_SAMPLE_RATE_3HZ
3 Hz sample rate
@ LSM303DLHC_MAG_SAMPLE_RATE_7_5HZ
7.5 Hz sample rate
@ LSM303DLHC_MAG_GAIN_230_205_GAUSS
230Gauss XYZ 205Gauss Z
@ LSM303DLHC_ACC_SCALE_4G
+- 4g range
@ LSM303DLHC_MAG_SAMPLE_RATE_75HZ
75 Hz sample rate
@ LSM303DLHC_ACC_SCALE_8G
+- 8g range
lsm303dlhc_mag_sample_rate_t
Possible magnetometer sample rates.
gpio_t mag_pin
magnetometer EXTI pin
Low-level GPIO peripheral driver interface definitions.
lsm303dlhc_params_t params
device initialization parameters
int16_t y_axis
holds the y axis value.
@ LSM303DLHC_MAG_GAIN_400_355_GAUSS
400Gauss XYZ 355Gauss Z
@ LSM303DLHC_ACC_SCALE_16G
+-16g range
@ LSM303DLHC_ACC_SAMPLE_RATE_100HZ
100Hz sample rate
@ LSM303DLHC_MAG_GAIN_330_295_GAUSS
330Gauss XYZ 295Gauss Z
lsm303dlhc_mag_gain_t
Possible magnetometer gain values.
int lsm303dlhc_init(lsm303dlhc_t *dev, const lsm303dlhc_params_t *params)
Initialize a new LSM303DLHC device.
uint8_t mag_addr
magnetometer I2C address
@ LSM303DLHC_ACC_SAMPLE_RATE_10HZ
10Hz sample rate
@ LSM303DLHC_MAG_SAMPLE_RATE_15HZ
15 Hz sample rate
Data structure holding all the information needed for initialization.
@ LSM303DLHC_ACC_SAMPLE_RATE_200HZ
200Hz sample rate
@ LSM303DLHC_MAG_GAIN_670_600_GAUSS
670Gauss XYZ 600Gauss Z
Low-level I2C peripheral driver interface definition.
@ LSM303DLHC_MAG_SAMPLE_RATE_220HZ
220 Hz sample rate
lsm303dlhc_acc_scale_t acc_scale
accelerometer scale factor
@ LSM303DLHC_MAG_SAMPLE_RATE_0_75HZ
0.75Hz sample rate
@ LSM303DLHC_ACC_SAMPLE_RATE_N1344HZ_L5376HZ
1344Hz normal mode, 5376Hz low power mode