Did run cargo +nighly fmt to solve formatting issues

This commit is contained in:
anton smeenk 2024-08-06 12:04:17 +02:00
parent f6d91caf0f
commit 3f4a552f2e
4 changed files with 11 additions and 11 deletions

View File

@ -11,10 +11,10 @@ use core::cell::RefCell;
use core::future::Future; use core::future::Future;
use core::iter; use core::iter;
use core::marker::PhantomData; use core::marker::PhantomData;
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
use embassy_sync::blocking_mutex::Mutex;
use embassy_hal_internal::{Peripheral, PeripheralRef}; use embassy_hal_internal::{Peripheral, PeripheralRef};
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
use embassy_sync::blocking_mutex::Mutex;
use embassy_sync::channel::Channel; use embassy_sync::channel::Channel;
use embassy_sync::waitqueue::AtomicWaker; use embassy_sync::waitqueue::AtomicWaker;
#[cfg(feature = "time")] #[cfg(feature = "time")]
@ -54,7 +54,7 @@ pub enum Error {
NoTransaction, NoTransaction,
} }
/// Address 2 can be masked, so it will respond to a wider range of addresses. /// Address 2 can be masked, so it will respond to a wider range of addresses.
#[repr(u8)] #[repr(u8)]
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
pub enum Address2Mask { pub enum Address2Mask {

View File

@ -1,12 +1,12 @@
use core::result::Result; use core::result::Result;
use crate::i2c::Error; use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
use crate::mode::Mode; use embassy_sync::channel::Receiver;
use embassy_sync::{blocking_mutex::raw::CriticalSectionRawMutex, channel::Receiver};
use stm32_metapac::i2c; use stm32_metapac::i2c;
use super::{AddressIndex, I2c, Instance}; use super::{AddressIndex, I2c, Instance};
use crate::i2c::Dir; use crate::i2c::{Dir, Error};
use crate::mode::Mode;
/// buffer used for the transactions /// buffer used for the transactions
pub type I2cBuffer = [u8; SLAVE_BUFFER_SIZE]; pub type I2cBuffer = [u8; SLAVE_BUFFER_SIZE];

View File

@ -1,9 +1,9 @@
#![no_std] #![no_std]
#![no_main] #![no_main]
use core::fmt;
use core::fmt::Write; use core::fmt::Write;
use core::str; use core::{fmt, str};
use defmt::info; use defmt::info;
use embassy_executor::Spawner; use embassy_executor::Spawner;
use embassy_stm32::gpio::{Level, Output, Speed}; use embassy_stm32::gpio::{Level, Output, Speed};

View File

@ -3,9 +3,9 @@
// test is targeted for nucleo-g070RB board // test is targeted for nucleo-g070RB board
use core::fmt;
use core::fmt::Write; use core::fmt::Write;
use core::str; use core::{fmt, str};
use defmt::info; use defmt::info;
use embassy_executor::Spawner; use embassy_executor::Spawner;
use embassy_stm32::gpio::{Level, Output, Speed}; use embassy_stm32::gpio::{Level, Output, Speed};