diff --git a/arch/stm32/stm32.ini b/arch/stm32/stm32.ini index 715e8aa73..dbb64722e 100644 --- a/arch/stm32/stm32.ini +++ b/arch/stm32/stm32.ini @@ -22,7 +22,22 @@ build_flags = -fdata-sections build_src_filter = - ${arduino_base.build_src_filter} - - - - - - - - - - - - - - + ${arduino_base.build_src_filter} + - + - + - + - + - + - + - + - + - + - + - + - + - + - + -<.pio/*/*/I2CKeyPad/*> board_upload.offset_address = 0x08000000 upload_protocol = stlink @@ -33,5 +48,5 @@ lib_deps = https://github.com/caveman99/Crypto.git#f61ae26a53f7a2d0ba5511625b8bf8eff3a35d5e lib_ignore = - mathertel/OneButton@~2.6.1 - Wire \ No newline at end of file + Wire + I2CKeyPad diff --git a/platformio.ini b/platformio.ini index e300c205d..e8aedc9ec 100644 --- a/platformio.ini +++ b/platformio.ini @@ -96,7 +96,7 @@ lib_deps = https://github.com/meshtastic/ArduinoThread.git#1ae8778c85d0a2a729f989e0b1e7d7c4dc84eef0 nanopb/Nanopb@^0.4.9 erriez/ErriezCRC32@^1.0.1 - robtillaart/I2CKeyPad@^0.4.0 ; port extender with keymatrix + robtillaart/I2CKeyPad@^0.5.0 ; port extender with keymatrix ; Used for the code analysis in PIO Home / Inspect check_tool = cppcheck diff --git a/src/detect/ScanI2CTwoWire.cpp b/src/detect/ScanI2CTwoWire.cpp index 434d93428..0b81435de 100644 --- a/src/detect/ScanI2CTwoWire.cpp +++ b/src/detect/ScanI2CTwoWire.cpp @@ -247,7 +247,7 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize) SCAN_SIMPLE_CASE(ST7567_ADDRESS, SCREEN_ST7567, "st7567 display found"); #ifndef HAS_TCA9535 - SCAN_SIMPLE_CASE(PCF8574A_ADDRESS, PCF8574A, "PCF8574A based keyboard found\n"); + SCAN_SIMPLE_CASE(PCF8574A_ADDRESS, PCF8574A, "PCF8574A based keyboard found"); #endif #ifdef HAS_NCP5623 SCAN_SIMPLE_CASE(NCP5623_ADDR, NCP5623, "NCP5623 RGB LED found"); diff --git a/src/input/peMatrixBase.cpp b/src/input/peMatrixBase.cpp index 5340898a9..a7f919209 100644 --- a/src/input/peMatrixBase.cpp +++ b/src/input/peMatrixBase.cpp @@ -6,7 +6,7 @@ extern ScanI2C::DeviceAddress cardkb_found; extern uint8_t kb_model; -I2CKeyPad keyPad(cardkb_found.address); +I2CKeyPad keyPad(cardkb_found.address, cardkb_found.port == ScanI2C::WIRE1 ? &Wire1 : &Wire); PeMatrixBase::PeMatrixBase(const char *name) : concurrency::OSThread(name) { @@ -24,7 +24,7 @@ int32_t PeMatrixBase::runOnce() // This is the first time the OSThread library has called this function, so do port setup firstTime = 0; if (!keyPad.begin()) { - LOG_ERROR("Failed to initialize I2C keypad\n"); + LOG_ERROR("Failed to initialize I2C keypad"); return disable(); } keyPad.loadKeyMap(keymap);