From 5295a5f83705d77f097d21b24c558a1bd11991ad Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Mon, 10 Jun 2024 13:51:41 +0200 Subject: [PATCH] Modulino: avoid calling read() and write() and address >= 0x7F --- src/Modulino.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Modulino.h b/src/Modulino.h index e16f652..863f231 100644 --- a/src/Modulino.h +++ b/src/Modulino.h @@ -51,7 +51,7 @@ class Module : public Printable { return Modulino._wire; } bool read(uint8_t* buf, int howmany) { - if (address == 0xFF) { + if (address >= 0x7F) { return false; } Modulino._wire->requestFrom(address, howmany + 1); @@ -72,7 +72,7 @@ class Module : public Printable { return true; } bool write(uint8_t* buf, int howmany) { - if (address == 0xFF) { + if (address >= 0x7F) { return false; } Modulino._wire->beginTransmission(address);