Skip to content

Commit

Permalink
Add ATmega3208 and ATmega3209
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharytomlinson authored and Rahix committed Jan 4, 2025
1 parent 066a428 commit a23bdab
Show file tree
Hide file tree
Showing 12 changed files with 5,018 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ atmega8u2 = ["device-selected"]
atmega324pa = ["device-selected"]
atmega328p = ["device-selected"]
atmega328pb = ["device-selected"]
atmega3208 = ["device-selected"]
atmega3209 = ["device-selected"]
atmega4808 = ["device-selected"]
atmega4809 = ["device-selected"]
atmega48p = ["device-selected"]
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
all: deps chips

CHIPS := at90usb1286 atmega1280 atmega1284p atmega128a atmega128rfa1 atmega16 atmega164pa atmega168 atmega16u2 atmega2560 atmega8 atmega8u2 atmega324pa atmega328p atmega328pb atmega32a atmega32u2 atmega32u4 atmega4808 atmega4809 atmega48p atmega64 atmega644 atmega88p attiny13a attiny202 attiny212 attiny214 attiny2313 attiny2313a attiny26 attiny402 attiny404 attiny412 attiny414 attiny416 attiny44a attiny84 attiny85 attiny88 attiny816 attiny828 attiny841 attiny84a attiny861 attiny167 attiny1614 avr64du32 avr64du28
CHIPS := at90usb1286 atmega1280 atmega1284p atmega128a atmega128rfa1 atmega16 atmega164pa atmega168 atmega16u2 atmega2560 atmega8 atmega8u2 atmega324pa atmega328p atmega328pb atmega32a atmega32u2 atmega32u4 atmega3208 atmega3209 atmega4808 atmega4809 atmega48p atmega64 atmega644 atmega88p attiny13a attiny202 attiny212 attiny214 attiny2313 attiny2313a attiny26 attiny402 attiny404 attiny412 attiny414 attiny416 attiny44a attiny84 attiny85 attiny88 attiny816 attiny828 attiny841 attiny84a attiny861 attiny167 attiny1614 avr64du32 avr64du28

RUSTUP_TOOLCHAIN ?= nightly

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Via the feature you can select which chip you want the register specifications f

| ATmega | ATmega USB | ATmega 0,1 Series | AT90 | ATtiny |
| :-------------: | :----------: | :---------------: | :-----------: | :-----------: |
| `atmega8` | `atmega8u2` | `atmega4808` | `at90usb1286` | `attiny13a` |
| `atmega48p` | `atmega16u2` | `atmega4809` | | `attiny167` |
| `atmega64` | `atmega32u2` | | | `attiny202` |
| `atmega644` | `atmega32u4` | | | `attiny212` |
| `atmega8` | `atmega8u2` | `atmega3208` | `at90usb1286` | `attiny13a` |
| `atmega48p` | `atmega16u2` | `atmega3209` | | `attiny167` |
| `atmega64` | `atmega32u2` | `atmega4808` | | `attiny202` |
| `atmega644` | `atmega32u4` | `atmega4809` | | `attiny212` |
| `atmega88p` | `avr64du32` | | | `attiny214` |
| `atmega16` | `avr64du28` | | | `attiny402` |
| `atmega168` | | | | `attiny404` |
Expand Down
4 changes: 4 additions & 0 deletions patch/atmega3208.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
_svd: ../svd/atmega3208.svd

_include:
- "common/mega0/port.yaml"
4 changes: 4 additions & 0 deletions patch/atmega3209.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
_svd: ../svd/atmega3209.svd

_include:
- "common/mega0/port.yaml"
3 changes: 3 additions & 0 deletions patch/atmega4808.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
_svd: ../svd/atmega4808.svd

_include:
- "common/mega0/port.yaml"
3 changes: 3 additions & 0 deletions patch/atmega4809.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
_svd: ../svd/atmega4809.svd

_include:
- "common/mega0/port.yaml"
107 changes: 107 additions & 0 deletions patch/common/mega0/port.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
PORTC:
_delete:
OUTSET:
_add:
OUTSET:
description: Output Value Set
addressOffset: 0x5
size: 0x8
access: read-write
fields:
PC0:
description: Pin C0
bitRange: "[0:0]"
access: read-write
PC1:
description: Pin C1
bitRange: "[1:1]"
access: read-write
PC2:
description: Pin C2
bitRange: "[2:2]"
access: read-write
PC3:
description: Pin C3
bitRange: "[3:3]"
access: read-write
PORTD:
_delete:
OUTSET:
_add:
OUTSET:
description: Output Value Set
addressOffset: 0x5
size: 0x8
access: read-write
fields:
PD0:
description: Pin D0
bitRange: "[0:0]"
access: read-write
PD1:
description: Pin D1
bitRange: "[1:1]"
access: read-write
PD2:
description: Pin D2
bitRange: "[2:2]"
access: read-write
PD3:
description: Pin D3
bitRange: "[3:3]"
access: read-write
PD4:
description: Pin D4
bitRange: "[4:4]"
access: read-write
PD5:
description: Pin D5
bitRange: "[5:5]"
access: read-write
PD6:
description: Pin D6
bitRange: "[6:6]"
access: read-write
PD7:
description: Pin D7
bitRange: "[7:7]"
access: read-write

PORTF:
_delete:
OUTSET:
_add:
OUTSET:
description: Output Value Set
addressOffset: 0x5
size: 0x8
access: read-write
fields:
PF0:
description: Pin F0
bitRange: "[0:0]"
access: read-write
PF1:
description: Pin F1
bitRange: "[1:1]"
access: read-write
PF2:
description: Pin F2
bitRange: "[2:2]"
access: read-write
PF3:
description: Pin F3
bitRange: "[3:3]"
access: read-write
PF4:
description: Pin F4
bitRange: "[4:4]"
access: read-write
PF5:
description: Pin F5
bitRange: "[5:5]"
access: read-write
PF6:
description: Pin F6
bitRange: "[6:6]"
access: read-write
8 changes: 8 additions & 0 deletions src/devices/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ pub mod atmega32u2;
#[cfg(feature = "atmega32u4")]
pub mod atmega32u4;

/// [ATmega3208](https://www.microchip.com/wwwproducts/en/ATmega3208)
#[cfg(feature = "atmega3208")]
pub mod atmega3208;

/// [ATmega3209](https://www.microchip.com/wwwproducts/en/ATmega3209)
#[cfg(feature = "atmega3209")]
pub mod atmega3209;

/// [ATmega4808](https://www.microchip.com/wwwproducts/en/ATmega4808)
#[cfg(feature = "atmega4808")]
pub mod atmega4808;
Expand Down
10 changes: 10 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#![cfg_attr(feature = "atmega32a", doc = "**atmega32a**,")]
#![cfg_attr(feature = "atmega32u2", doc = "**atmega32u2**,")]
#![cfg_attr(feature = "atmega32u4", doc = "**atmega32u4**,")]
#![cfg_attr(feature = "atmega3208", doc = "**atmega3208**,")]
#![cfg_attr(feature = "atmega3209", doc = "**atmega3209**,")]
#![cfg_attr(feature = "atmega4808", doc = "**atmega4808**,")]
#![cfg_attr(feature = "atmega4809", doc = "**atmega4809**,")]
#![cfg_attr(feature = "atmega48p", doc = "**atmega48p**,")]
Expand Down Expand Up @@ -75,6 +77,8 @@
//! `atmega32a`
//! `atmega32u2`,
//! `atmega32u4`,
//! `atmega3208`,
//! `atmega3209`,
//! `atmega4808`,
//! `atmega4809`,
//! `atmega48p`,
Expand Down Expand Up @@ -244,6 +248,8 @@ compile_error!(
* atmega32a
* atmega32u2
* atmega32u4
* atmega3208
* atmega3209
* atmega4808
* atmega4809
* atmega48p
Expand Down Expand Up @@ -314,6 +320,10 @@ pub use crate::devices::atmega32a;
pub use crate::devices::atmega32u2;
#[cfg(feature = "atmega32u4")]
pub use crate::devices::atmega32u4;
#[cfg(feature = "atmega3208")]
pub use crate::devices::atmega3208;
#[cfg(feature = "atmega3209")]
pub use crate::devices::atmega3209;
#[cfg(feature = "atmega4808")]
pub use crate::devices::atmega4808;
#[cfg(feature = "atmega4809")]
Expand Down
Loading

0 comments on commit a23bdab

Please sign in to comment.