|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
I2C communication parameters. More...
#include <SensorCommBase.hpp>
Public Types | |
| enum | I2CParamType { I2C_SET_ADDR , I2C_SET_FLAG , I2C_SET_CLOCK , I2C_SET_WRITE_DELAY_US , I2C_SET_READ_DELAY_US } |
| Identifiers for the various I2C settings that can be changed. More... | |
Public Member Functions | |
| I2CParam (I2CParamType type, uint32_t params) | |
| Construct an I2C parameter object. | |
| uint32_t | getParams () const |
| Retrieve the stored parameter value. | |
| uint8_t | getType () const |
| Retrieve the parameter type. | |
Public Member Functions inherited from CommParamsBase | |
| virtual | ~CommParamsBase ()=default |
Protected Attributes | |
| enum I2CParamType | type |
| Which I2C parameter this object represents. | |
| uint32_t | params |
| The value of the parameter. | |
I2C communication parameters.
Encapsulates a type (which setting to change) and a value.
Definition at line 104 of file SensorCommBase.hpp.
Identifiers for the various I2C settings that can be changed.
Definition at line 110 of file SensorCommBase.hpp.
|
inline |
Construct an I2C parameter object.
| type | Which parameter to change (see I2CParamType). |
| params | The value associated with the parameter. |
Definition at line 123 of file SensorCommBase.hpp.
|
inline |
Retrieve the stored parameter value.
Definition at line 129 of file SensorCommBase.hpp.
References params.
|
inline |
Retrieve the parameter type.
Definition at line 138 of file SensorCommBase.hpp.
References type.
Referenced by SensorCommCustom::setParams().
|
protected |
The value of the parameter.
Definition at line 145 of file SensorCommBase.hpp.
Referenced by getParams().
|
protected |
Which I2C parameter this object represents.
Definition at line 144 of file SensorCommBase.hpp.
Referenced by getType().