mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-26 00:32:33 +00:00
rustfmt on previously edited files
This commit is contained in:
parent
53388d4576
commit
e4a36e1d98
@ -74,7 +74,6 @@ impl<'d, T: Pin> Flex<'d, T> {
|
||||
/// at a specific level, call `set_high`/`set_low` on the pin first.
|
||||
#[inline]
|
||||
pub fn set_as_output(&mut self, speed: Speed) {
|
||||
|
||||
critical_section::with(|_| unsafe {
|
||||
let r = self.pin.block();
|
||||
let n = self.pin.pin() as usize;
|
||||
@ -262,7 +261,7 @@ impl From<Speed> for vals::Ospeedr {
|
||||
|
||||
/// GPIO input driver.
|
||||
pub struct Input<'d, T: Pin> {
|
||||
pub(crate) pin: Flex<'d, T>
|
||||
pub(crate) pin: Flex<'d, T>,
|
||||
}
|
||||
|
||||
impl<'d, T: Pin> Input<'d, T> {
|
||||
@ -340,10 +339,9 @@ impl<'d, T: Pin> Output<'d, T> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// GPIO output open-drain driver.
|
||||
pub struct OutputOpenDrain<'d, T: Pin> {
|
||||
pub(crate) pin: Flex<'d, T>
|
||||
pub(crate) pin: Flex<'d, T>,
|
||||
}
|
||||
|
||||
impl<'d, T: Pin> OutputOpenDrain<'d, T> {
|
||||
@ -925,7 +923,6 @@ mod eh1 {
|
||||
Ok(self.is_set_low())
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#[cfg(feature = "unstable-pac")]
|
||||
|
@ -6,7 +6,7 @@
|
||||
mod example_common;
|
||||
use defmt::assert;
|
||||
use embassy::executor::Spawner;
|
||||
use embassy_stm32::gpio::{Input, Level, Output, OutputOpenDrain, Flex, Pull, Speed};
|
||||
use embassy_stm32::gpio::{Flex, Input, Level, Output, OutputOpenDrain, Pull, Speed};
|
||||
use embassy_stm32::Peripherals;
|
||||
use example_common::*;
|
||||
|
||||
@ -143,7 +143,6 @@ async fn main(_spawner: Spawner, p: Peripherals) {
|
||||
assert!(b.is_high());
|
||||
}
|
||||
|
||||
|
||||
// Test input pulldown
|
||||
{
|
||||
let mut b = Flex::new(&mut b);
|
||||
|
Loading…
Reference in New Issue
Block a user