From 496a20014d42bfd034255fa1280f7891966e2c8d Mon Sep 17 00:00:00 2001 From: David Ordnung Date: Fri, 27 Jun 2025 17:16:11 +0200 Subject: [PATCH] fix(Wire): only recover bus when device is master --- libraries/Wire/src/Wire.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/Wire/src/Wire.cpp b/libraries/Wire/src/Wire.cpp index c167aca5ac..e5a2b7bdb6 100644 --- a/libraries/Wire/src/Wire.cpp +++ b/libraries/Wire/src/Wire.cpp @@ -90,7 +90,9 @@ void TwoWire::begin(uint8_t address, bool generalCall, bool NoStretchMode) _i2c.NoStretchMode = (NoStretchMode == true) ? 1 : 0; - recoverBus(); // in case I2C bus (device) is stuck after a reset for example + if (_i2c.isMaster == 1) { + recoverBus(); // in case I2C bus (device) is stuck after a reset for example + } i2c_init(&_i2c, 100000, ownAddress); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy