Skip to content

Adds BOOT0 as a fifth pin for the Peripherals.buttons list. #89

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 3 commits into from
Jul 27, 2022

Conversation

nitz
Copy link
Contributor

@nitz nitz commented Jul 27, 2022

Added the BOOT0 button as a fifth pin for the buttons list.

This is dependant on adafruit/circuitpython#6657, where I added the pin's name to the board's port. I'm not sure if the BOOT0 pin was skipped intentionally or not, so I'm opening this as a draft until that PR gets looked at.

@nitz nitz marked this pull request as ready for review July 27, 2022 18:05
@nitz
Copy link
Contributor Author

nitz commented Jul 27, 2022

Looks like adafruit/circuitpython#6657 merged, so I've marked this as RFR, for your consideration :)

Also pushed a change to please black; I guess it wants to chop the parameters now.

Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

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

In order to avoid breaking compatibility of this library with older versions of CP, could you add a check to make sure that BOOT0 is in board (using hasattr()) and only add it to the list if it's there?

@nitz
Copy link
Contributor Author

nitz commented Jul 27, 2022

Fantastic thought; added!

Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

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

Looks great. Exactly what I was thinking.

@makermelissa makermelissa merged commit 71d74c8 into adafruit:main Jul 27, 2022
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jul 29, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_SI1145 to 1.0.2 from 1.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_SI1145#7 from tekktrik/doc/fix-image

Updating https://github.com/adafruit/Adafruit_CircuitPython_MagTag to 2.2.0 from 2.1.12:
  > Merge pull request adafruit/Adafruit_CircuitPython_MagTag#89 from nitz/add-peripheral-button-boot0
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.

2 participants