ESPHome  2024.2.1
Data Structures | Enumerations | Variables
esphome::bmi160 Namespace Reference

Data Structures

class  BMI160Component
 

Enumerations

enum  Cmd : uint8_t {
  Cmd::START_FOC = 0x03, Cmd::ACCL_SET_PMU_MODE = 0b00010000, Cmd::GYRO_SET_PMU_MODE = 0b00010100, Cmd::MAG_SET_PMU_MODE = 0b00011000,
  Cmd::PROG_NVM = 0xA0, Cmd::FIFO_FLUSH = 0xB0, Cmd::INT_RESET = 0xB1, Cmd::SOFT_RESET = 0xB6,
  Cmd::STEP_CNT_CLR = 0xB2
}
 
enum  GyroPmuMode : uint8_t { GyroPmuMode::SUSPEND = 0b00, GyroPmuMode::NORMAL = 0b01, GyroPmuMode::LOW_POWER = 0b10 }
 
enum  AcclPmuMode : uint8_t { AcclPmuMode::SUSPEND = 0b00, AcclPmuMode::NORMAL = 0b01, AcclPmuMode::FAST_STARTUP = 0b11 }
 
enum  MagPmuMode : uint8_t { MagPmuMode::SUSPEND = 0b00, MagPmuMode::NORMAL = 0b01, MagPmuMode::LOW_POWER = 0b10 }
 
enum  AcclFilterMode : uint8_t { AcclFilterMode::POWER_SAVING = 0b00000000, AcclFilterMode::PERF = 0b10000000 }
 
enum  AcclBandwidth : uint8_t {
  AcclBandwidth::OSR4_AVG1 = 0b00000000, AcclBandwidth::OSR2_AVG2 = 0b00010000, AcclBandwidth::NORMAL_AVG4 = 0b00100000, AcclBandwidth::RES_AVG8 = 0b00110000,
  AcclBandwidth::RES_AVG16 = 0b01000000, AcclBandwidth::RES_AVG32 = 0b01010000, AcclBandwidth::RES_AVG64 = 0b01100000, AcclBandwidth::RES_AVG128 = 0b01110000
}
 
enum  AccelOutputDataRate : uint8_t {
  AccelOutputDataRate::HZ_25_32 = 0b0001, AccelOutputDataRate::HZ_25_16 = 0b0010, AccelOutputDataRate::HZ_25_8 = 0b0011, AccelOutputDataRate::HZ_25_4 = 0b0100,
  AccelOutputDataRate::HZ_25_2 = 0b0101, AccelOutputDataRate::HZ_25 = 0b0110, AccelOutputDataRate::HZ_50 = 0b0111, AccelOutputDataRate::HZ_100 = 0b1000,
  AccelOutputDataRate::HZ_200 = 0b1001, AccelOutputDataRate::HZ_400 = 0b1010, AccelOutputDataRate::HZ_800 = 0b1011, AccelOutputDataRate::HZ_1600 = 0b1100
}
 
enum  AccelRange : uint8_t { AccelRange::RANGE_2G = 0b0011, AccelRange::RANGE_4G = 0b0101, AccelRange::RANGE_8G = 0b1000, AccelRange::RANGE_16G = 0b1100 }
 
enum  GyroBandwidth : uint8_t { GyroBandwidth::OSR4 = 0x00, GyroBandwidth::OSR2 = 0x10, GyroBandwidth::NORMAL = 0x20 }
 
enum  GyroOuputDataRate : uint8_t {
  GyroOuputDataRate::HZ_25 = 0x06, GyroOuputDataRate::HZ_50 = 0x07, GyroOuputDataRate::HZ_100 = 0x08, GyroOuputDataRate::HZ_200 = 0x09,
  GyroOuputDataRate::HZ_400 = 0x0A, GyroOuputDataRate::HZ_800 = 0x0B, GyroOuputDataRate::HZ_1600 = 0x0C, GyroOuputDataRate::HZ_3200 = 0x0D
}
 
enum  GyroRange : uint8_t {
  GyroRange::RANGE_2000_DPS = 0x0, GyroRange::RANGE_1000_DPS = 0x1, GyroRange::RANGE_500_DPS = 0x2, GyroRange::RANGE_250_DPS = 0x3,
  GyroRange::RANGE_125_DPS = 0x4
}
 

Variables

const uint8_t BMI160_REGISTER_CHIPID = 0x00
 
const uint8_t BMI160_REGISTER_CMD = 0x7E
 
const uint8_t BMI160_REGISTER_ACCEL_CONFIG = 0x40
 
const uint8_t BMI160_REGISTER_ACCEL_RANGE = 0x41
 
const uint8_t BMI160_REGISTER_GYRO_CONFIG = 0x42
 
const uint8_t BMI160_REGISTER_GYRO_RANGE = 0x43
 
const uint8_t BMI160_REGISTER_DATA_GYRO_X_LSB = 0x0C
 
const uint8_t BMI160_REGISTER_DATA_GYRO_X_MSB = 0x0D
 
const uint8_t BMI160_REGISTER_DATA_GYRO_Y_LSB = 0x0E
 
const uint8_t BMI160_REGISTER_DATA_GYRO_Y_MSB = 0x0F
 
const uint8_t BMI160_REGISTER_DATA_GYRO_Z_LSB = 0x10
 
const uint8_t BMI160_REGISTER_DATA_GYRO_Z_MSB = 0x11
 
const uint8_t BMI160_REGISTER_DATA_ACCEL_X_LSB = 0x12
 
const uint8_t BMI160_REGISTER_DATA_ACCEL_X_MSB = 0x13
 
const uint8_t BMI160_REGISTER_DATA_ACCEL_Y_LSB = 0x14
 
const uint8_t BMI160_REGISTER_DATA_ACCEL_Y_MSB = 0x15
 
const uint8_t BMI160_REGISTER_DATA_ACCEL_Z_LSB = 0x16
 
const uint8_t BMI160_REGISTER_DATA_ACCEL_Z_MSB = 0x17
 
const uint8_t BMI160_REGISTER_DATA_TEMP_LSB = 0x20
 
const uint8_t BMI160_REGISTER_DATA_TEMP_MSB = 0x21
 
const float GRAVITY_EARTH = 9.80665f
 

Enumeration Type Documentation

◆ AccelOutputDataRate

enum esphome::bmi160::AccelOutputDataRate : uint8_t
strong
Enumerator
HZ_25_32 
HZ_25_16 
HZ_25_8 
HZ_25_4 
HZ_25_2 
HZ_25 
HZ_50 
HZ_100 
HZ_200 
HZ_400 
HZ_800 
HZ_1600 

Definition at line 55 of file bmi160.cpp.

◆ AccelRange

enum esphome::bmi160::AccelRange : uint8_t
strong
Enumerator
RANGE_2G 
RANGE_4G 
RANGE_8G 
RANGE_16G 

Definition at line 70 of file bmi160.cpp.

◆ AcclBandwidth

enum esphome::bmi160::AcclBandwidth : uint8_t
strong
Enumerator
OSR4_AVG1 
OSR2_AVG2 
NORMAL_AVG4 
RES_AVG8 
RES_AVG16 
RES_AVG32 
RES_AVG64 
RES_AVG128 

Definition at line 45 of file bmi160.cpp.

◆ AcclFilterMode

enum esphome::bmi160::AcclFilterMode : uint8_t
strong
Enumerator
POWER_SAVING 
PERF 

Definition at line 41 of file bmi160.cpp.

◆ AcclPmuMode

enum esphome::bmi160::AcclPmuMode : uint8_t
strong
Enumerator
SUSPEND 
NORMAL 
FAST_STARTUP 

Definition at line 29 of file bmi160.cpp.

◆ Cmd

enum esphome::bmi160::Cmd : uint8_t
strong
Enumerator
START_FOC 
ACCL_SET_PMU_MODE 
GYRO_SET_PMU_MODE 
MAG_SET_PMU_MODE 
PROG_NVM 
FIFO_FLUSH 
INT_RESET 
SOFT_RESET 
STEP_CNT_CLR 

Definition at line 13 of file bmi160.cpp.

◆ GyroBandwidth

enum esphome::bmi160::GyroBandwidth : uint8_t
strong
Enumerator
OSR4 
OSR2 
NORMAL 

Definition at line 78 of file bmi160.cpp.

◆ GyroOuputDataRate

enum esphome::bmi160::GyroOuputDataRate : uint8_t
strong
Enumerator
HZ_25 
HZ_50 
HZ_100 
HZ_200 
HZ_400 
HZ_800 
HZ_1600 
HZ_3200 

Definition at line 83 of file bmi160.cpp.

◆ GyroPmuMode

enum esphome::bmi160::GyroPmuMode : uint8_t
strong
Enumerator
SUSPEND 
NORMAL 
LOW_POWER 

Definition at line 24 of file bmi160.cpp.

◆ GyroRange

enum esphome::bmi160::GyroRange : uint8_t
strong
Enumerator
RANGE_2000_DPS 
RANGE_1000_DPS 
RANGE_500_DPS 
RANGE_250_DPS 
RANGE_125_DPS 

Definition at line 94 of file bmi160.cpp.

◆ MagPmuMode

enum esphome::bmi160::MagPmuMode : uint8_t
strong
Enumerator
SUSPEND 
NORMAL 
LOW_POWER 

Definition at line 34 of file bmi160.cpp.

Variable Documentation

◆ BMI160_REGISTER_ACCEL_CONFIG

const uint8_t esphome::bmi160::BMI160_REGISTER_ACCEL_CONFIG = 0x40

Definition at line 40 of file bmi160.cpp.

◆ BMI160_REGISTER_ACCEL_RANGE

const uint8_t esphome::bmi160::BMI160_REGISTER_ACCEL_RANGE = 0x41

Definition at line 69 of file bmi160.cpp.

◆ BMI160_REGISTER_CHIPID

const uint8_t esphome::bmi160::BMI160_REGISTER_CHIPID = 0x00

Definition at line 10 of file bmi160.cpp.

◆ BMI160_REGISTER_CMD

const uint8_t esphome::bmi160::BMI160_REGISTER_CMD = 0x7E

Definition at line 12 of file bmi160.cpp.

◆ BMI160_REGISTER_DATA_ACCEL_X_LSB

const uint8_t esphome::bmi160::BMI160_REGISTER_DATA_ACCEL_X_LSB = 0x12

Definition at line 108 of file bmi160.cpp.

◆ BMI160_REGISTER_DATA_ACCEL_X_MSB

const uint8_t esphome::bmi160::BMI160_REGISTER_DATA_ACCEL_X_MSB = 0x13

Definition at line 109 of file bmi160.cpp.

◆ BMI160_REGISTER_DATA_ACCEL_Y_LSB

const uint8_t esphome::bmi160::BMI160_REGISTER_DATA_ACCEL_Y_LSB = 0x14

Definition at line 110 of file bmi160.cpp.

◆ BMI160_REGISTER_DATA_ACCEL_Y_MSB

const uint8_t esphome::bmi160::BMI160_REGISTER_DATA_ACCEL_Y_MSB = 0x15

Definition at line 111 of file bmi160.cpp.

◆ BMI160_REGISTER_DATA_ACCEL_Z_LSB

const uint8_t esphome::bmi160::BMI160_REGISTER_DATA_ACCEL_Z_LSB = 0x16

Definition at line 112 of file bmi160.cpp.

◆ BMI160_REGISTER_DATA_ACCEL_Z_MSB

const uint8_t esphome::bmi160::BMI160_REGISTER_DATA_ACCEL_Z_MSB = 0x17

Definition at line 113 of file bmi160.cpp.

◆ BMI160_REGISTER_DATA_GYRO_X_LSB

const uint8_t esphome::bmi160::BMI160_REGISTER_DATA_GYRO_X_LSB = 0x0C

Definition at line 102 of file bmi160.cpp.

◆ BMI160_REGISTER_DATA_GYRO_X_MSB

const uint8_t esphome::bmi160::BMI160_REGISTER_DATA_GYRO_X_MSB = 0x0D

Definition at line 103 of file bmi160.cpp.

◆ BMI160_REGISTER_DATA_GYRO_Y_LSB

const uint8_t esphome::bmi160::BMI160_REGISTER_DATA_GYRO_Y_LSB = 0x0E

Definition at line 104 of file bmi160.cpp.

◆ BMI160_REGISTER_DATA_GYRO_Y_MSB

const uint8_t esphome::bmi160::BMI160_REGISTER_DATA_GYRO_Y_MSB = 0x0F

Definition at line 105 of file bmi160.cpp.

◆ BMI160_REGISTER_DATA_GYRO_Z_LSB

const uint8_t esphome::bmi160::BMI160_REGISTER_DATA_GYRO_Z_LSB = 0x10

Definition at line 106 of file bmi160.cpp.

◆ BMI160_REGISTER_DATA_GYRO_Z_MSB

const uint8_t esphome::bmi160::BMI160_REGISTER_DATA_GYRO_Z_MSB = 0x11

Definition at line 107 of file bmi160.cpp.

◆ BMI160_REGISTER_DATA_TEMP_LSB

const uint8_t esphome::bmi160::BMI160_REGISTER_DATA_TEMP_LSB = 0x20

Definition at line 114 of file bmi160.cpp.

◆ BMI160_REGISTER_DATA_TEMP_MSB

const uint8_t esphome::bmi160::BMI160_REGISTER_DATA_TEMP_MSB = 0x21

Definition at line 115 of file bmi160.cpp.

◆ BMI160_REGISTER_GYRO_CONFIG

const uint8_t esphome::bmi160::BMI160_REGISTER_GYRO_CONFIG = 0x42

Definition at line 77 of file bmi160.cpp.

◆ BMI160_REGISTER_GYRO_RANGE

const uint8_t esphome::bmi160::BMI160_REGISTER_GYRO_RANGE = 0x43

Definition at line 93 of file bmi160.cpp.

◆ GRAVITY_EARTH

const float esphome::bmi160::GRAVITY_EARTH = 9.80665f

Definition at line 117 of file bmi160.cpp.