Loading...
Searching...
No Matches

Device driver interface for the Bosch BMX055 9-axis sensor. More...

Detailed Description

Device driver interface for the Bosch BMX055 9-axis sensor.

Note
The current state of the driver only implements basic polling.
Author
Semjon Kerner semjo.nosp@m.n.ke.nosp@m.rner@.nosp@m.fu-b.nosp@m.erlin.nosp@m..de

Definition in file bmx055.h.

#include <stdint.h>
#include "periph/i2c.h"
#include "periph/gpio.h"
+ Include dependency graph for bmx055.h:

Go to the source code of this file.

Data Structures

struct  bmx055_params_t
 Data structure holding the device parameters needed for initialization. More...
 
struct  bmx055_t
 Device descriptor for BMX055 sensors. More...
 

Macros

#define CONFIG_BMX055_MAG_ADDR_DEFAULT   (0x10U)
 Magnetometer default address.
 
#define CONFIG_BMX055_ACC_ADDR_DEFAULT   (0x18U)
 Accelerometer default address.
 
#define CONFIG_BMX055_GYRO_ADDR_DEFAULT   (0x68U)
 Gyroscope default address.
 

Enumerations

enum  {
  BMX055_OK = 0 , BMX055_NOBUS = -1 , BMX055_NODEV = -2 , BMX055_NOREAD = -3 ,
  BMX055_NOWRITE = -4 , BMX055_NOTREADY = -5
}
 Status and error return codes. More...
 
enum  bmx055_mag_rate_t {
  BMX055_MAG_DRATE_DEFAULT = 0x0 , BMX055_MAG_DRATE_02HZ = 0x1 , BMX055_MAG_DRATE_06HZ = 0x2 , BMX055_MAG_DRATE_08HZ = 0x3 ,
  BMX055_MAG_DRATE_15HZ = 0x4 , BMX055_MAG_DRATE_20HZ = 0x5 , BMX055_MAG_DRATE_25HZ = 0x6 , BMX055_MAG_DRATE_30HZ = 0x7
}
 Datarate for Magnetometer. More...
 
enum  bmx055_acc_range_t { BMX055_ACC_RANGE_2G = 0x0 , BMX055_ACC_RANGE_4G = 0x1 , BMX055_ACC_RANGE_8G = 0x2 , BMX055_ACC_RANGE_16G = 0x3 }
 Range for Accelerometer. More...
 
enum  bmx055_gyro_scale_t {
  BMX055_GYRO_SCALE_2000DPS = 0x0 , BMX055_GYRO_SCALE_1000DPS = 0x1 , BMX055_GYRO_SCALE_0500DPS = 0x2 , BMX055_GYRO_SCALE_0250DPS = 0x3 ,
  BMX055_GYRO_SCALE_0125DPS = 0x4
}
 Measurement scale for the gyro. More...
 

Functions

int bmx055_init (bmx055_t *dev, const bmx055_params_t *params)
 Initialize modules magnetometer, accelerometer, gyroscope.
 
int bmx055_mag_read (const bmx055_t *dev, int16_t *data)
 Read magnetic field value in Gauss per second from magnetometer.
 
int bmx055_acc_read (const bmx055_t *dev, int16_t *data)
 Read acceleration value in g from accelerometer.
 
int bmx055_gyro_read (const bmx055_t *dev, int16_t *data)
 Read angular speed value in degree per second from gyroscope.