Skip to content

Abstract calls to digitalWrite and pinMode from the outside "world" by making virtual protected methods#27

Open
DrItanium wants to merge 1 commit intoarduino-libraries:masterfrom
DrItanium:abstractFromWorld
Open

Abstract calls to digitalWrite and pinMode from the outside "world" by making virtual protected methods#27
DrItanium wants to merge 1 commit intoarduino-libraries:masterfrom
DrItanium:abstractFromWorld

Conversation

@DrItanium
Copy link
Copy Markdown

After seeing the Adafruit RGBLCDShield I wanted to do the same thing over SPI (using an MCP23S17) but found that the LiquidCrystal library is written to favor code duplication over inheritance. After doing some experiments I found that only digitalWrite and pinMode need to become virtual inside the class. This change does not break the external interface nor internal design in any way.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 9, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: code Related to content of the project itself type: enhancement Proposed improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants