Add ATtiny202 support
All of the svd patches are in patch/common/attiny-0-series.yaml which should
work for all of the 0-series (but may only work for ATtiny20* and ATtiny40*,
but not 80* or 160* given how the datasheet is split)
Add AT90USB1286 support
Ref: #80
Improve error message when no device is selected
Introduce a new `device-selected` feature to simpilify the logic for
showing an error when no device was selected.
Add attiny84 and atmega644 to `src/lib.rs`
Add attiny841 and attiny861
Add basic support for ATmega4809
Add support for atmega328pb
Add basic support for ATmega644
Add support for the ATtiny84
Add atmega48p device support
Only emit inline-assembly when building for AVR
Make sure that we'll never emit AVR assembly on non-AVR targets.
Instead of failing the build, fail at runtime, to allow a potential
application testsuite to run even if those functions somehow get linked
in.
Signed-off-by: Rahix <rahix@rahix.de>
Add basic support for ATmega168
interrupt: Fix interrupt::free() reading wrong address
The SREG is at IO address 0x3F, not 0x35. Fix interrupt::free() to read
the correct register to make it work as advertised.
Signed-off-by: Rahix <rahix@rahix.de>
interrupt: Make interrupt::enable() unsafe
To bring this crate more in line with cortex-m, mark interrupt::enable()
as unsafe. This also fixes a soundness issue: When the function is
safe, one could call it inside a critical section in entirely safe rust.
This is problematic because lot's of code in critical sections relies on
the fact that interrupts are disabled and it thus can safely perform
non-atomic operations without anything interrupting it.
Signed-off-by: Rahix <rahix@rahix.de>
Add asm module for assembly instructions
Add a new module containing wrapper functions for various assembly
instructions. These functions are marked inline(always) to ensure they
will always just generate the single instruction as expected.
Signed-off-by: Rahix <rahix@rahix.de>
Add support for ATmega2560
Document #[interrupt] and #[entry]
Signed-off-by: Rahix <rahix@rahix.de>