Skip to content

Commit

Permalink
Finalise the remaining USART's (turns out I was right at the end). In…
Browse files Browse the repository at this point in the history
…cludes rejig of pin layouts between boards.
  • Loading branch information
CoolSlimbo committed Jun 24, 2024
1 parent b88cf04 commit d9bfd46
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions mcu/atmega-hal/src/usart_spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//! | `atmega1284p` | 2 | Yes |
//! | `atmega8` | 1 | No |
// Supress warning because it doesn't recognise us usign it in macros properly.
// Supress warning because it doesn't recognise us using it in macros properly.
#[allow(unused_imports)]
use crate::port;

Expand Down Expand Up @@ -69,8 +69,6 @@ avr_hal_generic::add_usart_spi! {
feature = "atmega168",
feature = "atmega328p",
feature = "atmega328pb",
feature = "atmega1284p",
feature = "atmega164pa",
feature = "atmega48p"
))]
avr_hal_generic::add_usart_spi! {
Expand All @@ -82,3 +80,25 @@ avr_hal_generic::add_usart_spi! {
miso: port::PD0,
cs: port::Dynamic,
}

#[cfg(any(feature = "atmega1284p", feature = "atmega164pa",))]
avr_hal_generic::add_usart_spi! {
hal: crate::Atmega,
peripheral: crate::pac::USART0,
register_suffix: 0,
sclk: port::PB0,
mosi: port::PD1,
miso: port::PD0,
cs: port::Dynamic,
}

#[cfg(any(feature = "atmega1284p", feature = "atmega164pa",))]
avr_hal_generic::add_usart_spi! {
hal: crate::Atmega,
peripheral: crate::pac::USART1,
register_suffix: 1,
sclk: port::PD4,
mosi: port::PD3,
miso: port::PD2,
cs: port::Dynamic,
}

0 comments on commit d9bfd46

Please sign in to comment.