diff --git a/README.md b/README.md index 8c1e046..750b04d 100644 --- a/README.md +++ b/README.md @@ -247,13 +247,15 @@ Note that although the Arduino constructor allows the bit depth to be set, it on analog.setCurrentValue(PWM_PIN, newValue); ``` -## ESP32 extras mode +## Matrix keyboard support -On ESP32 we are slowly adding support for direct IDF, as it's been requested by one of our clients. This will slowly appear over several releases. To enable this mode you can set the flag `IOA_USE_ESP32_EXTRAS`. Once you do this IDF functions are used for all digital IO functions. We always use IDF functions for analog input and DAC output, and are slowly moving toward direct LTDC functions for PWM instead of wrappers. +You can create matrix keyboards with any arrangement of keys, but the two most common cases of 3x4 and 4x4 layout number pads have ready-made layouts. There is an example showing usage in detail in both polling and interrupt mode on device pins and an I2C IoExpander. -## Other links +Alongside the example, there is comprehensive documentation describing the use of [matrix keyboards on Arduino](https://www.thecoderscorner.com/products/arduino-libraries/io-abstraction/matrix-keyboard-keypad-manager/). -[https://www.thecoderscorner.com/electronics/microcontrollers/switches-inputs/basic-io-abstraction-library-pins-or-8574/] +## ESP32 extras mode + +On ESP32 we are slowly adding support for direct IDF, as it's been requested by one of our clients. This will slowly appear over several releases. To enable this mode you can set the flag `IOA_USE_ESP32_EXTRAS`. Once you do this IDF functions are used for all digital IO functions. We always use IDF functions for analog input and DAC output, and are slowly moving toward direct LTDC functions for PWM instead of wrappers. ## Making changes to IoAbstraction diff --git a/library.json b/library.json index e79d2c4..c10fab7 100644 --- a/library.json +++ b/library.json @@ -25,7 +25,7 @@ "name": "TaskManagerIO" } ], - "version": "2.3.0", + "version": "2.3.1", "license": "Apache-2.0", "frameworks": "arduino, mbed", "platforms": "*", diff --git a/library.properties b/library.properties index 0b60ed1..a089c6b 100644 --- a/library.properties +++ b/library.properties @@ -4,7 +4,7 @@ # name=IoAbstraction -version=2.3.0 +version=2.3.1 maintainer=https://www.thecoderscorner.com author=davetcc category=Other diff --git a/src/IoAbstraction.cpp b/src/IoAbstraction.cpp index df8bdba..5071893 100644 --- a/src/IoAbstraction.cpp +++ b/src/IoAbstraction.cpp @@ -91,7 +91,7 @@ uint8_t ShiftRegisterIoAbstraction::readPort(pinid_t pin) { } } -uint8_t ShiftRegisterIoAbstraction::readValue(uint8_t pin) { +uint8_t ShiftRegisterIoAbstraction::readValue(pinid_t pin) { return ((lastRead & (1 << pin)) != 0) ? HIGH : LOW; } diff --git a/src/IoAbstraction.h b/src/IoAbstraction.h index d7130d8..49160b6 100644 --- a/src/IoAbstraction.h +++ b/src/IoAbstraction.h @@ -57,7 +57,7 @@ class ShiftRegisterIoAbstraction : public BasicIoAbstraction { ~ShiftRegisterIoAbstraction() override { } void pinDirection(pinid_t pin, uint8_t mode) override; void writeValue(pinid_t pin, uint8_t value) override; - uint8_t readValue(uint8_t pin) override; + uint8_t readValue(pinid_t pin) override; /** * Interrupts are not supported on shift registers */