Cleanup i2c scan logs and macro to save some bytes and remain consistent (#5455)

* Cleanup i2c scan logs and macro to save some bytes and remain consistent

* Functions are better than macros

* Exclude i2c scan for STM32

* Useless log
This commit is contained in:
Ben Meadors
2024-11-26 13:59:50 -06:00
committed by GitHub
parent 09286a3beb
commit fe86c40145
4 changed files with 121 additions and 110 deletions

View File

@@ -21,6 +21,9 @@ extern NimbleBluetooth *nimbleBluetooth;
#include "NRF52Bluetooth.h"
extern NRF52Bluetooth *nrf52Bluetooth;
#endif
#if !MESHTASTIC_EXCLUDE_I2C
#include "detect/ScanI2CTwoWire.h"
#endif
#if ARCH_PORTDUINO
extern HardwareSPI *DisplaySPI;
@@ -84,6 +87,10 @@ extern bool pauseBluetoothLogging;
void nrf52Setup(), esp32Setup(), nrf52Loop(), esp32Loop(), rp2040Setup(), clearBonds(), enterDfuMode();
meshtastic_DeviceMetadata getDeviceMetadata();
#if !MESHTASTIC_EXCLUDE_I2C
void scannerToSensorsMap(const std::unique_ptr<ScanI2CTwoWire> &i2cScanner, ScanI2C::DeviceType deviceType,
meshtastic_TelemetrySensorType sensorType);
#endif
// We default to 4MHz SPI, SPI mode 0
extern SPISettings spiSettings;