mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-18 01:11:42 +10:00
Reclock I2C for sensors is aware of screen I2C frequency (#9898)
* Add define for screen I2C frequency * Add functions to get I2C screen frequency and port * Make reclock function aware of screen-set I2C speeds * Refurbish ReClockI2C API * Make ReClockI2C API class * Use new API in AirQualityTelemetry module * Minor changes on some logs * Update esp8266-oled library * Fix esp8266 library * Minor logging changes * Improve setClock and restoreClock cases * Make getter functions const, fix capitalisaiton of new functions * Minor typo, remove pragma once * Low prio debug fixes * Mark getter functions as const (properly) * Fix LOG based on coderabbit feedback --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#if !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR
|
||||
|
||||
#include "../detect/ReClockI2C.h"
|
||||
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
||||
#include "RTC.h"
|
||||
#include "TelemetrySensor.h"
|
||||
@@ -35,6 +36,10 @@ class PMSA003ISensor : public TelemetrySensor
|
||||
uint8_t buffer[PMSA003I_FRAME_LENGTH]{};
|
||||
TwoWire *_bus{};
|
||||
uint8_t _address{};
|
||||
#ifdef PMSA003I_I2C_CLOCK_SPEED
|
||||
ScanI2C::I2CPort _port = ScanI2C::I2CPort::NO_I2C;
|
||||
ReClockI2C reClockI2C;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user