Skip to content

Commit

Permalink
style: rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez committed Sep 6, 2024
1 parent 2fabc78 commit a9a404c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 2 additions & 4 deletions esp-hal/src/twai/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -954,8 +954,7 @@ where
baud_rate: BaudRate,
mode: TwaiMode,
) -> Self {
let mut this =
Self::new_internal(peripheral, rx_pin, tx_pin, baud_rate, false, mode);
let mut this = Self::new_internal(peripheral, rx_pin, tx_pin, baud_rate, false, mode);
this.internal_set_interrupt_handler(T::async_handler());
this
}
Expand All @@ -972,8 +971,7 @@ where
baud_rate: BaudRate,
mode: TwaiMode,
) -> Self {
let mut this =
Self::new_internal(peripheral, rx_pin, tx_pin, baud_rate, true, mode);
let mut this = Self::new_internal(peripheral, rx_pin, tx_pin, baud_rate, true, mode);
this.internal_set_interrupt_handler(T::async_handler());
this
}
Expand Down
10 changes: 5 additions & 5 deletions esp-hal/src/uart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
//! ).unwrap();
//! # }
//! ```
//!
//!
//! The UART controller can be configured to invert the polarity of the pins.
//! This is achieved by inverting the desired pins, and then constructing the
//! UART instance using the inverted pins.
Expand Down Expand Up @@ -68,7 +68,7 @@
//! uart1.write_bytes(b"Hello, world!").expect("write error!");
//! # }
//! ```
//!
//!
//! ### Splitting the UART into RX and TX Components
//! ```rust, no_run
#![doc = crate::before_snippet!()]
Expand All @@ -89,7 +89,7 @@
//! let byte = rx.read_byte().expect("read error!");
//! # }
//! ```
//!
//!
//! ### Inverting RX and TX Pins
//! ```rust, no_run
#![doc = crate::before_snippet!()]
Expand All @@ -107,7 +107,7 @@
//! ).unwrap();
//! # }
//! ```
//!
//!
//! ### Constructing RX and TX Components
//! ```rust, no_run
#![doc = crate::before_snippet!()]
Expand All @@ -120,7 +120,7 @@
//! let rx = UartRx::new(peripherals.UART1, io.pins.gpio2).unwrap();
//! # }
//! ```
//!
//!
//! [embedded-hal]: https://docs.rs/embedded-hal/latest/embedded_hal/
//! [embedded-io]: https://docs.rs/embedded-io/latest/embedded_io/
//! [embedded-hal-async]: https://docs.rs/embedded-hal-async/latest/embedded_hal_async/
Expand Down

0 comments on commit a9a404c

Please sign in to comment.