saul/gpio: add handling of active-low signals + state initialization#7151
Closed
haukepetersen wants to merge 2 commits intoRIOT-OS:masterfrom
Closed
saul/gpio: add handling of active-low signals + state initialization#7151haukepetersen wants to merge 2 commits intoRIOT-OS:masterfrom
haukepetersen wants to merge 2 commits intoRIOT-OS:masterfrom
Conversation
- added two additional SAUL GPIO drivers, that can cope with inverted pin logic (e.g. low-active LEDs and buttons...) - initial pin level after (auto)initialization (set/clear/skip) is now configurable
Member
|
I don't think this belongs in SAUL. If anywhere it should be placed in the periph gpio driver. Some MCUs have hardware support for inverted GPIOs, which would give this feature almost for free on those platforms. |
Member
|
to be frank: I don't like it - considering the cost (you said it yourself) and the added complexity. [edit:] referring to @haukepetersen, not @gebart |
Contributor
Author
Good to know, I have never seen this... I am not too big of a fan to this approach myself, but this would be the clean way in terms of concepts... |
Contributor
Author
|
closed in favor of #7586 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
motivated by #7148
The SAUL GPIO driver can now handle inverted logic (active-low pins) and the initial state can be configured on a per-pin basis.
This costs us on the
samr21-xprowith two configured SAUL GPIOs ~100 byte, so it doesn't come cheap...I have not yet adapted other boards than the
samr21-xpro, wanted to get opinions first.