Merged
Conversation
Closes: adafruit#7017 * Remove the 'GP23' alias for CYW1 * Remove the 'CYW0' alias for CYW0 * Switch VBUS_SENSE to CYW2, remove 'GP24' alias Code that wants to use SMPS_MODE, VBUS_SENSE and LED while being portable to the W and non-W variants should use those names, not alias names. * Remove A3 / VOLTAGE_MONITOR Right now this cannot be used. The ability to check the voltage monitor should be added back in some fashion in the future.
Author
|
@anecdata is this an improvement over the status quo? any suggestions on improvements? |
Member
|
Yes, looks like this prohibits user access to special pins 23, 24, and 25, and adds / fixes user access to |
anecdata
reviewed
Oct 7, 2022
Member
There was a problem hiding this comment.
The CYW* pins look fine:
>>> led = digitalio.DigitalInOut(board.LED)
>>> led.switch_to_output(False)
>>> led.value = True
>>>
>>> smps_mode = digitalio.DigitalInOut(board.SMPS_MODE)
>>> smps_mode.switch_to_output(False)
>>> smps_mode = True
>>>
>>> vbus_sense = digitalio.DigitalInOut(board.VBUS_SENSE)
>>> vbus_sense.value
True(didn't explore power ramifications of SMPS_MODE)
Should this be inaccessible for now? Maybe it doesn't matter since users can't do anything with it.
>>> gpio29 = analogio.AnalogIn(microcontroller.pin.GPIO29)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: GPIO29 in use
Collaborator
I will approve and merge if this is not a remaining issue. |
Author
|
This is expected for now |
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.
Closes: #7017
Code that wants to use SMPS_MODE, VBUS_SENSE and LED while being portable to the W and non-W variants should use those names, not alias names.
Right now the voltage monitor cannot be used. The ability to check the voltage monitor should be added back in some fashion in the future. (#7020)