|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
@license MIT License More...
Go to the source code of this file.
Classes | |
| class | CommParamsBase |
| Abstract base for all communication parameter objects. More... | |
| class | I2CParam |
| I2C communication parameters. More... | |
| class | SPISettings |
| Emulation of Arduino's SPISettings class. More... | |
| class | SPIParam |
| SPI communication parameters. More... | |
| class | SensorCommBase |
| Abstract base class for low‑level sensor communication. More... | |
| class | SensorHalCustom |
| Customisation point for low‑level GPIO callbacks. More... | |
| class | SensorHal |
| Abstract hardware abstraction layer. More... | |
Macros | |
| #define | SPI_MODE0 0 |
| CPOL = 0, CPHA = 0. | |
| #define | SPI_MODE1 1 |
| CPOL = 0, CPHA = 1. | |
| #define | SPI_MODE2 2 |
| CPOL = 1, CPHA = 0. | |
| #define | SPI_MODE3 3 |
| CPOL = 1, CPHA = 1. | |
| #define | SPI_LSB 0 |
| Least significant bit first. | |
| #define | SPI_MSB 1 |
| Most significant bit first. | |
Functions | |
| template<typename T , size_t N> | |
| constexpr size_t | arraySize (const T(&arr)[N]) |
| Returns the number of elements in a C‑style array at compile time. | |
@license MIT License
Copyright (c) 2025 lewis he
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
It includes:
Definition in file SensorCommBase.hpp.
| #define SPI_LSB 0 |
Least significant bit first.
Definition at line 159 of file SensorCommBase.hpp.
| #define SPI_MODE0 0 |
CPOL = 0, CPHA = 0.
Definition at line 154 of file SensorCommBase.hpp.
| #define SPI_MODE1 1 |
CPOL = 0, CPHA = 1.
Definition at line 155 of file SensorCommBase.hpp.
| #define SPI_MODE2 2 |
CPOL = 1, CPHA = 0.
Definition at line 156 of file SensorCommBase.hpp.
| #define SPI_MODE3 3 |
CPOL = 1, CPHA = 1.
Definition at line 157 of file SensorCommBase.hpp.
| #define SPI_MSB 1 |
Most significant bit first.
Definition at line 160 of file SensorCommBase.hpp.
|
constexpr |
Returns the number of elements in a C‑style array at compile time.
| T | Element type. |
| N | Array size (deduced). |
| arr | Reference to the array. |
Definition at line 78 of file SensorCommBase.hpp.
Referenced by GaugeBQ27220::getChipID(), GaugeBQ27220::getFirmwareVersion(), GaugeBQ27220::getHardwareVersion(), and TouchDrvCHSC5816::sleep().