-
Notifications
You must be signed in to change notification settings - Fork 223
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
External interrupts for mega2560 #393
Comments
Looking at the code, datasheet and attachInterrupt, I found this works: dp.EXINT.eicrb.modify(|_, w| w.isc4().bits(INT_CHANGE));
dp.EXINT.eicrb.modify(|_, w| w.isc5().bits(INT_CHANGE));
dp.EXINT.eimsk.modify(|_, w| w.int().bits(1<<4 | 1<<5)); And I also renamed the functions |
Just want to post that I'm having the same problem. I'm surprised you closed this issue. |
@Tellurian-Ul can you elaborate on the issue a bit? Is the problem that the generated field accessors in |
And for reference, it seems we are patching EIMSK for ATmega328P: |
The following code works for Atmega328:
However it does not compile for Atmega2560:
I don't see any difference regarding EIMSK or INT0 between the 328's and 2560's atdf files so I don't understand.
It compiles when the eimsk lines are commented.
According to Arduino documentation, Uno and Mega2560 use the same pins for INT0 and INT1. Except this:
System info
ArchLinux.
uname -a
->Linux 5.15.87-1-lts #1 SMP Thu, 12 Jan 2023 15:51:39 +0000 x86_64 GNU/Linux
channel = "nightly-2022-10-22"
Using the provided JSON AVR specs.
The text was updated successfully, but these errors were encountered: