fix portduino

This commit is contained in:
Thomas Göttgens 2022-11-13 11:58:02 +01:00
parent b6de79b21a
commit 037d6c253b
4 changed files with 10 additions and 1 deletions

View File

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

View File

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

View File

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

View File

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