From 80eb0b138d9af8754a5f894f4dbb8580a1f2f8fa Mon Sep 17 00:00:00 2001 From: Per Tillisch Date: Sat, 18 Oct 2025 23:43:47 -0700 Subject: [PATCH] Restore `IO_REG_TYPE` definition for AVR The definition of the `IO_REG_TYPE` macro when compiling for an AVR target was accidentally removed by the previous commit. This resulted in the library failing to compile for those targets: ``` Encoder.h:66:11: error: 'IO_REG_TYPE' does not name a type volatile IO_REG_TYPE * pin1_register; ^~~~~~~~~~~ ``` The macro definition is hereby restored. --- utility/direct_pin_read.h | 1 + 1 file changed, 1 insertion(+) diff --git a/utility/direct_pin_read.h b/utility/direct_pin_read.h index 75660ac..d7d6b8c 100644 --- a/utility/direct_pin_read.h +++ b/utility/direct_pin_read.h @@ -3,6 +3,7 @@ #if defined(__AVR__) +#define IO_REG_TYPE uint8_t #define PIN_TO_BASEREG(pin) (portInputRegister(digitalPinToPort(pin))) #define PIN_TO_BITMASK(pin) (digitalPinToBitMask(pin)) #define DIRECT_PIN_READ(base, mask) (((*(base)) & (mask)) ? 1 : 0)