|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
@license MIT License More...
#include <Wire.h>#include <SPI.h>#include <Arduino.h>#include <ImuDrv.hpp>#include <Commander.h>#include <BoschFirmware.h>Go to the source code of this file.
Macros | |
| #define | USE_I2C_INTERFACE |
| #define | BHI260_SDA 2 |
| #define | BHI260_SCL 3 |
| #define | BHI260_IRQ 8 |
| #define | BHI260_RST -1 |
| #define | BOSCH_BHI260_AUX_BMM150_BEM280_GPIO |
| #define | USING_SENSOR_IRQ_METHOD |
Functions | |
| void | initialiseCommander () |
| void | dataReadyISR () |
| void | parse_bme280_sensor_data (uint8_t sensor_id, const uint8_t *data_ptr, uint32_t len, uint64_t *timestamp, void *user_data) |
| void | progress_callback (uint32_t total, uint32_t transferred, void *user_data) |
| void | setup () |
| void | loop () |
| bool | helpHandler (Commander &Cmdr) |
| bool | setTemperature (Commander &Cmdr) |
| bool | setHumidity (Commander &Cmdr) |
| bool | setPressure (Commander &Cmdr) |
| bool | setGpioLevel (Commander &Cmdr) |
| bool | getGpioLevel (Commander &Cmdr) |
| bool | disGpioMode (Commander &Cmdr) |
Variables | |
| Commander | cmd |
| SensorBHI260AP | bhy |
| bool | force_update_flash_firmware = true |
| volatile bool | isInterruptTriggered = false |
| const commandList_t | masterCommands [] |
@license MIT License
Copyright (c) 2024 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.
Definition in file bhi260ap_aux_bmm150_bme280_gpio.ino.
| #define BHI260_IRQ 8 |
Definition at line 81 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
| #define BHI260_RST -1 |
Definition at line 86 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
| #define BHI260_SCL 3 |
Definition at line 76 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
| #define BHI260_SDA 2 |
Definition at line 72 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
| #define BOSCH_BHI260_AUX_BMM150_BEM280_GPIO |
Definition at line 92 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
| #define USE_I2C_INTERFACE |
Definition at line 43 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
| #define USING_SENSOR_IRQ_METHOD |
Definition at line 109 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
| void dataReadyISR | ( | ) |
Definition at line 115 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
References isInterruptTriggered.
Referenced by setup().
| bool disGpioMode | ( | Commander & | Cmdr | ) |
Definition at line 396 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
References bhy, and SensorBHI260AP::disableGpio().
| bool getGpioLevel | ( | Commander & | Cmdr | ) |
Definition at line 374 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
References bhy, SensorBHI260AP::digitalRead(), and level.
| bool helpHandler | ( | Commander & | Cmdr | ) |
Definition at line 288 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
| void initialiseCommander | ( | ) |
Definition at line 279 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
References cmd, and masterCommands.
Referenced by setup().
| void loop | ( | ) |
Definition at line 246 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
References bhy, cmd, and isInterruptTriggered.
| void parse_bme280_sensor_data | ( | uint8_t | sensor_id, |
| const uint8_t * | data_ptr, | ||
| uint32_t | len, | ||
| uint64_t * | timestamp, | ||
| void * | user_data | ||
| ) |
Definition at line 121 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
References humidity(), pressure(), and temperature().
Referenced by setup().
| void progress_callback | ( | uint32_t | total, |
| uint32_t | transferred, | ||
| void * | user_data | ||
| ) |
Definition at line 146 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
| bool setGpioLevel | ( | Commander & | Cmdr | ) |
Definition at line 358 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
References bhy, SensorBHI260AP::digitalWrite(), and level.
| bool setHumidity | ( | Commander & | Cmdr | ) |
Definition at line 313 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
References bhy.
| bool setPressure | ( | Commander & | Cmdr | ) |
Definition at line 325 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
References bhy.
| bool setTemperature | ( | Commander & | Cmdr | ) |
Definition at line 301 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
References bhy.
| void setup | ( | ) |
Definition at line 154 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
References BHI260_IRQ, BHI260_RST, BHI260_SCL, BHI260_SDA, bhy, cmd, dataReadyISR(), force_update_flash_firmware, initialiseCommander(), parse_bme280_sensor_data(), SensorBHI260AP::setBootFromFlash(), SPI_MISO, SPI_MOSI, and SPI_SCK.
| SensorBHI260AP bhy |
Definition at line 89 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
Referenced by disGpioMode(), getGpioLevel(), loop(), setGpioLevel(), setHumidity(), setPressure(), setTemperature(), and setup().
| Commander cmd |
Definition at line 36 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
Referenced by applyCommand(), handleSerialCommands(), handleWomCommands(), i2c_drv_probe(), i2c_drv_scan(), initialiseCommander(), loop(), setup(), and SensorQMI8658::writeCommand().
| bool force_update_flash_firmware = true |
Definition at line 106 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
Referenced by setup().
| volatile bool isInterruptTriggered = false |
Definition at line 113 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
Referenced by dataReadyISR(), and loop().
| const commandList_t masterCommands[] |
Definition at line 269 of file bhi260ap_aux_bmm150_bme280_gpio.ino.
Referenced by initialiseCommander().