M5Unit-IMU 0.0.2 git rev:e5b00aa
Loading...
Searching...
No Matches
m5::unit::bmm150::Data Struct Reference

One measurement (8 bytes burst from REG_DATA_X_LSB, register 0x42) More...

#include <unit_bmm150_data.hpp>

Public Member Functions

Raw ADC values
int16_t x_raw () const
 Raw magnetometer X (13bit signed, register bits[15:3])
 
int16_t y_raw () const
 Raw magnetometer Y (13bit signed, register bits[15:3])
 
int16_t z_raw () const
 Raw magnetometer Z (15bit signed, register bits[15:1])
 
uint16_t rhall () const
 Raw hall resistance (14bit unsigned, register bits[15:2])
 
bool drdy () const
 Data ready flag (bit0 of register 0x48)
 
Compensated values (Bosch trim compensation, integer uT = 1 LSB/uT)
int16_t comp_x () const
 Compensated magnetometer X (OVERFLOW_OUTPUT on overflow)
 
int16_t comp_y () const
 Compensated magnetometer Y (OVERFLOW_OUTPUT on overflow)
 
int16_t comp_z () const
 Compensated magnetometer Z (OVERFLOW_OUTPUT on overflow), saturated to +-32767 before scaling.
 
Library-scaled values (compensated uT rescaled to the library-wide 16 LSB/uT)
int32_t adj_x () const
 comp_x() rescaled to 16 LSB/uT (OVERFLOW_OUTPUT preserved as the -32768 sentinel)
 
int32_t adj_y () const
 comp_y() rescaled to 16 LSB/uT (OVERFLOW_OUTPUT preserved as the -32768 sentinel)
 
int32_t adj_z () const
 comp_z() rescaled to 16 LSB/uT (OVERFLOW_OUTPUT preserved as the -32768 sentinel)
 

Public Attributes

std::array< uint8_t, 8 > raw {}
 [0..1] X, [2..3] Y, [4..5] Z, [6..7] RHALL (bit0 of [6] = DRDY)
 
trim_t trim {}
 Trim values used by the compensation formulas.
 

Detailed Description

One measurement (8 bytes burst from REG_DATA_X_LSB, register 0x42)