|
M5Unit-IMU 0.0.2 git rev:e5b00aa
|
BMM150 setting enums and measurement data (framework independent) More...
#include <array>#include <cstdint>Go to the source code of this file.
Classes | |
| struct | m5::unit::bmm150::trim_t |
| Factory trim (calibration) values read from registers 0x5D-0x71, consumed by the compensation formulas in Data::comp_x()/comp_y()/comp_z() More... | |
| struct | m5::unit::bmm150::Data |
| One measurement (8 bytes burst from REG_DATA_X_LSB, register 0x42) More... | |
Namespaces | |
| namespace | m5 |
| Top level namespace of M5Stack. | |
Enumerations | |
| enum class | m5::unit::bmm150::DataRate : uint8_t { Rate10Hz = 0x00 , Rate2Hz = 0x01 , Rate6Hz = 0x02 , Rate8Hz = 0x03 , Rate15Hz = 0x04 , Rate20Hz = 0x05 , Rate25Hz = 0x06 , Rate30Hz = 0x07 } |
| Output data rate (REG_OP_MODE register bits 5:3, value order is NOT monotonic in Hz) More... | |
| enum class | m5::unit::bmm150::Preset : uint8_t { LowPower , Regular , EnhancedRegular , HighAccuracy } |
| Preset accuracy/power modes, controlling the REG_REP_XY/REG_REP_Z repetition counts (see preset_rep_xy()/preset_rep_z()) More... | |
Functions | |
| constexpr uint8_t | m5::unit::bmm150::preset_rep_xy (const Preset p) |
| REG_REP_XY register value (0x51) for the given preset. | |
| constexpr uint8_t | m5::unit::bmm150::preset_rep_z (const Preset p) |
| REG_REP_Z register value (0x52) for the given preset. | |
| constexpr uint16_t | m5::unit::bmm150::repetition_xy (const uint8_t rep_xy) |
| Repetitions actually performed on X/Y for a REG_REP_XY register value (nXY = 1 + 2*REPXY) | |
| constexpr uint16_t | m5::unit::bmm150::repetition_z (const uint8_t rep_z) |
| Repetitions actually performed on Z for a REG_REP_Z register value (nZ = 1 + REPZ) | |
| constexpr uint32_t | m5::unit::bmm150::measurement_time_us (const uint8_t rep_xy, const uint8_t rep_z) |
| Active measurement time (us) for the given repetition register values. | |
| constexpr uint32_t | m5::unit::bmm150::rate_interval_us (const DataRate rate) |
| Output period (us) of the given data rate. | |
| constexpr bool | m5::unit::bmm150::repetition_fits (const DataRate rate, const uint8_t rep_xy, const uint8_t rep_z) |
| Can a measurement with these repetitions complete within one period of this rate? | |
BMM150 setting enums and measurement data (framework independent)
|
strong |
|
strong |
Preset accuracy/power modes, controlling the REG_REP_XY/REG_REP_Z repetition counts (see preset_rep_xy()/preset_rep_z())
| Enumerator | |
|---|---|
| LowPower | Lowest power, lowest accuracy. |
| Regular | Balanced accuracy/power (recommended default) |
| EnhancedRegular | Enhanced accuracy over Regular. |
| HighAccuracy | Highest accuracy, highest power. |
|
constexpr |
Active measurement time (us) for the given repetition register values.
Bosch's timing relation, which reproduces every "max ODR in forced mode" figure in the datasheet's preset table: Regular (9/15) -> 9.8ms = 102Hz, HighAccuracy (47/83) -> 49.3ms = 20Hz. A measurement that cannot finish inside one output period is simply not written to the data registers (datasheet 4.2.4), so this is what bounds the usable rate – see repetition_fits()
|
constexpr |
Can a measurement with these repetitions complete within one period of this rate?