SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
sensor/imu/bhi360/SensorBHI360.hpp
Go to the documentation of this file.
1
31#pragma once
32
33#include "../../../SensorBuildOpt.h"
34#if !SENSORLIB_EXCLUDE_BHI360
35#include "../../../bosch/BoschSensorBase.hpp"
36#include "../../../bosch/bhi36x/bhi360_event_data.h"
37#include "../../../bosch/bhi36x/bhi360_multi_tap_param.h"
38#include "../../../bosch/bhi36x/bhi360_phy_sensor_ctrl_param.h"
39#include "../../../bosch/bhi36x/bhi360_head_orientation_param.h"
40#include "../../../bosch/bhi36x/bhi360_bsx_algo_param.h"
41#include "../../../bosch/bhi36x/bhi360_bsec_param.h"
42
43// The BHI360 I2C address can be either 0x28 or 0x29, depending on the state of the HSDO pin.
44// HSDO pin set low
45static constexpr uint8_t BHI360_SLAVE_ADDRESS_L = (0x28);
46// HSDO pin set high
47static constexpr uint8_t BHI360_SLAVE_ADDRESS_H = (0x29);
48
49using MultiTapDataType = bhi360_event_data_multi_tap;
50using StepCounterConfig = bhi360_phy_sensor_ctrl_param_step_counter;
51using MultiTapDetectorConfig = bhi360_multi_tap_param_detector;
52
53class SensorBHI360 final: public BoschSensorBase
54{
55public:
56 ~SensorBHI360() = default;
57 SensorBHI360() = default;
58
59
66
72 bool setStepCounterConfig(const StepCounterConfig &config);
73
80
87
95
101 bool setMultiTapParamConfig(const MultiTapDataType &config);
102
103protected:
109 uint16_t getConfirmationIDImpl() override;
110};
111
112#endif
bool getMultiTapDetectorConfig(MultiTapDetectorConfig &config)
Get the current configuration of the Multi Tap Detector algorithm.
bool setMultiTapDetectorConfig(const MultiTapDetectorConfig &config)
Set the configuration for the Multi Tap Detector algorithm.
uint16_t getConfirmationIDImpl() override
Get the confirmation ID for the sensor.
bool setStepCounterConfig(const StepCounterConfig &config)
Set the configuration for the Step Counter algorithm.
bool setMultiTapParamConfig(const MultiTapDataType &config)
Set the configuration for the Multi Tap parameters.
bool getStepCounterConfig(StepCounterConfig &config)
Get the current configuration of the Step Counter algorithm.
SensorBHI360()=default
~SensorBHI360()=default
bool getMultiTapParamConfig(MultiTapDataType(&config)[8])
Get the current configuration of the Multi Tap parameters.
bhi360_multi_tap_param_detector MultiTapDetectorConfig
bhi360_event_data_multi_tap MultiTapDataType
bhi360_phy_sensor_ctrl_param_step_counter StepCounterConfig