Replace gen-intr-lut.sh sed hack with svdtools
svdtools comes with a command to list all interrupts
from an SVD file. Use this instead of fragile sed magic
which parses the generated rust code.
interrupts: Fix sed expressions for parsing interrupt list
The format for the interrupt sources changed which silently made
gen-intr-lut.sh no longer generate any interrupt names. Fix the
expressions so interrupt names are recognized again and the macro
can be used for generating interrupt definitions again.
Signed-off-by: Rahix <rahix@rahix.de>
gen-intr-lut: Switch to /usr/bin/env bash as interpreter
The location of the `bash` binary can vary between systems. Switch to
`/usr/bin/env bash` which is the recommended way to do it.
Ref: PR #22
Signed-off-by: Rahix <rahix@rahix.de>
Implement interrupts
This commit adds a new feature-flag `rt` which, when enabled, adds the
`#[interrupt]` procedural macro to define an interrupt handler. Unlike
the implementation in cortex-m, this version needs an attribute which is
the name of the chip the interrupt is for. In code, an interrupt
handler might look like this:
#![feature(abi_avr_interrupt)]
#[avr_device::interrupt(atmega32u4)]
fn INT6() {
// Do Something
}
Closes #1.
Signed-off-by: Rahix <rahix@rahix.de>