dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Driver for Bosch BMX055 IMU Sensor. More...

Data Structures

struct  pios_bmm150_cfg
 
struct  pios_bmx055_cfg
 

Macros

#define BMM150_REG_MAG_CHIPID   0x40
 
#define BMM150_VAL_MAG_CHIPID   0x32
 
#define BMM150_REG_MAG_X_LSB   0x42
 
#define BMM150_REG_MAG_X_MSB   0x43
 
#define BMM150_REG_MAG_Y_LSB   0x44
 
#define BMM150_REG_MAG_Y_MSB   0x45
 
#define BMM150_REG_MAG_Z_LSB   0x46
 
#define BMM150_REG_MAG_Z_MSB   0x47
 
#define BMM150_REG_MAG_HALL_RESISTANCE_LSB   0x48
 
#define BMM150_VAL_MAG_HALL_RESISTANCE_LSB_DRDY   0x01
 
#define BMM150_REG_MAG_HALL_RESISTANCE_MSB   0x49
 
#define BMM150_REG_MAG_INT_STATUS   0x4A
 
#define BMM150_REG_MAG_POWER_CONTROL   0x4B
 
#define BMM150_VAL_MAG_POWER_CONTROL_SOFTRESET   0x82
 
#define BMM150_VAL_MAG_POWER_CONTROL_POWERON   0x01
 
#define BMM150_VAL_MAG_POWER_CONTROL_POWEROFF   0x00
 
#define BMM150_REG_MAG_OPERATION_MODE   0x4C
 
#define BMM150_VAL_MAG_OPERATION_MODE_ODR30   0x38
 
#define BMM150_VAL_MAG_OPERATION_MODE_ODR25   0x30
 
#define BMM150_VAL_MAG_OPERATION_MODE_ODR20   0x28
 
#define BMM150_VAL_MAG_OPERATION_MODE_ODR15   0x20
 
#define BMM150_VAL_MAG_OPERATION_MODE_ODR10   0x00
 
#define BMM150_VAL_MAG_OPERATION_MODE_ODR8   0x18
 
#define BMM150_VAL_MAG_OPERATION_MODE_ODR6   0x10
 
#define BMM150_VAL_MAG_OPERATION_MODE_ODR2   0x08
 
#define BMM150_VAL_MAG_OPERATION_MODE_OPMODE_NORMAL   0x00
 
#define BMM150_VAL_MAG_OPERATION_MODE_OPMODE_FORCED   0x02
 
#define BMM150_VAL_MAG_OPERATION_MODE_OPMODE_SLEEP   0x06
 
#define BMM150_REG_MAG_INTERRUPT_SETTINGS   0x4D
 
#define BMM150_REG_MAG_INTERRUPT_SETTINGS_AXES_ENABLE_BITS   0x4E
 
#define BMM150_REG_MAG_LOWTHRESH_INTERRUPT_SETTING   0x4F
 
#define BMM150_REG_MAG_HIGHTHRESH_INTERRUPT_SETTING   0x50
 
#define BMM150_REG_MAG_X_Y_AXIS_REP   0x51
 
#define BMM150_REG_MAG_Z_AXIS_REP   0x52
 
#define BMM150_DIG_X1   0x5D
 
#define BMM150_DIG_Y1   0x5E
 
#define BMM150_DIG_Z4_LSB   0x62
 
#define BMM150_DIG_Z4_MSB   0x63
 
#define BMM150_DIG_X2   0x64
 
#define BMM150_DIG_Y2   0x65
 
#define BMM150_DIG_Z2_LSB   0x68
 
#define BMM150_DIG_Z2_MSB   0x69
 
#define BMM150_DIG_Z1_LSB   0x6A
 
#define BMM150_DIG_Z1_MSB   0x6B
 
#define BMM150_DIG_XYZ1_LSB   0x6C
 
#define BMM150_DIG_XYZ1_MSB   0x6D
 
#define BMM150_DIG_Z3_LSB   0x6E
 
#define BMM150_DIG_Z3_MSB   0x6F
 
#define BMM150_DIG_XY2   0x70
 
#define BMM150_DIG_XY1   0x71
 
#define BMM050_INIT_VALUE   (0)
 
#define BMM050_OVERFLOW_OUTPUT_FLOAT   0.0f
 
#define BMM050_FLIP_OVERFLOW_ADCVAL   -4096
 
#define BMM050_HALL_OVERFLOW_ADCVAL   -16384
 
#define BMX055_REG_ACC_CHIPID   0x00
 
#define BMX055_VAL_ACC_CHIPID   0xfa
 
#define BMX055_REG_ACC_X_LSB   0x02
 
#define BMX055_REG_ACC_X_MSB   0x03
 
#define BMX055_REG_ACC_Y_LSB   0x04
 
#define BMX055_REG_ACC_Y_MSB   0x05
 
#define BMX055_REG_ACC_Z_LSB   0x06
 
#define BMX055_REG_ACC_Z_MSB   0x07
 
#define BMX055_REG_ACC_TEMP   0x08
 
#define BMX055_ACC_TEMP_OFFSET   23
 
#define BMX055_REG_ACC_INT_STATUS_0   0x09
 
#define BMX055_REG_ACC_INT_STATUS_1   0x0a
 
#define BMX055_REG_ACC_INT_STATUS_2   0x0b
 
#define BMX055_REG_ACC_INT_STATUS_3   0x0c
 
#define BMX055_REG_ACC_FIFO_STATUS   0x0e
 
#define BMX055_REG_ACC_PMU_RANGE   0x0f
 
#define BMX055_VAL_ACC_PMU_RANGE_2G   0x03
 
#define BMX055_VAL_ACC_PMU_RANGE_4G   0x05
 
#define BMX055_VAL_ACC_PMU_RANGE_8G   0x08
 
#define BMX055_VAL_ACC_PMU_RANGE_16G   0x0c
 
#define BMX055_REG_ACC_PMU_BW   0x10
 
#define BMX055_VAL_ACC_PMU_BW_7HZ81   0x08
 
#define BMX055_VAL_ACC_PMU_BW_15HZ63   0x09
 
#define BMX055_VAL_ACC_PMU_BW_31HZ25   0x0a
 
#define BMX055_VAL_ACC_PMU_BW_62HZ5   0x0b
 
#define BMX055_VAL_ACC_PMU_BW_125HZ   0x0c
 
#define BMX055_VAL_ACC_PMU_BW_250HZ   0x0d
 
#define BMX055_VAL_ACC_PMU_BW_500HZ   0x0e
 
#define BMX055_VAL_ACC_PMU_BW_1KHZ   0x0f
 
#define BMX055_REG_ACC_PMU_LPW   0x11
 
#define BMX055_VAL_ACC_PMU_LPW_NORMAL   0x00
 
#define BMX055_REG_ACC_PMU_LOW_POWER   0x12
 
#define BMX055_REG_ACC_ACCD_HBW   0x13
 
#define BMX055_VAL_ACC_ACCD_HBW_NORMAL   0x00 /* filtered data, shadowed */
 
#define BMX055_REG_ACC_BGW_SOFTRESET   0x14
 
#define BMX055_VAL_ACC_BGW_SOFTRESET_REQ   0xb6 /* value to trigger a reset */
 
#define BMX055_REG_ACC_INT_EN_0   0x16
 
#define BMX055_REG_ACC_INT_EN_1   0x17
 
#define BMX055_REG_ACC_INT_EN_2   0x18
 
#define BMX055_REG_ACC_INT_MAP_0   0x19
 
#define BMX055_REG_ACC_INT_MAP_1   0x1a
 
#define BMX055_REG_ACC_INT_MAP_2   0x1b
 
#define BMX055_REG_ACC_INT_SRC   0x1e
 
#define BMX055_REG_ACC_INT_OUT_CTRL   0x20
 
#define BMX055_REG_ACC_INT_RST_LATCH   0x21
 
#define BMX055_REG_ACC_INT_0   0x22
 
#define BMX055_REG_ACC_INT_1   0x23
 
#define BMX055_REG_ACC_INT_2   0x24
 
#define BMX055_REG_ACC_INT_3   0x25
 
#define BMX055_REG_ACC_INT_4   0x26
 
#define BMX055_REG_ACC_INT_5   0x27
 
#define BMX055_REG_ACC_INT_6   0x28
 
#define BMX055_REG_ACC_INT_7   0x29
 
#define BMX055_REG_ACC_INT_8   0x2a
 
#define BMX055_REG_ACC_INT_9   0x2b
 
#define BMX055_REG_ACC_INT_A   0x2c
 
#define BMX055_REG_ACC_INT_B   0x2d
 
#define BMX055_REG_ACC_INT_C   0x2e
 
#define BMX055_REG_ACC_INT_D   0x2f
 
#define BMX055_REG_ACC_FIFO_CONFIG_0   0x30
 
#define BMX055_REG_ACC_PMU_SELF_TEST   0x32
 
#define BMX055_REG_ACC_TRIM_NVM_CTRL   0x33
 
#define BMX055_REG_ACC_BGW_SPI3_WDT   0x34
 
#define BMX055_REG_ACC_OFC_CTRL   0x36
 
#define BMX055_REG_ACC_OFC_SETTING   0x37
 
#define BMX055_REG_ACC_OFC_OFFSET_X   0x38
 
#define BMX055_REG_ACC_OFC_OFFSET_Y   0x39
 
#define BMX055_REG_ACC_OFC_OFFSET_Z   0x3a
 
#define BMX055_REG_ACC_TRIM_GP0   0x3b
 
#define BMX055_REG_ACC_TRIM_GP1   0x3c
 
#define BMX055_REG_ACC_FIFO_CONFIG_1   0x3e
 
#define BMX055_VAL_ACC_FIFO_CONFIG_1_BYPASS   0x00
 
#define BMX055_REG_ACC_FIFO_DATA   0x3f
 
#define BMX055_REG_GYRO_CHIPID   0x00
 
#define BMX055_VAL_GYRO_CHIPID   0x0f
 
#define BMX055_REG_GYRO_X_LSB   0x02
 
#define BMX055_REG_GYRO_X_MSB   0x03
 
#define BMX055_REG_GYRO_Y_LSB   0x04
 
#define BMX055_REG_GYRO_Y_MSB   0x05
 
#define BMX055_REG_GYRO_Z_LSB   0x06
 
#define BMX055_REG_GYRO_Z_MSB   0x07
 
#define BMX055_REG_GYRO_INT_STATUS_0   0x09
 
#define BMX055_REG_GYRO_INT_STATUS_1   0x0A
 
#define BMX055_REG_GYRO_INT_STATUS_2   0x0B
 
#define BMX055_REG_GYRO_INT_STATUS_3   0x0C
 
#define BMX055_REG_GYRO_FIFO_STATUS   0x0E
 
#define BMX055_REG_GYRO_RANGE   0x0F
 
#define BMX055_VAL_GYRO_RANGE_2000DPS   0x00
 
#define BMX055_VAL_GYRO_RANGE_1000DPS   0x01
 
#define BMX055_VAL_GYRO_RANGE_500DPS   0x02
 
#define BMX055_VAL_GYRO_RANGE_250DPS   0x03
 
#define BMX055_VAL_GYRO_RANGE_125DPS   0x04
 
#define BMX055_REG_GYRO_BW   0x10
 
#define BMX055_VAL_GYRO_BW_47HZ   0x03 /* 400Hz ODR */
 
#define BMX055_VAL_GYRO_BW_116HZ   0x02 /* 1KHz ODR */
 
#define BMX055_VAL_GYRO_BW_230HZ   0x01 /* 2KHz ODR */
 
#define BMX055_VAL_GYRO_BW_UNFILT   0x00 /* 2KHz ODR */
 
#define BMX055_REG_GYRO_LPM1   0x11
 
#define BMX055_REG_GYRO_LPM2   0x12
 
#define BMX055_REG_GYRO_RATE_HBW   0x13
 
#define BMX055_REG_GYRO_BGW_SOFTRESET   0x14
 
#define BMX055_VAL_GYRO_BGW_SOFTRESET_REQ   0xb6 /* Takes 30ms! Typical! */
 
#define BMX055_REG_GYRO_INT_EN_0   0x15
 
#define BMX055_REG_GYRO_INT_EN_1   0x16
 
#define BMX055_REG_GYRO_INT_MAP_0   0x17
 
#define BMX055_REG_GYRO_INT_MAP_1   0x18
 
#define BMX055_REG_GYRO_INT_MAP_2   0x19
 
#define BMX055_REG_GYRO_INTERRUPTS_SELECTABLE_DATA_SOURCE   0x1A
 
#define BMX055_REG_GYRO_FAST_OFFSET_COMPENSATION_MOTION_THRESHOLD   0x1B
 
#define BMX055_REG_GYRO_MOTION_INT   0x1C
 
#define BMX055_REG_GYRO_FIFO_WM_INT   0x1E
 
#define BMX055_REG_GYRO_INT_RST_LATCH   0x21
 
#define BMX055_REG_GYRO_HIGH_TH_X   0x22
 
#define BMX055_REG_GYRO_HIGH_DUR_X   0x23
 
#define BMX055_REG_GYRO_HIGH_TH_Y   0x24
 
#define BMX055_REG_GYRO_HIGH_DUR_Y   0x25
 
#define BMX055_REG_GYRO_HIGH_TH_Z   0x26
 
#define BMX055_REG_GYRO_HIGH_DUR_Z   0x27
 
#define BMX055_REG_GYRO_SOC   0x31
 
#define BMX055_REG_GYRO_A_FOC   0x32
 
#define BMX055_REG_GYRO_TRIM_NVM_CTRL   0x33
 
#define BMX055_REG_GYRO_BGW_SPI3_WDT   0x34
 
#define BMX055_REG_GYRO_OFC1   0x36
 
#define BMX055_REG_GYRO_OFC2   0x37
 
#define BMX055_REG_GYRO_OFC3   0x38
 
#define BMX055_REG_GYRO_OFC4   0x39
 
#define BMX055_REG_GYRO_TRIM_GP0   0x3A
 
#define BMX055_REG_GYRO_TRIM_GP1   0x3B
 
#define BMX055_REG_GYRO_BIST   0x3C
 
#define BMX055_REG_GYRO_FIFO_CONFIG_0   0x3D
 
#define BMX055_REG_GYRO_FIFO_CONFIG_1   0x3E
 
#define BMX055_REG_GYRO_FIFO_DATA   0x3F
 

Typedefs

typedef struct pios_bmm150_dev * pios_bmm150_dev_t
 
typedef struct pios_bmx055_dev * pios_bmx055_dev_t
 

Enumerations

enum  pios_bmm150_orientation {
  PIOS_BMM_TOP_0DEG = 0x00, PIOS_BMM_TOP_90DEG = 0x01, PIOS_BMM_TOP_180DEG = 0x02, PIOS_BMM_TOP_270DEG = 0x03,
  PIOS_BMM_BOTTOM_0DEG = 0x04, PIOS_BMM_BOTTOM_90DEG = 0x05, PIOS_BMM_BOTTOM_180DEG = 0x06, PIOS_BMM_BOTTOM_270DEG = 0x07
}
 
enum  pios_bmx055_orientation {
  PIOS_BMX_TOP_0DEG = 0x00, PIOS_BMX_TOP_90DEG = 0x01, PIOS_BMX_TOP_180DEG = 0x02, PIOS_BMX_TOP_270DEG = 0x03,
  PIOS_BMX_BOTTOM_0DEG = 0x04, PIOS_BMX_BOTTOM_90DEG = 0x05, PIOS_BMX_BOTTOM_180DEG = 0x06, PIOS_BMX_BOTTOM_270DEG = 0x07
}
 

Functions

int32_t PIOS_BMM150_SPI_Init (pios_bmm150_dev_t *dev, pios_spi_t spi_id, uint32_t slave_mag, const struct pios_bmm150_cfg *cfg)
 Initialize the BMM-xxxx 6/9-axis sensor on SPI. More...
 
int32_t PIOS_BMX055_SPI_Init (pios_bmx055_dev_t *dev, pios_spi_t spi_id, uint32_t slave_gyro, uint32_t slave_accel, const struct pios_bmx055_cfg *cfg)
 Initialize the BMX-xxxx 6/9-axis sensor on SPI. More...
 

Detailed Description

Driver for Bosch BMX055 IMU Sensor.

Driver for Bosch BMM150 IMU Sensor (part of BMX055)

Driver for Bosch BMM150 IMU Sensor.

Macro Definition Documentation

#define BMM050_FLIP_OVERFLOW_ADCVAL   -4096

Definition at line 92 of file pios_bmm150_priv.h.

#define BMM050_HALL_OVERFLOW_ADCVAL   -16384

Definition at line 93 of file pios_bmm150_priv.h.

#define BMM050_INIT_VALUE   (0)

Definition at line 90 of file pios_bmm150_priv.h.

#define BMM050_OVERFLOW_OUTPUT_FLOAT   0.0f

Definition at line 91 of file pios_bmm150_priv.h.

#define BMM150_DIG_X1   0x5D

Definition at line 73 of file pios_bmm150_priv.h.

#define BMM150_DIG_X2   0x64

Definition at line 77 of file pios_bmm150_priv.h.

#define BMM150_DIG_XY1   0x71

Definition at line 88 of file pios_bmm150_priv.h.

#define BMM150_DIG_XY2   0x70

Definition at line 87 of file pios_bmm150_priv.h.

#define BMM150_DIG_XYZ1_LSB   0x6C

Definition at line 83 of file pios_bmm150_priv.h.

#define BMM150_DIG_XYZ1_MSB   0x6D

Definition at line 84 of file pios_bmm150_priv.h.

#define BMM150_DIG_Y1   0x5E

Definition at line 74 of file pios_bmm150_priv.h.

#define BMM150_DIG_Y2   0x65

Definition at line 78 of file pios_bmm150_priv.h.

#define BMM150_DIG_Z1_LSB   0x6A

Definition at line 81 of file pios_bmm150_priv.h.

#define BMM150_DIG_Z1_MSB   0x6B

Definition at line 82 of file pios_bmm150_priv.h.

#define BMM150_DIG_Z2_LSB   0x68

Definition at line 79 of file pios_bmm150_priv.h.

#define BMM150_DIG_Z2_MSB   0x69

Definition at line 80 of file pios_bmm150_priv.h.

#define BMM150_DIG_Z3_LSB   0x6E

Definition at line 85 of file pios_bmm150_priv.h.

#define BMM150_DIG_Z3_MSB   0x6F

Definition at line 86 of file pios_bmm150_priv.h.

#define BMM150_DIG_Z4_LSB   0x62

Definition at line 75 of file pios_bmm150_priv.h.

#define BMM150_DIG_Z4_MSB   0x63

Definition at line 76 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_CHIPID   0x40

Definition at line 33 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_HALL_RESISTANCE_LSB   0x48

Definition at line 41 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_HALL_RESISTANCE_MSB   0x49

Definition at line 43 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_HIGHTHRESH_INTERRUPT_SETTING   0x50

Definition at line 68 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_INT_STATUS   0x4A

Definition at line 44 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_INTERRUPT_SETTINGS   0x4D

Definition at line 65 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_INTERRUPT_SETTINGS_AXES_ENABLE_BITS   0x4E

Definition at line 66 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_LOWTHRESH_INTERRUPT_SETTING   0x4F

Definition at line 67 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_OPERATION_MODE   0x4C

Definition at line 52 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_POWER_CONTROL   0x4B

Definition at line 45 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_X_LSB   0x42

Definition at line 35 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_X_MSB   0x43

Definition at line 36 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_X_Y_AXIS_REP   0x51

Definition at line 69 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_Y_LSB   0x44

Definition at line 37 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_Y_MSB   0x45

Definition at line 38 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_Z_AXIS_REP   0x52

Definition at line 70 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_Z_LSB   0x46

Definition at line 39 of file pios_bmm150_priv.h.

#define BMM150_REG_MAG_Z_MSB   0x47

Definition at line 40 of file pios_bmm150_priv.h.

#define BMM150_VAL_MAG_CHIPID   0x32

Definition at line 34 of file pios_bmm150_priv.h.

#define BMM150_VAL_MAG_HALL_RESISTANCE_LSB_DRDY   0x01

Definition at line 42 of file pios_bmm150_priv.h.

#define BMM150_VAL_MAG_OPERATION_MODE_ODR10   0x00

Definition at line 57 of file pios_bmm150_priv.h.

#define BMM150_VAL_MAG_OPERATION_MODE_ODR15   0x20

Definition at line 56 of file pios_bmm150_priv.h.

#define BMM150_VAL_MAG_OPERATION_MODE_ODR2   0x08

Definition at line 60 of file pios_bmm150_priv.h.

#define BMM150_VAL_MAG_OPERATION_MODE_ODR20   0x28

Definition at line 55 of file pios_bmm150_priv.h.

#define BMM150_VAL_MAG_OPERATION_MODE_ODR25   0x30

Definition at line 54 of file pios_bmm150_priv.h.

#define BMM150_VAL_MAG_OPERATION_MODE_ODR30   0x38

Definition at line 53 of file pios_bmm150_priv.h.

#define BMM150_VAL_MAG_OPERATION_MODE_ODR6   0x10

Definition at line 59 of file pios_bmm150_priv.h.

#define BMM150_VAL_MAG_OPERATION_MODE_ODR8   0x18

Definition at line 58 of file pios_bmm150_priv.h.

#define BMM150_VAL_MAG_OPERATION_MODE_OPMODE_FORCED   0x02

Definition at line 63 of file pios_bmm150_priv.h.

#define BMM150_VAL_MAG_OPERATION_MODE_OPMODE_NORMAL   0x00

Definition at line 62 of file pios_bmm150_priv.h.

#define BMM150_VAL_MAG_OPERATION_MODE_OPMODE_SLEEP   0x06

Definition at line 64 of file pios_bmm150_priv.h.

#define BMM150_VAL_MAG_POWER_CONTROL_POWEROFF   0x00

Definition at line 51 of file pios_bmm150_priv.h.

#define BMM150_VAL_MAG_POWER_CONTROL_POWERON   0x01

Definition at line 50 of file pios_bmm150_priv.h.

#define BMM150_VAL_MAG_POWER_CONTROL_SOFTRESET   0x82

Definition at line 47 of file pios_bmm150_priv.h.

#define BMX055_ACC_TEMP_OFFSET   23

Definition at line 42 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_ACCD_HBW   0x13

Definition at line 65 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_BGW_SOFTRESET   0x14

Definition at line 67 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_BGW_SPI3_WDT   0x34

Definition at line 96 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_CHIPID   0x00

Definition at line 33 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_FIFO_CONFIG_0   0x30

Definition at line 93 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_FIFO_CONFIG_1   0x3e

Definition at line 104 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_FIFO_DATA   0x3f

Definition at line 106 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_FIFO_STATUS   0x0e

Definition at line 47 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_0   0x22

Definition at line 79 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_1   0x23

Definition at line 80 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_2   0x24

Definition at line 81 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_3   0x25

Definition at line 82 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_4   0x26

Definition at line 83 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_5   0x27

Definition at line 84 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_6   0x28

Definition at line 85 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_7   0x29

Definition at line 86 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_8   0x2a

Definition at line 87 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_9   0x2b

Definition at line 88 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_A   0x2c

Definition at line 89 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_B   0x2d

Definition at line 90 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_C   0x2e

Definition at line 91 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_D   0x2f

Definition at line 92 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_EN_0   0x16

Definition at line 70 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_EN_1   0x17

Definition at line 71 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_EN_2   0x18

Definition at line 72 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_MAP_0   0x19

Definition at line 73 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_MAP_1   0x1a

Definition at line 74 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_MAP_2   0x1b

Definition at line 75 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_OUT_CTRL   0x20

Definition at line 77 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_RST_LATCH   0x21

Definition at line 78 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_SRC   0x1e

Definition at line 76 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_STATUS_0   0x09

Definition at line 43 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_STATUS_1   0x0a

Definition at line 44 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_STATUS_2   0x0b

Definition at line 45 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_INT_STATUS_3   0x0c

Definition at line 46 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_OFC_CTRL   0x36

Definition at line 97 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_OFC_OFFSET_X   0x38

Definition at line 99 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_OFC_OFFSET_Y   0x39

Definition at line 100 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_OFC_OFFSET_Z   0x3a

Definition at line 101 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_OFC_SETTING   0x37

Definition at line 98 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_PMU_BW   0x10

Definition at line 53 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_PMU_LOW_POWER   0x12

Definition at line 64 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_PMU_LPW   0x11

Definition at line 62 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_PMU_RANGE   0x0f

Definition at line 48 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_PMU_SELF_TEST   0x32

Definition at line 94 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_TEMP   0x08

Definition at line 41 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_TRIM_GP0   0x3b

Definition at line 102 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_TRIM_GP1   0x3c

Definition at line 103 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_TRIM_NVM_CTRL   0x33

Definition at line 95 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_X_LSB   0x02

Definition at line 35 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_X_MSB   0x03

Definition at line 36 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_Y_LSB   0x04

Definition at line 37 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_Y_MSB   0x05

Definition at line 38 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_Z_LSB   0x06

Definition at line 39 of file pios_bmx055_priv.h.

#define BMX055_REG_ACC_Z_MSB   0x07

Definition at line 40 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_A_FOC   0x32

Definition at line 154 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_BGW_SOFTRESET   0x14

Definition at line 135 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_BGW_SPI3_WDT   0x34

Definition at line 156 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_BIST   0x3C

Definition at line 163 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_BW   0x10

Definition at line 127 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_CHIPID   0x00

Definition at line 108 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_FAST_OFFSET_COMPENSATION_MOTION_THRESHOLD   0x1B

Definition at line 143 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_FIFO_CONFIG_0   0x3D

Definition at line 164 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_FIFO_CONFIG_1   0x3E

Definition at line 165 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_FIFO_DATA   0x3F

Definition at line 166 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_FIFO_STATUS   0x0E

Definition at line 120 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_FIFO_WM_INT   0x1E

Definition at line 145 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_HIGH_DUR_X   0x23

Definition at line 148 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_HIGH_DUR_Y   0x25

Definition at line 150 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_HIGH_DUR_Z   0x27

Definition at line 152 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_HIGH_TH_X   0x22

Definition at line 147 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_HIGH_TH_Y   0x24

Definition at line 149 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_HIGH_TH_Z   0x26

Definition at line 151 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_INT_EN_0   0x15

Definition at line 137 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_INT_EN_1   0x16

Definition at line 138 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_INT_MAP_0   0x17

Definition at line 139 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_INT_MAP_1   0x18

Definition at line 140 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_INT_MAP_2   0x19

Definition at line 141 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_INT_RST_LATCH   0x21

Definition at line 146 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_INT_STATUS_0   0x09

Definition at line 116 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_INT_STATUS_1   0x0A

Definition at line 117 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_INT_STATUS_2   0x0B

Definition at line 118 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_INT_STATUS_3   0x0C

Definition at line 119 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_INTERRUPTS_SELECTABLE_DATA_SOURCE   0x1A

Definition at line 142 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_LPM1   0x11

Definition at line 132 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_LPM2   0x12

Definition at line 133 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_MOTION_INT   0x1C

Definition at line 144 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_OFC1   0x36

Definition at line 157 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_OFC2   0x37

Definition at line 158 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_OFC3   0x38

Definition at line 159 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_OFC4   0x39

Definition at line 160 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_RANGE   0x0F

Definition at line 121 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_RATE_HBW   0x13

Definition at line 134 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_SOC   0x31

Definition at line 153 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_TRIM_GP0   0x3A

Definition at line 161 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_TRIM_GP1   0x3B

Definition at line 162 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_TRIM_NVM_CTRL   0x33

Definition at line 155 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_X_LSB   0x02

Definition at line 110 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_X_MSB   0x03

Definition at line 111 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_Y_LSB   0x04

Definition at line 112 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_Y_MSB   0x05

Definition at line 113 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_Z_LSB   0x06

Definition at line 114 of file pios_bmx055_priv.h.

#define BMX055_REG_GYRO_Z_MSB   0x07

Definition at line 115 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_ACCD_HBW_NORMAL   0x00 /* filtered data, shadowed */

Definition at line 66 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_BGW_SOFTRESET_REQ   0xb6 /* value to trigger a reset */

Definition at line 68 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_CHIPID   0xfa

Definition at line 34 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_FIFO_CONFIG_1_BYPASS   0x00

Definition at line 105 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_PMU_BW_125HZ   0x0c

Definition at line 58 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_PMU_BW_15HZ63   0x09

Definition at line 55 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_PMU_BW_1KHZ   0x0f

Definition at line 61 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_PMU_BW_250HZ   0x0d

Definition at line 59 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_PMU_BW_31HZ25   0x0a

Definition at line 56 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_PMU_BW_500HZ   0x0e

Definition at line 60 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_PMU_BW_62HZ5   0x0b

Definition at line 57 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_PMU_BW_7HZ81   0x08

Definition at line 54 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_PMU_LPW_NORMAL   0x00

Definition at line 63 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_PMU_RANGE_16G   0x0c

Definition at line 52 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_PMU_RANGE_2G   0x03

Definition at line 49 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_PMU_RANGE_4G   0x05

Definition at line 50 of file pios_bmx055_priv.h.

#define BMX055_VAL_ACC_PMU_RANGE_8G   0x08

Definition at line 51 of file pios_bmx055_priv.h.

#define BMX055_VAL_GYRO_BGW_SOFTRESET_REQ   0xb6 /* Takes 30ms! Typical! */

Definition at line 136 of file pios_bmx055_priv.h.

#define BMX055_VAL_GYRO_BW_116HZ   0x02 /* 1KHz ODR */

Definition at line 129 of file pios_bmx055_priv.h.

#define BMX055_VAL_GYRO_BW_230HZ   0x01 /* 2KHz ODR */

Definition at line 130 of file pios_bmx055_priv.h.

#define BMX055_VAL_GYRO_BW_47HZ   0x03 /* 400Hz ODR */

Definition at line 128 of file pios_bmx055_priv.h.

#define BMX055_VAL_GYRO_BW_UNFILT   0x00 /* 2KHz ODR */

Definition at line 131 of file pios_bmx055_priv.h.

#define BMX055_VAL_GYRO_CHIPID   0x0f

Definition at line 109 of file pios_bmx055_priv.h.

#define BMX055_VAL_GYRO_RANGE_1000DPS   0x01

Definition at line 123 of file pios_bmx055_priv.h.

#define BMX055_VAL_GYRO_RANGE_125DPS   0x04

Definition at line 126 of file pios_bmx055_priv.h.

#define BMX055_VAL_GYRO_RANGE_2000DPS   0x00

Definition at line 122 of file pios_bmx055_priv.h.

#define BMX055_VAL_GYRO_RANGE_250DPS   0x03

Definition at line 125 of file pios_bmx055_priv.h.

#define BMX055_VAL_GYRO_RANGE_500DPS   0x02

Definition at line 124 of file pios_bmx055_priv.h.

Typedef Documentation

typedef struct pios_bmm150_dev* pios_bmm150_dev_t

Definition at line 48 of file pios_bmm150.h.

typedef struct pios_bmx055_dev* pios_bmx055_dev_t

Definition at line 51 of file pios_bmx055.h.

Enumeration Type Documentation

Enumerator
PIOS_BMM_TOP_0DEG 
PIOS_BMM_TOP_90DEG 
PIOS_BMM_TOP_180DEG 
PIOS_BMM_TOP_270DEG 
PIOS_BMM_BOTTOM_0DEG 
PIOS_BMM_BOTTOM_90DEG 
PIOS_BMM_BOTTOM_180DEG 
PIOS_BMM_BOTTOM_270DEG 

Definition at line 33 of file pios_bmm150.h.

Enumerator
PIOS_BMX_TOP_0DEG 
PIOS_BMX_TOP_90DEG 
PIOS_BMX_TOP_180DEG 
PIOS_BMX_TOP_270DEG 
PIOS_BMX_BOTTOM_0DEG 
PIOS_BMX_BOTTOM_90DEG 
PIOS_BMX_BOTTOM_180DEG 
PIOS_BMX_BOTTOM_270DEG 

Definition at line 33 of file pios_bmx055.h.

Function Documentation

int32_t PIOS_BMM150_SPI_Init ( pios_bmm150_dev_t dev,
pios_spi_t  spi_id,
uint32_t  slave_mag,
const struct pios_bmm150_cfg cfg 
)

Initialize the BMM-xxxx 6/9-axis sensor on SPI.

Returns
0 for success, -1 for failure to allocate, -10 for failure to get irq
int32_t PIOS_BMX055_SPI_Init ( pios_bmx055_dev_t dev,
pios_spi_t  spi_id,
uint32_t  slave_gyro,
uint32_t  slave_accel,
const struct pios_bmx055_cfg cfg 
)

Initialize the BMX-xxxx 6/9-axis sensor on SPI.

Returns
0 for success, -1 for failure to allocate, -10 for failure to get irq