From 6580e655fb255125d63e41e05045075452f5bef9 Mon Sep 17 00:00:00 2001 From: Stuart Pittaway <1201909+stuartpittaway@users.noreply.github.com> Date: Mon, 6 Dec 2021 21:40:18 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20TWIBus=20Wire.begin=20call?= =?UTF-8?q?=20(#23183)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/twibus.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Marlin/src/feature/twibus.cpp b/Marlin/src/feature/twibus.cpp index bbe4c0966a..9aec6b0305 100644 --- a/Marlin/src/feature/twibus.cpp +++ b/Marlin/src/feature/twibus.cpp @@ -40,11 +40,11 @@ TWIBus::TWIBus() { Wire.setSCL(pin_t(I2C_SCL_PIN)); #endif - Wire.begin(); // No address joins the BUS as the master + Wire.begin(); // No address joins the BUS as the master #else - Wire.begin(I2C_SLAVE_ADDRESS); // Join the bus as a slave + Wire.begin(I2C_SLAVE_ADDRESS); // Join the bus as a slave #endif reset(); @@ -56,9 +56,8 @@ void TWIBus::reset() { } void TWIBus::address(const uint8_t adr) { - if (!WITHIN(adr, 8, 127)) { + if (!WITHIN(adr, 8, 127)) SERIAL_ECHO_MSG("Bad I2C address (8-127)"); - } addr = adr;