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

avr: pin change interrupt #3841

Merged
merged 1 commit into from
Jul 27, 2023
Merged

Conversation

ysoldak
Copy link
Contributor

@ysoldak ysoldak commented Jul 24, 2023

This adds support for pin change interrupts on AVR, atmega328p chip used by Arduino UNO and Nano boards.
Fixes #3145

This PR is based on work done by @mrbell321 in #3139 (that PR apparently stalled).

Implemented in addition to original PR:

  • Support for de-registering of callbacks (passing nil)
  • Support for PinRising and PinFalling
  • PinInterrupt example for "arduino" target

Verified on Arduino UNO by shorting D2 and GND pins: LED changes on breaking the contact (as expected).

@deadprogram
Copy link
Member

Thank you for the addition @ysoldak now merging.

@deadprogram deadprogram merged commit 00d46bd into tinygo-org:dev Jul 27, 2023
13 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.

2 participants