Go to the documentation of this file.
51 #define CONFIG_FXOS8700_USE_ACC_RAW_VALUES
int fxos8700_read_cached(const void *dev, fxos8700_measurement_t *acc, fxos8700_measurement_t *mag)
Extended read function including caching capability.
uint8_t acc_range
Accelerator full-scale range.
int fxos8700_read(const fxos8700_t *dev, fxos8700_measurement_t *acc, fxos8700_measurement_t *mag)
Convenience function for reading acceleration and magnetic field.
@ FXOS8700_BUSERR
error during I2C communication
unsigned int i2c_t
Default i2c_t type definition.
fxos8700_measurement_t acc_cached
cached 3-axis acceleration
int16_t z
z axis of 3-axis measurement
uint32_t last_read_time
last time when cached data was refreshed
int16_t y
y axis of 3-axis measurement
uint8_t config
sensor configuration including active mode
int fxos8700_init(fxos8700_t *dev, const fxos8700_params_t *params)
Initialize an FXOS8700 device.
@ FXOS8700_NODEV
no FXOS8700 device found on the bus
@ FXOS8700_NOBUS
errors while initializing the I2C bus
int fxos8700_set_idle(const fxos8700_t *dev)
Convenience function for turning off the FXOS8700.
uint32_t renew_interval
Interval for cache renewal.
fxos8700_params_t p
configuration parameters
int16_t x
x axis of 3-axis measurement
uint8_t addr
I2C address of this particular sensor.
@ FXOS8700_ADDRERR
no FXOS8700 device found on the bus
Parameters needed for device initialization.
Device descriptor for a FXOS8700 device.
i2c_t i2c
I2C device that sensor is connected to.
Register definitions for FXOS8700 devices.
Low-level I2C peripheral driver interface definition.
fxos8700_measurement_t mag_cached
cached 3-axis magnetic field
Individual 3-axis measurement.
int fxos8700_set_active(const fxos8700_t *dev)
Convenience function for turning on the FXOS8700.
@ FXOS8700_OK
everything went as expected