15#ifndef M5_UNIT_IMU_UNIT_UNIT_MPU9250_HPP
16#define M5_UNIT_IMU_UNIT_UNIT_MPU9250_HPP
35 explicit UnitMPU9250(
const uint8_t addr = DEFAULT_ADDRESS,
const uint8_t mag_addr = 0x0C);
48 virtual bool begin()
override;
59 const mpu6886::Dlpf dlpf,
const uint8_t sample_rate_div)
override;
61 virtual std::shared_ptr<Adapter>
ensure_adapter(
const uint8_t ch)
override;
3-axis magnetometer unit. No standalone GROVE unit exists; it is the magnetometer embedded in the MPU...
Definition unit_ak8963.hpp:31
TDK InvenSense MPU-6500 6-axis core (accel + gyro + temp)
Definition unit_mpu6500.hpp:24
TDK InvenSense MPU-9250 9-axis IMU. Accel/gyro/temp (this unit itself) + AK8963 mag (mag()).
Definition unit_mpu9250.hpp:28
UnitMPU9250(const uint8_t addr=DEFAULT_ADDRESS, const uint8_t mag_addr=0x0C)
Construct with the MPU9250's accel/gyro address and the internal AK8963 mag address.
Definition unit_mpu9250.cpp:24
UnitAK8963 & mag()
Magnetometer sub-unit (add to an AhrsController for Mag). Accel/gyro/temp is this unit itself.
Definition unit_mpu9250.hpp:42
virtual ~UnitMPU9250()
Destructor.
Definition unit_mpu9250.hpp:37
virtual bool begin() override
Begin the accel/gyro die, then open the aux bypass. The framework begins the mag child next.
Definition unit_mpu9250.cpp:62
bool accepts_whoami(const uint8_t id) const override
Accepted WHO_AM_I id(s) for this chip; begin() rejects the device unless this returns true.
Definition unit_mpu9250.hpp:52
virtual std::shared_ptr< Adapter > ensure_adapter(const uint8_t ch) override
Share this composite's bus with the mag child, duplicated at the child's address.
Definition unit_mpu9250.cpp:34
Top level namespace of M5Stack.
Definition ahrs_controller.cpp:26
UnitAK8963 (3-axis magnetometer) unit component.
UnitMPU6500 (TDK InvenSense 6-axis IMU core)
AccelRange
Accelerometer full scale range (register value = enum << 3)
Definition unit_mpu6886_data.hpp:24
GyroRange
Gyroscope full scale range (register value = enum << 3)
Definition unit_mpu6886_data.hpp:35
Dlpf
Gyro/temp digital low pass filter (REG_CONFIG reg DLPF_CFG, valid when FCHOICE_B=00)
Definition unit_mpu6886_data.hpp:46