Skip to content

pass additonal pins as arguments #66

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 2 commits into from
Dec 19, 2020
Merged

pass additonal pins as arguments #66

merged 2 commits into from
Dec 19, 2020

Conversation

jerryneedell
Copy link
Contributor

@jerryneedell jerryneedell commented Dec 19, 2020

addresses #65
add argument for passing ts_cs, sd_cs, neopixel_pin as arguments
keep defaults as expected.

tested default settings with feather_stm32f405_express
tested non-standard settings with umfeathers2

kbd_featherwing = keyboard_featherwing.KeyboardFeatherwing(cs=board.IO1,dc=board.IO3,ts_cs=boar>
          sd_cs=board.IO33,neopixel_pin=board.IO7)

I had to disable pylint (too-many-arguments)

displayio.release_displays()
if spi is None:
spi = board.SPI()
if cs is None:
cs = board.D9
if dc is None:
dc = board.D10
Copy link
Contributor

Choose a reason for hiding this comment

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

was the default for dc here removed intentionally?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No -- I will restore it -- surprised it worked OK on the stm32...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

restored - thanks for catching that.

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

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

I think we do want the dc default. I needed to add this back in to be able to use the no parameter constructor keyboard_featherwing.KeyboardFeatherwing() on a Feather Sense.

if dc is None:
    dc = board.D10

I tested your changes successfully with UM Feather S2 and it's working well.

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

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

Looks Good to me. Thank you!

@FoamyGuy FoamyGuy merged commit ec8aeca into adafruit:master Dec 19, 2020
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 20, 2020
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