8000 pico w: pins improvements by jepler · Pull Request #7021 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

pico w: pins improvements #7021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 10, 2022
Merged

pico w: pins improvements #7021

merged 1 commit into from
Oct 10, 2022

Conversation

jepler
Copy link
@jepler jepler commented Oct 7, 2022

Closes: #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 the voltage monitor cannot be used. The ability to check the voltage monitor should be added back in some fashion in the future. (#7020)

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.
@jepler
Copy link
Author
jepler commented Oct 7, 2022

@anecdata is this an improvement over the status quo? any suggestions on improvements?

@anecdata
Copy link
Member
anecdata commented Oct 7, 2022

Yes, looks like this prohibits user access to special pins 23, 24, and 25, and adds / fixes user access to WL_GPIO1 / CYW1 / SMPS_MODE and WL_GPIO2 / CYW2 / VBUS_SENSE. I'll try to test today or tomorrow, but don't let me hold things up. Thanks!

Copy link
Member
@anecdata anecdata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@dhalbert
Copy link
Collaborator

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

I will approve and merge if this is not a remaining issue.

@jepler
Copy link
Author
jepler commented Oct 10, 2022

This is expected for now

Copy link
Collaborator
@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes and thanks @anecdata for the review.

8000
@dhalbert dhalbert merged commit 8d34445 into adafruit:main Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pico W pin names and functions need tweaking?
3 participants
0