SensorLib
0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
sensor/imu/bhi260/SensorBHI260AP.hpp
Go to the documentation of this file.
1
31
#pragma once
32
33
#include "../../../SensorBuildOpt.h"
34
#if !SENSORLIB_EXCLUDE_BHI260
35
#include "../../../bosch/BoschSensorBase.hpp"
36
37
// The BHI260 I2C address can be either 0x28 or 0x29, depending on the state of the HSDO pin.
38
// HSDO pin set low
39
static
constexpr
uint8_t BHI260AP_SLAVE_ADDRESS_L = (0x28);
40
// HSDO pin set high
41
static
constexpr
uint8_t BHI260AP_SLAVE_ADDRESS_H = (0x29);
42
43
44
class
SensorBHI260AP
final:
public
BoschSensorBase
45
{
46
public
:
47
48
// The pin names are named according to the sensor manual.
49
enum
BHI260AP_GPIO
{
50
MCSB1
= 1,
51
RESV1
= 2,
52
RESV2
= 3,
53
MCSB2
= 4,
//It may be connected to the BMM150 sensor, select according to the actual situation
54
MCSB3
= 5,
55
MCSB4
= 6,
56
57
QSPI_CLK
= 8,
// If BHI260 carries external flash, it is not available
58
QSPI_CSN
= 9,
// If BHI260 carries external flash, it is not available
59
QSPI_D0
= 10,
// If BHI260 carries external flash, it is not available
60
QSPI_D1
= 11,
// If BHI260 carries external flash, it is not available
61
QSPI_D2
= 12,
// If BHI260 carries external flash, it is not available
62
QSPI_D3
= 13,
// If BHI260 carries external flash, it is not available
63
64
M2SCX
= 14,
65
M2SDX
= 15,
66
M2SDI
= 16,
67
M3SCL
= 17,
//It may be connected to the BMM150 sensor, select according to the actual situation
68
M3SDA
= 18,
//It may be connected to the BMM150 sensor, select according to the actual situation
69
JTAG_CLK
= 19,
70
JTAG_DIO
= 20,
71
72
M1SCX
= 127,
// Invalid Pin
73
M1SDX
= 128,
// Invalid Pin
74
M1SDI
= 129,
// Invalid Pin
75
RESV3
= 130,
// Invalid Pin
76
};
77
78
~SensorBHI260AP
() =
default
;
79
SensorBHI260AP
() =
default
;
80
87
void
setBootFromFlash
(
bool
boot_from_flash);
88
96
uint8_t
digitalRead
(uint8_t pin,
bool
pullup =
false
);
97
105
void
digitalWrite
(uint8_t pin, uint8_t
level
);
106
113
void
disableGpio
(uint8_t pin);
114
115
protected
:
121
uint16_t
getConfirmationIDImpl
()
override
;
122
};
123
124
#endif
level
uint8_t level
Definition
aw9364_led.ino:42
SensorBHI260AP
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:45
SensorBHI260AP::BHI260AP_GPIO
BHI260AP_GPIO
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:49
SensorBHI260AP::RESV1
@ RESV1
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:51
SensorBHI260AP::M1SDI
@ M1SDI
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:74
SensorBHI260AP::M3SDA
@ M3SDA
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:68
SensorBHI260AP::QSPI_D3
@ QSPI_D3
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:62
SensorBHI260AP::MCSB3
@ MCSB3
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:54
SensorBHI260AP::QSPI_D0
@ QSPI_D0
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:59
SensorBHI260AP::MCSB1
@ MCSB1
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:50
SensorBHI260AP::RESV2
@ RESV2
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:52
SensorBHI260AP::QSPI_CLK
@ QSPI_CLK
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:57
SensorBHI260AP::QSPI_CSN
@ QSPI_CSN
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:58
SensorBHI260AP::MCSB2
@ MCSB2
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:53
SensorBHI260AP::M2SCX
@ M2SCX
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:64
SensorBHI260AP::M1SDX
@ M1SDX
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:73
SensorBHI260AP::JTAG_CLK
@ JTAG_CLK
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:69
SensorBHI260AP::M2SDI
@ M2SDI
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:66
SensorBHI260AP::JTAG_DIO
@ JTAG_DIO
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:70
SensorBHI260AP::QSPI_D1
@ QSPI_D1
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:60
SensorBHI260AP::RESV3
@ RESV3
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:75
SensorBHI260AP::M2SDX
@ M2SDX
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:65
SensorBHI260AP::M3SCL
@ M3SCL
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:67
SensorBHI260AP::M1SCX
@ M1SCX
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:72
SensorBHI260AP::QSPI_D2
@ QSPI_D2
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:61
SensorBHI260AP::MCSB4
@ MCSB4
Definition
sensor/imu/bhi260/SensorBHI260AP.hpp:55
SensorBHI260AP::digitalWrite
void digitalWrite(uint8_t pin, uint8_t level)
digitalWrite
Definition
SensorBHI260AP.cpp:58
SensorBHI260AP::digitalRead
uint8_t digitalRead(uint8_t pin, bool pullup=false)
digitalRead
Definition
SensorBHI260AP.cpp:40
SensorBHI260AP::SensorBHI260AP
SensorBHI260AP()=default
SensorBHI260AP::disableGpio
void disableGpio(uint8_t pin)
disableGpio
Definition
SensorBHI260AP.cpp:65
SensorBHI260AP::getConfirmationIDImpl
uint16_t getConfirmationIDImpl() override
Get the confirmation ID for the sensor.
Definition
SensorBHI260AP.cpp:72
SensorBHI260AP::~SensorBHI260AP
~SensorBHI260AP()=default
SensorBHI260AP::setBootFromFlash
void setBootFromFlash(bool boot_from_flash)
setBootFromFlash
Definition
SensorBHI260AP.cpp:35
src
sensor
imu
bhi260
SensorBHI260AP.hpp
Generated by
1.9.8