Skip to content
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

Add method for controlling GPIO push-pull output drive #424

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

BartMassey
Copy link
Member

The nRF GPIO output pins support a "high drive" mode for low and high push-pull outputs individually. A high-drive output can source more current, and thus has a faster transition than "standard drive". I needed this for experimenting with the MicroBit v2 speaker output pin.

Right now, this crate supports only "standard drive" push-pull outputs. This non-breaking pull request add an .into_push_pull_output_drive() method to pins, with an extra configuration argument DriveConfig. This is kind of gross, but was chosen to avoid changing .into_push_pull_output().

I would be happy to add tests, but would need some tutoring to understand exactly how. Bikeshedding is also quite welcome.

@qwandor qwandor merged commit b05db68 into nrf-rs:master Feb 21, 2024
4 checks passed
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.

None yet

2 participants