Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Correct NO_TIMER index value for SAMD21. #678

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
Mar 14, 2018

Conversation

tannewt
Copy link
Member

@tannewt tannewt commented Mar 13, 2018

We check validity by ensuring it's lower than the total number of
timers. 0 is a terrible number for the NO_TIMER value because its
valid even though it shouldn't be.

Fixes adafruit/Adafruit_CircuitPython_SimpleIO#29

We check validity by ensuring it's lower than the total number of
timers. 0 is a terrible number for the NO_TIMER value because its
valid even though it shouldn't be.

Fixes adafruit/Adafruit_CircuitPython_SimpleIO#29
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

OK!

NO_SERCOM is (0,0,0), which seems like a bad idea also. (Maybe it works by accident). Also, there is NO_ADC_INPUT, which isn't used. These are in both samd21_pins.h and samd51_pins.h. Maybe fix these too?

@dhalbert
Copy link
Collaborator

Well... NO_SERCOM isn't used except as a placeholder. No other code checks for those values.

enough.

This saves 380 bytes on the Arduino Zero build. (More pins ==
more savings.)
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

Excellent!

@dhalbert dhalbert merged commit f173d45 into adafruit:master Mar 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants