raytac-diy
Thomas Göttgens 2022-11-13 11:58:02 +01:00
rodzic b6de79b21a
commit 037d6c253b
4 zmienionych plików z 10 dodań i 1 usunięć

Wyświetl plik

@ -221,5 +221,5 @@ void scanI2Cdevice(TwoWire myWire, uint8_t busnum)
DEBUG_MSG("%i I2C devices found\n",nDevices);
}
#else
void scanI2Cdevice(TwoWire myWire, uint8_t busnum) {}
void scanI2Cdevice() {}
#endif

Wyświetl plik

@ -1,6 +1,8 @@
#include "cardKbI2cImpl.h"
#include "InputBroker.h"
#if HAS_WIRE
CardKbI2cImpl *cardKbI2cImpl;
CardKbI2cImpl::CardKbI2cImpl() :
@ -18,3 +20,5 @@ void CardKbI2cImpl::init()
inputBroker->registerSource(this);
}
#endif

Wyświetl plik

@ -3,6 +3,7 @@
#include "main.h"
#include <Wire.h>
#if HAS_WIRE
KbI2cBase::KbI2cBase(const char *name) : concurrency::OSThread(name)
{
@ -120,3 +121,5 @@ int32_t KbI2cBase::runOnce()
}
return 500;
}
#endif

Wyświetl plik

@ -247,8 +247,10 @@ void setup()
powerStatus->observe(&power->newStatus);
power->setup(); // Must be after status handler is installed, so that handler gets notified of the initial configuration
#if HAS_WIRE
// We need to scan here to decide if we have a screen for nodeDB.init()
scanI2Cdevice(Wire,0);
#endif
#ifdef I2C_SDA1
scanI2Cdevice(Wire1,1);