Merged
Conversation
* Updated Aw9523 API so that the set_pins now actually writes the output high (sets) the pins provided by the pin mask, not changing the other outputs * Added clear_pins API to Aw9523 to write the output low (clears) for the pins provided in the pin mask, not changing the other outputs * Added output(...) APIs to Aw9523 to keep functionality for simultaneously writing all values (high and low) for all pins on the output, in case the user wants to do that (e.g. to ensure certain pins are XOR-ed) * Rebuilt docs * Minor update to example code
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.
Description
Motivation and Context
Previously, if the user only wanted to set / clear a value for a certain pin, they would have to keep track of the state internally, since there was no API for reading the current output state and any call to the existing
set_pinsfunctions would overwrite all output values. This PR changes the set_pins API to only set the output values high for the pins that are set in the provided bit mask - doing so by reading the value of the output registers first. It similarly adds aclear_pinsfunction which sets the output values low for any pins whose bits are set in the provided masks. The original functionality of theset_pinsfunction which set both high and low output values for all output pins at once is now provided by theoutputfunctions.How has this been tested?
Building the Aw9523 example.
Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):
Types of changes
Checklist:
Software
.github/workflows/build.ymlfile to add my new test to the automated cloud build github action.