Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

atmega-hal: Add support for ATmega8U2 v2 #568

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Duplicate code for atmega8
supersimple33 committed Jul 24, 2024
commit 892328ba43c5faf1c8a5b04cc079ea0625682e08
11 changes: 1 addition & 10 deletions mcu/atmega-hal/src/port.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pub use avr_hal_generic::port::{mode, PinMode, PinOps};

#[cfg(any(feature = "atmega48p", feature = "atmega168", feature = "atmega328p"))]
#[cfg(any(feature = "atmega48p", feature = "atmega168", feature = "atmega328p", feature="atmega8"))]
avr_hal_generic::impl_port_traditional! {
enum Ports {
B: crate::pac::PORTB = [0, 1, 2, 3, 4, 5, 6, 7],
@@ -114,12 +114,3 @@ avr_hal_generic::impl_port_traditional! {
D: crate::pac::PORTD = [0, 1, 2, 3, 4, 5, 6, 7],
}
}

#[cfg(any(feature = "atmega8"))]
avr_hal_generic::impl_port_traditional! {
enum Ports {
B: crate::pac::PORTB = [0, 1, 2, 3, 4, 5, 6, 7],
C: crate::pac::PORTC = [0, 1, 2, 3, 4, 5, 6],
D: crate::pac::PORTD = [0, 1, 2, 3, 4, 5, 6, 7],
}
}