MetaWear C++ API  0.18.0
C++ implementation of the MetaWear protocol
magnetometer_bmm150.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include "sensor_common.h"
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
15 
16 const uint8_t MBL_MW_MAG_BFIELD_X_AXIS_INDEX = 0,
20 
56 typedef enum {
57  MBL_MW_MAG_BMM150_PRESET_LOW_POWER= 0,
58  MBL_MW_MAG_BMM150_PRESET_REGULAR,
59  MBL_MW_MAG_BMM150_PRESET_ENHANCED_REGULAR,
60  MBL_MW_MAG_BMM150_PRESET_HIGH_ACCURACY
62 
66 typedef enum {
67  MBL_MW_MAG_BMM150_ODR_10Hz = 0,
68  MBL_MW_MAG_BMM150_ODR_2Hz,
69  MBL_MW_MAG_BMM150_ODR_6Hz,
70  MBL_MW_MAG_BMM150_ODR_8Hz,
71  MBL_MW_MAG_BMM150_ODR_15Hz,
72  MBL_MW_MAG_BMM150_ODR_20Hz,
73  MBL_MW_MAG_BMM150_ODR_25Hz,
74  MBL_MW_MAG_BMM150_ODR_30Hz
76 
97 METAWEAR_API void mbl_mw_mag_bmm150_configure(const MblMwMetaWearBoard *board, uint16_t xy_reps, uint16_t z_reps, MblMwMagBmm150Odr odr);
104 
131 
132 #ifdef __cplusplus
133 }
134 #endif
const uint8_t MBL_MW_MAG_BFIELD_Y_AXIS_INDEX
Indices for component values of the bfield data signal, used with mbl_mw_datasignal_get_component.
Definition: magnetometer_bmm150.h:17
MblMwMagBmm150Odr
Available output data rates for the BMM150 magnetometer.
Definition: magnetometer_bmm150.h:66
METAWEAR_API void mbl_mw_mag_bmm150_disable_b_field_sampling(const MblMwMetaWearBoard *board)
Disable B field sampling.
MblMwMagBmm150Preset
Preset power modes recommended by Bosch.
Definition: magnetometer_bmm150.h:56
struct MblMwMetaWearBoard MblMwMetaWearBoard
Software representation of a physical MetaWear board.
Definition: metawearboard_fwd.h:17
METAWEAR_API void mbl_mw_mag_bmm150_configure(const MblMwMetaWearBoard *board, uint16_t xy_reps, uint16_t z_reps, MblMwMagBmm150Odr odr)
Manually configure the sensor, only for advanced users.
const uint8_t MBL_MW_MAG_BFIELD_X_AXIS_INDEX
Indices for component values of the bfield data signal, used with mbl_mw_datasignal_get_component.
Definition: magnetometer_bmm150.h:16
METAWEAR_API void mbl_mw_mag_bmm150_start(const MblMwMetaWearBoard *board)
Switches the magnetometer into normal mode.
METAWEAR_API void mbl_mw_mag_bmm150_set_preset(const MblMwMetaWearBoard *board, MblMwMagBmm150Preset preset)
Sets the power mode to one of the recommended presets.
METAWEAR_API void mbl_mw_mag_bmm150_enable_b_field_sampling(const MblMwMetaWearBoard *board)
Enable B field sampling.
METAWEAR_API void mbl_mw_mag_bmm150_suspend(const MblMwMetaWearBoard *board)
Puts the magnetometer in suspend mode.
const uint8_t MBL_MW_MAG_BFIELD_Z_AXIS_INDEX
Indices for component values of the bfield data signal, used with mbl_mw_datasignal_get_component.
Definition: magnetometer_bmm150.h:18
METAWEAR_API MblMwDataSignal * mbl_mw_mag_bmm150_get_b_field_data_signal(const MblMwMetaWearBoard *board)
Retrieves the data signal representing B field strength.
METAWEAR_API MblMwDataSignal * mbl_mw_mag_bmm150_get_packed_b_field_data_signal(const MblMwMetaWearBoard *board)
Variant of B field data that packs multiple data samples into 1 BLE packet to increase the data throu...
#define METAWEAR_API
Indicates the function should be exported to the symbol table.
Definition: dllmarker.h:27
METAWEAR_API void mbl_mw_mag_bmm150_stop(const MblMwMetaWearBoard *board)
Switches the magnetometer into sleep mode.
struct MblMwDataSignal MblMwDataSignal
A event fired from the MetaWear board that also contains data.
Definition: datasignal_fwd.h:15