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

fix atmel-samd DAC channel selection logic #3966

Merged
merged 2 commits into from
Jan 12, 2021

Conversation

dhalbert
Copy link
Collaborator

Fixes #3962 (@dglaude).

  • Pin channel if statements tested opposite condition.
  • PA05 check not guarded by SAMx5 check.

Rewrote as a switch statement.

Tested on SAMD21 and SAMD51.

@dhalbert dhalbert requested a review from jepler January 11, 2021 00:26
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

One nit that the original code had. Switch is easier to read. Thanks!

ports/atmel-samd/common-hal/analogio/AnalogOut.c Outdated Show resolved Hide resolved
whoops, yes!

Co-authored-by: Scott Shawcroft <scott@tannewt.org>
@dhalbert dhalbert requested a review from tannewt January 12, 2021 00:13
@dhalbert dhalbert merged commit 4be5e91 into adafruit:main Jan 12, 2021
@dhalbert dhalbert deleted the samd-dac-channels branch January 12, 2021 18:01
@dhalbert
Copy link
Collaborator Author

Some bad builds: some just network trouble, others are too big. Will fix later. Merging now.

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.

analogio refuse to change the value
2 participants