Skip to content

Commit

Permalink
treewide: Rename avr_hal_generic::serial to ::usart
Browse files Browse the repository at this point in the history
The `avr_hal_generic::serial` module only really deals with USART and is
called `usart` in all other crates so rename it to `usart` here as well.

Signed-off-by: Rahix <rahix@rahix.de>
  • Loading branch information
Rahix committed Nov 10, 2020
1 parent 690b13d commit 4935465
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion avr-hal-generic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub extern crate avr_device;
pub mod clock;
pub mod delay;
pub mod port;
pub mod serial;
pub mod usart;
pub mod i2c;
pub mod spi;
pub mod adc;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion boards/arduino-mega2560/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub type Delay = crate::hal::delay::Delay<hal::clock::MHz16>;
pub type Serial<IMODE> = crate::usart::Usart0<IMODE>;

pub mod usart {
pub use avr_hal_generic::serial::*;
pub use avr_hal_generic::usart::*;

pub type Usart0<IMODE> = crate::hal::usart::Usart0<crate::hal::clock::MHz16, IMODE>;
pub type Usart1<IMODE> = crate::hal::usart::Usart1<crate::hal::clock::MHz16, IMODE>;
Expand Down
2 changes: 1 addition & 1 deletion chips/atmega1280-hal/src/usart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::port::porte;
use crate::port::portd;
use crate::port::porth;
use crate::port::portj;
pub use avr_hal_generic::serial::*;
pub use avr_hal_generic::usart::*;

avr_hal_generic::impl_usart! {
pub struct Usart0 {
Expand Down
2 changes: 1 addition & 1 deletion chips/atmega168-hal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub mod spi {
/// Serial interface using USART
pub mod usart {
use crate::port::portd;
pub use avr_hal_generic::serial::*;
pub use avr_hal_generic::usart::*;

avr_hal_generic::impl_usart! {
/// Serial interface based on ATmega168's USART0 peripheral
Expand Down
2 changes: 1 addition & 1 deletion chips/atmega2560-hal/src/usart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::port::porte;
use crate::port::portd;
use crate::port::porth;
use crate::port::portj;
pub use avr_hal_generic::serial::*;
pub use avr_hal_generic::usart::*;

avr_hal_generic::impl_usart! {
pub struct Usart0 {
Expand Down
2 changes: 1 addition & 1 deletion chips/atmega328p-hal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ pub mod spi {
pub mod usart {
#[allow(unused_imports)]
use crate::port::{portb, portd};
pub use avr_hal_generic::serial::*;
pub use avr_hal_generic::usart::*;

avr_hal_generic::impl_usart! {
/// Serial interface based on ATmega328P's USART0 peripheral
Expand Down
2 changes: 1 addition & 1 deletion chips/atmega32u4-hal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub mod spi {
/// Serial interface using USART
pub mod usart {
use crate::port::portd;
pub use avr_hal_generic::serial::*;
pub use avr_hal_generic::usart::*;

avr_hal_generic::impl_usart! {
/// Serial interface based on ATmega32U4's USART1 peripheral
Expand Down
2 changes: 1 addition & 1 deletion chips/atmega48p-hal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub mod i2c {
/// Serial interface using USART
pub mod usart {
use crate::port::portd;
pub use avr_hal_generic::serial::*;
pub use avr_hal_generic::usart::*;

avr_hal_generic::impl_usart! {
/// Serial interface based on ATmega48P's USART0 peripheral
Expand Down

0 comments on commit 4935465

Please sign in to comment.