From 325e8ef5ddb4e97c0b3e5a3bf5ec6f81355342c0 Mon Sep 17 00:00:00 2001 From: Michael Darr Date: Wed, 29 Nov 2023 12:38:06 -0800 Subject: [PATCH] Add basic support for ATtiny84A Signed-off-by: Michael Darr --- Cargo.toml | 1 + Makefile | 2 +- README.md | 9 +- patch/attiny84a.yaml | 1 + src/devices/mod.rs | 4 + src/lib.rs | 5 + vendor/attiny84a.atdf | 814 ++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 831 insertions(+), 5 deletions(-) create mode 100644 patch/attiny84a.yaml create mode 100644 vendor/attiny84a.atdf diff --git a/Cargo.toml b/Cargo.toml index ebac426..5af46ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,6 +56,7 @@ attiny816 = ["device-selected"] attiny828 = ["device-selected"] attiny84 = ["device-selected"] attiny841 = ["device-selected"] +attiny84a = ["device-selected"] attiny85 = ["device-selected"] attiny861 = ["device-selected"] attiny88 = ["device-selected"] diff --git a/Makefile b/Makefile index 5c76340..2d40ab4 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ all: deps chips -CHIPS := at90usb1286 atmega1280 atmega1284p atmega128a atmega128rfa1 atmega164pa atmega168 atmega2560 atmega8 atmega8u2 atmega324pa atmega328p atmega328pb atmega32a atmega32u4 atmega4808 atmega4809 atmega48p atmega64 atmega644 atmega88p attiny13a attiny202 attiny2313 attiny2313a attiny402 attiny404 attiny44a attiny84 attiny85 attiny88 attiny816 attiny828 attiny841 attiny861 attiny167 attiny1614 +CHIPS := at90usb1286 atmega1280 atmega1284p atmega128a atmega128rfa1 atmega164pa atmega168 atmega2560 atmega8 atmega8u2 atmega324pa atmega328p atmega328pb atmega32a atmega32u4 atmega4808 atmega4809 atmega48p atmega64 atmega644 atmega88p attiny13a attiny202 attiny2313 attiny2313a attiny402 attiny404 attiny44a attiny84 attiny85 attiny88 attiny816 attiny828 attiny841 attiny84a attiny861 attiny167 attiny1614 RUSTUP_TOOLCHAIN ?= nightly diff --git a/README.md b/README.md index 6d73e49..d5de559 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,11 @@ Via the feature you can select which chip you want the register specifications f | `atmega32a` | | | | `attiny816` | | `atmega1280` | | | | `attiny828` | | `atmega1284p` | | | | `attiny841` | -| `atmega128a` | | | | `attiny861` | -| `atmega128rfa1` | | | | `attiny1614` | -| `atmega2560` | | | | `attiny2313` | -| `atmega164pa` | | | | `attiny2313a` | +| `atmega128a` | | | | `attiny84a` | +| `atmega128rfa1` | | | | `attiny861` | +| `atmega2560` | | | | `attiny1614` | +| `atmega164pa` | | | | `attiny2313` | +| | | | | `attiny2313a` | ## Build Instructions The version on `crates.io` is pre-built. The following is only necessary when trying to build this crate from source. diff --git a/patch/attiny84a.yaml b/patch/attiny84a.yaml new file mode 100644 index 0000000..11e2d95 --- /dev/null +++ b/patch/attiny84a.yaml @@ -0,0 +1 @@ +_svd: ../svd/attiny84a.svd diff --git a/src/devices/mod.rs b/src/devices/mod.rs index 0de1a15..fcfdcaf 100644 --- a/src/devices/mod.rs +++ b/src/devices/mod.rs @@ -135,6 +135,10 @@ pub mod attiny84; #[cfg(feature = "attiny841")] pub mod attiny841; +/// [ATtiny84a](https://www.microchip.com/en-us/product/ATtiny84a) +#[cfg(feature = "attiny84a")] +pub mod attiny84a; + /// [ATtiny85](https://www.microchip.com/wwwproducts/en/ATtiny85) #[cfg(feature = "attiny85")] pub mod attiny85; diff --git a/src/lib.rs b/src/lib.rs index 1666db8..a264b9a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,6 +33,7 @@ #![cfg_attr(feature = "attiny828", doc = "**attiny828**,")] #![cfg_attr(feature = "attiny84", doc = "**attiny84**,")] #![cfg_attr(feature = "attiny841", doc = "**attiny841**,")] +#![cfg_attr(feature = "attiny84a", doc = "**attiny84a**,")] #![cfg_attr(feature = "attiny85", doc = "**attiny85**,")] #![cfg_attr(feature = "attiny861", doc = "**attiny861**,")] #![cfg_attr(feature = "attiny88", doc = "**attiny88**,")] @@ -77,6 +78,7 @@ //! `attiny828`, //! `attiny84`, //! `attiny841`, +//! `attiny84a`, //! `attiny85`, //! `attiny861`, //! `attiny88`, @@ -234,6 +236,7 @@ compile_error!( * attiny828 * attiny84 * attiny841 + * attiny84a * attiny85 * attiny861 * attiny88 @@ -309,6 +312,8 @@ pub use crate::devices::attiny828; pub use crate::devices::attiny84; #[cfg(feature = "attiny841")] pub use crate::devices::attiny841; +#[cfg(feature = "attiny84a")] +pub use crate::devices::attiny84a; #[cfg(feature = "attiny85")] pub use crate::devices::attiny85; #[cfg(feature = "attiny861")] diff --git a/vendor/attiny84a.atdf b/vendor/attiny84a.atdf new file mode 100644 index 0000000..5995cbf --- /dev/null +++ b/vendor/attiny84a.atdf @@ -0,0 +1,814 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +