Fix Berry I2C2 compilation

This commit is contained in:
Theo Arends 2024-10-11 12:44:05 +02:00
parent f9ee4198e1
commit 154f478b5c
1 changed files with 2 additions and 0 deletions

View File

@ -35,8 +35,10 @@ TwoWire & getWire(bvm *vm) {
be_pop(vm, 1);
if (1 == bus && TasmotaGlobal.i2c_enabled) {
return Wire;
#ifdef USE_I2C_BUS2
} else if (2 == bus && TasmotaGlobal.i2c_enabled_2) {
return Wire1;
#endif // USE_I2C_BUS2
} else {
be_raise(vm, "configuration_error", "I2C bus not initiliazedd");
return *(TwoWire*)nullptr;