Skip to content

Add explicit pin directions to examples #13

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
Dec 21, 2018

Conversation

brentru
Copy link
Member

@brentru brentru commented Dec 21, 2018

While digitalio defaults to input, it's very important for the IRQ and CS pins to be set as inputs, IRQ is expected to be pulled up at the end of the send_packet() method.

Patch:

  • Adding explicit pin directions to examples in case the default changes and for clarity.

@brentru brentru requested a review from jerryneedell December 21, 2018 15:35
@jerryneedell
Copy link
Contributor

CS is an output
IRQ is an input

Copy link
Contributor

@jerryneedell jerryneedell left a comment

Choose a reason for hiding this comment

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

Why is CS being set to INPUT?

@jerryneedell
Copy link
Contributor

I'd rather see IRQ set to INPUT in adafruit_tinylora.py. The user just provides the pins

@brentru
Copy link
Member Author

brentru commented Dec 21, 2018

I've set the irq as input and cs as output from the driver instead of the example, added self._cs as well, passed into the bus device, removed directions in examples/

Copy link
Contributor

@jerryneedell jerryneedell 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. Tested with feather m0 rfm9x.

@jerryneedell jerryneedell merged commit e13d7f6 into adafruit:master Dec 21, 2018
tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 22, 2018
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