Skip to content

Commit

Permalink
#155 fix shift register to compile on mbed Arduino. Bump version for …
Browse files Browse the repository at this point in the history
…release.
  • Loading branch information
davetcc committed May 30, 2022
1 parent c6ab48e commit 8fc1c02
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"name": "TaskManagerIO"
}
],
"version": "2.3.0",
"version": "2.3.1",
"license": "Apache-2.0",
"frameworks": "arduino, mbed",
"platforms": "*",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#

name=IoAbstraction
version=2.3.0
version=2.3.1
maintainer=https://www.thecoderscorner.com
author=davetcc
category=Other
Expand Down
2 changes: 1 addition & 1 deletion src/IoAbstraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/IoAbstraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 8fc1c02

Please sign in to comment.