types.hpp File Reference
Declare Types and Definitions used within mpud
namespace.
More...
Go to the source code of this file.
Classes | |
struct | mpud::types::mot_config_t |
Motion Detection configuration. More... | |
struct | mpud::types::zrmot_config_t |
Zero-motion configuration. More... | |
struct | mpud::types::ff_config_t |
Free-fall configuration. More... | |
struct | mpud::types::auxi2c_config_t |
Auxiliary I2C Master configuration struct. More... | |
struct | mpud::types::auxi2c_slv_config_t |
Auxiliary I2C Slave configuration struct. More... | |
struct | mpud::types::int_config_t |
Interrupt configuration struct. More... | |
struct | mpud::types::axes_t< type_t > |
Generic axes struct to store sensors' data. More... | |
struct | mpud::types::sensors_t |
Sensors struct for fast reading all sensors at once. More... | |
Namespaces | |
mpud | |
MPU Driver namespace. | |
mpud::types | |
Types namespace. | |
Typedefs | |
typedef I2C_t | mpud::types::mpu_bus_t |
Communication bus type, I2Cbus or SPIbus . More... | |
typedef mpu_i2caddr_t | mpud::types::mpu_addr_handle_t |
MPU Address/Handle type, mpu_i2caddr_t or spi_device_handle_t More... | |
typedef uint8_t | mpud::types::mot_stat_t |
Motion Detection Status (MPU6000, MPU6050, MPU9150) More... | |
typedef uint8_t | mpud::types::stby_en_t |
Standby Mode. More... | |
typedef uint8_t | mpud::types::auxi2c_stat_t |
Auxiliary I2C master status register data. More... | |
typedef uint8_t | mpud::types::int_en_t |
Enable features to generate signal at Interrupt pin. More... | |
typedef uint8_t | mpud::types::int_stat_t |
Interrupt Status. More... | |
typedef uint16_t | mpud::types::fifo_config_t |
FIFO configuration, enable sensors to be written to FIFO. More... | |
typedef axes_t< int16_t > | mpud::types::raw_axes_t |
Axes type to hold gyroscope, accelerometer, magnetometer raw data. More... | |
typedef axes_t< float > | mpud::types::float_axes_t |
Axes type to hold converted sensor data. More... | |
typedef uint8_t | mpud::types::mag_stat1_t |
Magnetometer sensor status 1. More... | |
typedef uint8_t | mpud::types::mag_stat2_t |
Magnetometer sensor status 2. More... | |
typedef uint8_t | mpud::types::selftest_t |
Self-Test results. More... | |
Variables | |
static constexpr mpu_i2caddr_t | mpud::types::MPU_DEFAULT_I2CADDRESS = MPU_I2CADDRESS_AD0_LOW |
static constexpr mpu_bus_t & | mpud::types::MPU_DEFAULT_BUS = i2c0 |
static constexpr mpu_addr_handle_t | mpud::types::MPU_DEFAULT_ADDR_HANDLE = MPU_DEFAULT_I2CADDRESS |
static constexpr uint16_t | mpud::types::SAMPLE_RATE_MAX = 8000 |
static constexpr mot_stat_t | mpud::types::MOT_STAT_XNEG {1 << regs::MOT_STATUS_X_NEG_BIT} |
static constexpr mot_stat_t | mpud::types::MOT_STAT_XPOS {1 << regs::MOT_STATUS_X_POS_BIT} |
static constexpr mot_stat_t | mpud::types::MOT_STAT_YNEG {1 << regs::MOT_STATUS_Y_NEG_BIT} |
static constexpr mot_stat_t | mpud::types::MOT_STAT_YPOS {1 << regs::MOT_STATUS_Y_POS_BIT} |
static constexpr mot_stat_t | mpud::types::MOT_STAT_ZNEG {1 << regs::MOT_STATUS_Z_NEG_BIT} |
static constexpr mot_stat_t | mpud::types::MOT_STAT_ZPOS {1 << regs::MOT_STATUS_Z_POS_BIT} |
static constexpr mot_stat_t | mpud::types::MOT_STAT_ZEROMOTION {1 << regs::MOT_STATUS_ZRMOT_BIT} |
static constexpr stby_en_t | mpud::types::STBY_EN_NONE {0x0} |
static constexpr stby_en_t | mpud::types::STBY_EN_ACCEL_X {1 << regs::PWR2_STBY_XA_BIT} |
static constexpr stby_en_t | mpud::types::STBY_EN_ACCEL_Y {1 << regs::PWR2_STBY_YA_BIT} |
static constexpr stby_en_t | mpud::types::STBY_EN_ACCEL_Z {1 << regs::PWR2_STBY_ZA_BIT} |
static constexpr stby_en_t | mpud::types::STBY_EN_ACCEL {STBY_EN_ACCEL_X | STBY_EN_ACCEL_Y | STBY_EN_ACCEL_Z} |
static constexpr stby_en_t | mpud::types::STBY_EN_GYRO_X {1 << regs::PWR2_STBY_XG_BIT} |
static constexpr stby_en_t | mpud::types::STBY_EN_GYRO_Y {1 << regs::PWR2_STBY_YG_BIT} |
static constexpr stby_en_t | mpud::types::STBY_EN_GYRO_Z {1 << regs::PWR2_STBY_ZG_BIT} |
static constexpr stby_en_t | mpud::types::STBY_EN_GYRO {STBY_EN_GYRO_X | STBY_EN_GYRO_Y | STBY_EN_GYRO_Z} |
static constexpr stby_en_t | mpud::types::STBY_EN_TEMP {1 << 6} |
static constexpr stby_en_t | mpud::types::STBY_EN_LOWPWR_GYRO_PLL_ON {1 << 7} |
This is a low power mode that allows quick enabling of the gyros. More... | |
static constexpr auxi2c_stat_t | mpud::types::AUXI2C_STAT_FSYNC {1 << regs::I2CMST_STAT_PASS_THROUGH_BIT} |
static constexpr auxi2c_stat_t | mpud::types::AUXI2C_STAT_LOST_ARB {1 << regs::I2CMST_STAT_LOST_ARB_BIT} |
static constexpr auxi2c_stat_t | mpud::types::AUXI2C_STAT_SLV4_DONE {1 << regs::I2CMST_STAT_SLV4_DONE_BIT} |
static constexpr auxi2c_stat_t | mpud::types::AUXI2C_STAT_SLV4_NACK {1 << regs::I2CMST_STAT_SLV4_NACK_BIT} |
static constexpr auxi2c_stat_t | mpud::types::AUXI2C_STAT_SLV3_NACK {1 << regs::I2CMST_STAT_SLV3_NACK_BIT} |
static constexpr auxi2c_stat_t | mpud::types::AUXI2C_STAT_SLV2_NACK {1 << regs::I2CMST_STAT_SLV2_NACK_BIT} |
static constexpr auxi2c_stat_t | mpud::types::AUXI2C_STAT_SLV1_NACK {1 << regs::I2CMST_STAT_SLV1_NACK_BIT} |
static constexpr auxi2c_stat_t | mpud::types::AUXI2C_STAT_SLV0_NACK {1 << regs::I2CMST_STAT_SLV0_NACK_BIT} |
static constexpr int_en_t | mpud::types::INT_EN_NONE {0x0} |
static constexpr int_en_t | mpud::types::INT_EN_MOTION_DETECT {1 << regs::INT_ENABLE_MOTION_BIT} |
static constexpr int_en_t | mpud::types::INT_EN_FIFO_OVERFLOW {1 << regs::INT_ENABLE_FIFO_OFLOW_BIT} |
static constexpr int_en_t | mpud::types::INT_EN_I2C_MST_FSYNC {1 << regs::INT_ENABLE_I2C_MST_FSYNC_BIT} |
static constexpr int_en_t | mpud::types::INT_EN_PLL_READY {1 << regs::INT_ENABLE_PLL_RDY_BIT} |
static constexpr int_en_t | mpud::types::INT_EN_DMP_READY {1 << regs::INT_ENABLE_DMP_RDY_BIT} |
static constexpr int_en_t | mpud::types::INT_EN_RAWDATA_READY {1 << regs::INT_ENABLE_RAW_DATA_RDY_BIT} |
static constexpr int_en_t | mpud::types::INT_EN_FREE_FALL {1 << regs::INT_ENABLE_FREEFALL_BIT} |
static constexpr int_en_t | mpud::types::INT_EN_ZERO_MOTION {1 << regs::INT_ENABLE_ZEROMOT_BIT} |
static constexpr int_stat_t | mpud::types::INT_STAT_MOTION_DETECT {1 << regs::INT_STATUS_MOTION_BIT} |
static constexpr int_stat_t | mpud::types::INT_STAT_FIFO_OVERFLOW {1 << regs::INT_STATUS_FIFO_OFLOW_BIT} |
static constexpr int_stat_t | mpud::types::INT_STAT_I2C_MST_FSYNC {1 << regs::INT_STATUS_I2C_MST_BIT} |
static constexpr int_stat_t | mpud::types::INT_STAT_PLL_READY {1 << regs::INT_STATUS_PLL_RDY_BIT} |
static constexpr int_stat_t | mpud::types::INT_STAT_DMP_READY {1 << regs::INT_STATUS_DMP_RDY_BIT} |
static constexpr int_stat_t | mpud::types::INT_STAT_RAWDATA_READY {1 << regs::INT_STATUS_RAW_DATA_RDY_BIT} |
static constexpr int_stat_t | mpud::types::INT_STAT_FREE_FALL {1 << regs::INT_STATUS_FREEFALL_BIT} |
static constexpr int_stat_t | mpud::types::INT_STAT_ZERO_MOTION {1 << regs::INT_STATUS_ZEROMOT_BIT} |
static constexpr fifo_config_t | mpud::types::FIFO_CFG_NONE {0x0} |
static constexpr fifo_config_t | mpud::types::FIFO_CFG_GYRO |
static constexpr fifo_config_t | mpud::types::FIFO_CFG_ACCEL {1 << regs::FIFO_ACCEL_EN_BIT} |
static constexpr fifo_config_t | mpud::types::FIFO_CFG_TEMPERATURE {1 << regs::FIFO_TEMP_EN_BIT} |
static constexpr fifo_config_t | mpud::types::FIFO_CFG_SLAVE0 {1 << regs::FIFO_SLV_0_EN_BIT} |
static constexpr fifo_config_t | mpud::types::FIFO_CFG_SLAVE1 {1 << regs::FIFO_SLV_1_EN_BIT} |
static constexpr fifo_config_t | mpud::types::FIFO_CFG_SLAVE2 {1 << regs::FIFO_SLV_2_EN_BIT} |
static constexpr fifo_config_t | mpud::types::FIFO_CFG_SLAVE3 {1 << 8} |
static constexpr fifo_config_t | mpud::types::FIFO_CFG_COMPASS {FIFO_CFG_SLAVE0} |
static constexpr uint8_t | mpud::types::COMPASS_I2CADDRESS = 0xC |
static constexpr uint8_t | mpud::types::COMPASS_SAMPLE_RATE_MAX = 100 |
static constexpr mag_stat1_t | mpud::types::MAG_STAT1_DATA_RDY {1 << regs::mag::STATUS1_DATA_RDY_BIT} |
static constexpr mag_stat1_t | mpud::types::MAG_STAT1_DATA_OVERRUN {1 << regs::mag::STATUS1_DATA_OVERRUN_BIT} |
static constexpr mag_stat2_t | mpud::types::MAG_STAT2_SENSOR_OVERFLOW {1 << regs::mag::STATUS2_OVERFLOW_BIT} |
static constexpr mag_stat2_t | mpud::types::MAG_STAT2_BIT_OUTPUT_SETTING {1 << regs::mag::STATUS2_BIT_OUTPUT_M_BIT} |
static constexpr mag_stat2_t | mpud::types::MAG_STAT2_DATA_ERROR {1 << regs::mag::STATUS2_DATA_ERROR_BIT} |
static constexpr auxi2c_slv_t | mpud::types::MAG_SLAVE_READ_DATA = AUXI2C_SLAVE_0 |
static constexpr auxi2c_slv_t | mpud::types::MAG_SLAVE_CHG_MODE = AUXI2C_SLAVE_1 |
static constexpr uint8_t | mpud::types::MAG_DATA_LENGTH = 8 |
static constexpr selftest_t | mpud::types::SELF_TEST_PASS {0x0} |
static constexpr selftest_t | mpud::types::SELF_TEST_GYRO_FAIL {1 << 0} |
static constexpr selftest_t | mpud::types::SELF_TEST_ACCEL_FAIL {1 << 1} |
Detailed Description
Declare Types and Definitions used within mpud
namespace.