Skip to content

Commit 05414ab

Browse files
reed-smoutRahix
authored andcommitted
Add basic support for ATmega4808
1 parent 9008362 commit 05414ab

File tree

7 files changed

+5639
-3
lines changed

7 files changed

+5639
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ atmega8u2 = ["device-selected"]
3636
atmega324pa = ["device-selected"]
3737
atmega328p = ["device-selected"]
3838
atmega328pb = ["device-selected"]
39+
atmega4808 = ["device-selected"]
3940
atmega4809 = ["device-selected"]
4041
atmega48p = ["device-selected"]
4142
atmega32a = ["device-selected"]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
all: deps chips
22

3-
CHIPS := at90usb1286 atmega1280 atmega1284p atmega128a atmega128rfa1 atmega164pa atmega168 atmega2560 atmega8 atmega8u2 atmega324pa atmega328p atmega328pb atmega32a atmega32u4 atmega4809 atmega48p atmega64 atmega644 atmega88p attiny13a attiny202 attiny2313 attiny2313a attiny404 attiny84 attiny85 attiny88 attiny816 attiny828 attiny841 attiny861 attiny167 attiny1614
3+
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 attiny404 attiny84 attiny85 attiny88 attiny816 attiny828 attiny841 attiny861 attiny167 attiny1614
44

55
RUSTUP_TOOLCHAIN ?= nightly
66

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Via the feature you can select which chip you want the register specifications f
1414

1515
| ATmega | ATmega USB | ATmega 0,1 Series | AT90 | ATtiny |
1616
| :-------------: | :----------: | :---------------: | :-----------: | :-----------: |
17-
| `atmega8` | `atmega8u2` | `atmega4809` | `at90usb1286` | `attiny13a` |
18-
| `atmega48p` | `atmega32u4` | | | `attiny167` |
17+
| `atmega8` | `atmega8u2` | `atmega4808` | `at90usb1286` | `attiny13a` |
18+
| `atmega48p` | `atmega32u4` | `atmega4809` | | `attiny167` |
1919
| `atmega64` | | | | `attiny202` |
2020
| `atmega644` | | | | `attiny84` |
2121
| `atmega88p` | | | | `attiny85` |

patch/atmega4808.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_svd: ../svd/atmega4808.svd

src/devices/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ pub mod atmega32a;
5555
#[cfg(feature = "atmega32u4")]
5656
pub mod atmega32u4;
5757

58+
/// [ATmega4808](https://www.microchip.com/wwwproducts/en/ATmega4808)
59+
#[cfg(feature = "atmega4808")]
60+
pub mod atmega4808;
61+
5862
/// [ATmega4809](https://www.microchip.com/wwwproducts/en/ATmega4809)
5963
#[cfg(feature = "atmega4809")]
6064
pub mod atmega4809;

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#![cfg_attr(feature = "atmega328pb", doc = "**atmega328pb**,")]
1616
#![cfg_attr(feature = "atmega32a", doc = "**atmega32a**,")]
1717
#![cfg_attr(feature = "atmega32u4", doc = "**atmega32u4**,")]
18+
#![cfg_attr(feature = "atmega4808", doc = "**atmega4808**,")]
1819
#![cfg_attr(feature = "atmega4809", doc = "**atmega4809**,")]
1920
#![cfg_attr(feature = "atmega48p", doc = "**atmega48p**,")]
2021
#![cfg_attr(feature = "atmega64", doc = "**atmega64**,")]
@@ -56,6 +57,7 @@
5657
//! `atmega328pb`,
5758
//! `atmega32a`
5859
//! `atmega32u4`,
60+
//! `atmega4808`,
5961
//! `atmega4809`,
6062
//! `atmega48p`,
6163
//! `atmega64`,
@@ -209,6 +211,7 @@ compile_error!(
209211
* atmega328pb
210212
* atmega32a
211213
* atmega32u4
214+
* atmega4808
212215
* atmega4809
213216
* atmega48p
214217
* atmega64
@@ -260,6 +263,8 @@ pub use crate::devices::atmega328pb;
260263
pub use crate::devices::atmega32a;
261264
#[cfg(feature = "atmega32u4")]
262265
pub use crate::devices::atmega32u4;
266+
#[cfg(feature = "atmega4808")]
267+
pub use crate::devices::atmega4808;
263268
#[cfg(feature = "atmega4809")]
264269
pub use crate::devices::atmega4809;
265270
#[cfg(feature = "atmega48p")]

0 commit comments

Comments
 (0)