diff options
| author | James Munns <[email protected]> | 2025-12-04 19:19:23 +0100 |
|---|---|---|
| committer | James Munns <[email protected]> | 2025-12-04 19:19:23 +0100 |
| commit | e7e4d0e03f6ccee7a8577058bfccefaf92b2689e (patch) | |
| tree | 21fedd516fc5bd2cc54f893a9ef119ee3d847afd /embassy-mcxa | |
| parent | 6530bcd8bcff9169f39732ba93a612f9262b809e (diff) | |
rustfmt
Diffstat (limited to 'embassy-mcxa')
| -rw-r--r-- | embassy-mcxa/src/adc.rs | 2 | ||||
| -rw-r--r-- | embassy-mcxa/src/clkout.rs | 2 | ||||
| -rw-r--r-- | embassy-mcxa/src/clocks/periph_helpers.rs | 6 | ||||
| -rw-r--r-- | embassy-mcxa/src/i2c/controller.rs | 6 | ||||
| -rw-r--r-- | embassy-mcxa/src/interrupt.rs | 2 | ||||
| -rw-r--r-- | embassy-mcxa/src/lpuart/buffered.rs | 2 | ||||
| -rw-r--r-- | embassy-mcxa/src/lpuart/mod.rs | 6 | ||||
| -rw-r--r-- | embassy-mcxa/src/ostimer.rs | 8 |
8 files changed, 15 insertions, 19 deletions
diff --git a/embassy-mcxa/src/adc.rs b/embassy-mcxa/src/adc.rs index b5ec5983f..7475299ba 100644 --- a/embassy-mcxa/src/adc.rs +++ b/embassy-mcxa/src/adc.rs | |||
| @@ -4,7 +4,7 @@ use core::sync::atomic::{AtomicBool, Ordering}; | |||
| 4 | use embassy_hal_internal::{Peri, PeripheralType}; | 4 | use embassy_hal_internal::{Peri, PeripheralType}; |
| 5 | 5 | ||
| 6 | use crate::clocks::periph_helpers::{AdcClockSel, AdcConfig, Div4}; | 6 | use crate::clocks::periph_helpers::{AdcClockSel, AdcConfig, Div4}; |
| 7 | use crate::clocks::{enable_and_reset, Gate, PoweredClock}; | 7 | use crate::clocks::{Gate, PoweredClock, enable_and_reset}; |
| 8 | use crate::pac; | 8 | use crate::pac; |
| 9 | use crate::pac::adc1::cfg::{HptExdi, Pwrsel, Refsel, Tcmdres, Tprictrl, Tres}; | 9 | use crate::pac::adc1::cfg::{HptExdi, Pwrsel, Refsel, Tcmdres, Tprictrl, Tres}; |
| 10 | use crate::pac::adc1::cmdh1::{Avgs, Cmpen, Next, Sts}; | 10 | use crate::pac::adc1::cmdh1::{Avgs, Cmpen, Next, Sts}; |
diff --git a/embassy-mcxa/src/clkout.rs b/embassy-mcxa/src/clkout.rs index 88c731df1..5b21f24b0 100644 --- a/embassy-mcxa/src/clkout.rs +++ b/embassy-mcxa/src/clkout.rs | |||
| @@ -9,7 +9,7 @@ use core::marker::PhantomData; | |||
| 9 | use embassy_hal_internal::Peri; | 9 | use embassy_hal_internal::Peri; |
| 10 | 10 | ||
| 11 | pub use crate::clocks::periph_helpers::Div4; | 11 | pub use crate::clocks::periph_helpers::Div4; |
| 12 | use crate::clocks::{with_clocks, ClockError, PoweredClock}; | 12 | use crate::clocks::{ClockError, PoweredClock, with_clocks}; |
| 13 | use crate::pac::mrcc0::mrcc_clkout_clksel::Mux; | 13 | use crate::pac::mrcc0::mrcc_clkout_clksel::Mux; |
| 14 | use crate::peripherals::CLKOUT; | 14 | use crate::peripherals::CLKOUT; |
| 15 | 15 | ||
diff --git a/embassy-mcxa/src/clocks/periph_helpers.rs b/embassy-mcxa/src/clocks/periph_helpers.rs index 1ea7a99ed..fed5e558e 100644 --- a/embassy-mcxa/src/clocks/periph_helpers.rs +++ b/embassy-mcxa/src/clocks/periph_helpers.rs | |||
| @@ -108,11 +108,7 @@ impl Div4 { | |||
| 108 | /// by 1, and `Div4::from_raw(15)` will divide the source by | 108 | /// by 1, and `Div4::from_raw(15)` will divide the source by |
| 109 | /// 16. | 109 | /// 16. |
| 110 | pub const fn from_raw(n: u8) -> Option<Self> { | 110 | pub const fn from_raw(n: u8) -> Option<Self> { |
| 111 | if n > 0b1111 { | 111 | if n > 0b1111 { None } else { Some(Self(n)) } |
| 112 | None | ||
| 113 | } else { | ||
| 114 | Some(Self(n)) | ||
| 115 | } | ||
| 116 | } | 112 | } |
| 117 | 113 | ||
| 118 | /// Store a specific divisor value that will divide the source | 114 | /// Store a specific divisor value that will divide the source |
diff --git a/embassy-mcxa/src/i2c/controller.rs b/embassy-mcxa/src/i2c/controller.rs index 182a53aea..c27d508b0 100644 --- a/embassy-mcxa/src/i2c/controller.rs +++ b/embassy-mcxa/src/i2c/controller.rs | |||
| @@ -3,15 +3,15 @@ | |||
| 3 | use core::future::Future; | 3 | use core::future::Future; |
| 4 | use core::marker::PhantomData; | 4 | use core::marker::PhantomData; |
| 5 | 5 | ||
| 6 | use embassy_hal_internal::drop::OnDrop; | ||
| 7 | use embassy_hal_internal::Peri; | 6 | use embassy_hal_internal::Peri; |
| 7 | use embassy_hal_internal::drop::OnDrop; | ||
| 8 | use mcxa_pac::lpi2c0::mtdr::Cmd; | 8 | use mcxa_pac::lpi2c0::mtdr::Cmd; |
| 9 | 9 | ||
| 10 | use super::{Async, Blocking, Error, Instance, InterruptHandler, Mode, Result, SclPin, SdaPin}; | 10 | use super::{Async, Blocking, Error, Instance, InterruptHandler, Mode, Result, SclPin, SdaPin}; |
| 11 | use crate::AnyPin; | ||
| 11 | use crate::clocks::periph_helpers::{Div4, Lpi2cClockSel, Lpi2cConfig}; | 12 | use crate::clocks::periph_helpers::{Div4, Lpi2cClockSel, Lpi2cConfig}; |
| 12 | use crate::clocks::{enable_and_reset, PoweredClock}; | 13 | use crate::clocks::{PoweredClock, enable_and_reset}; |
| 13 | use crate::interrupt::typelevel::Interrupt; | 14 | use crate::interrupt::typelevel::Interrupt; |
| 14 | use crate::AnyPin; | ||
| 15 | 15 | ||
| 16 | /// Bus speed (nominal SCL, no clock stretching) | 16 | /// Bus speed (nominal SCL, no clock stretching) |
| 17 | #[derive(Clone, Copy, Default, PartialEq)] | 17 | #[derive(Clone, Copy, Default, PartialEq)] |
diff --git a/embassy-mcxa/src/interrupt.rs b/embassy-mcxa/src/interrupt.rs index 1d10e3b2d..c1f7e55a0 100644 --- a/embassy-mcxa/src/interrupt.rs +++ b/embassy-mcxa/src/interrupt.rs | |||
| @@ -32,7 +32,7 @@ mod generated { | |||
| 32 | 32 | ||
| 33 | use core::sync::atomic::{AtomicU16, AtomicU32, Ordering}; | 33 | use core::sync::atomic::{AtomicU16, AtomicU32, Ordering}; |
| 34 | 34 | ||
| 35 | pub use generated::interrupt::{typelevel, Priority}; | 35 | pub use generated::interrupt::{Priority, typelevel}; |
| 36 | 36 | ||
| 37 | use crate::pac::Interrupt; | 37 | use crate::pac::Interrupt; |
| 38 | 38 | ||
diff --git a/embassy-mcxa/src/lpuart/buffered.rs b/embassy-mcxa/src/lpuart/buffered.rs index 8eb443ca7..34fdbb76c 100644 --- a/embassy-mcxa/src/lpuart/buffered.rs +++ b/embassy-mcxa/src/lpuart/buffered.rs | |||
| @@ -3,8 +3,8 @@ use core::marker::PhantomData; | |||
| 3 | use core::sync::atomic::{AtomicBool, Ordering}; | 3 | use core::sync::atomic::{AtomicBool, Ordering}; |
| 4 | use core::task::Poll; | 4 | use core::task::Poll; |
| 5 | 5 | ||
| 6 | use embassy_hal_internal::atomic_ring_buffer::RingBuffer; | ||
| 7 | use embassy_hal_internal::Peri; | 6 | use embassy_hal_internal::Peri; |
| 7 | use embassy_hal_internal::atomic_ring_buffer::RingBuffer; | ||
| 8 | use embassy_sync::waitqueue::AtomicWaker; | 8 | use embassy_sync::waitqueue::AtomicWaker; |
| 9 | 9 | ||
| 10 | use super::*; | 10 | use super::*; |
diff --git a/embassy-mcxa/src/lpuart/mod.rs b/embassy-mcxa/src/lpuart/mod.rs index 2d8308ec8..b8a2d5172 100644 --- a/embassy-mcxa/src/lpuart/mod.rs +++ b/embassy-mcxa/src/lpuart/mod.rs | |||
| @@ -4,13 +4,13 @@ use embassy_hal_internal::{Peri, PeripheralType}; | |||
| 4 | use paste::paste; | 4 | use paste::paste; |
| 5 | 5 | ||
| 6 | use crate::clocks::periph_helpers::{Div4, LpuartClockSel, LpuartConfig}; | 6 | use crate::clocks::periph_helpers::{Div4, LpuartClockSel, LpuartConfig}; |
| 7 | use crate::clocks::{enable_and_reset, ClockError, Gate, PoweredClock}; | 7 | use crate::clocks::{ClockError, Gate, PoweredClock, enable_and_reset}; |
| 8 | use crate::gpio::SealedPin; | 8 | use crate::gpio::SealedPin; |
| 9 | use crate::pac::lpuart0::baud::Sbns as StopBits; | 9 | use crate::pac::lpuart0::baud::Sbns as StopBits; |
| 10 | use crate::pac::lpuart0::ctrl::{Idlecfg as IdleConfig, Ilt as IdleType, Pt as Parity, M as DataBits}; | 10 | use crate::pac::lpuart0::ctrl::{Idlecfg as IdleConfig, Ilt as IdleType, M as DataBits, Pt as Parity}; |
| 11 | use crate::pac::lpuart0::modir::{Txctsc as TxCtsConfig, Txctssrc as TxCtsSource}; | 11 | use crate::pac::lpuart0::modir::{Txctsc as TxCtsConfig, Txctssrc as TxCtsSource}; |
| 12 | use crate::pac::lpuart0::stat::Msbf as MsbFirst; | 12 | use crate::pac::lpuart0::stat::Msbf as MsbFirst; |
| 13 | use crate::{interrupt, pac, AnyPin}; | 13 | use crate::{AnyPin, interrupt, pac}; |
| 14 | 14 | ||
| 15 | pub mod buffered; | 15 | pub mod buffered; |
| 16 | 16 | ||
diff --git a/embassy-mcxa/src/ostimer.rs b/embassy-mcxa/src/ostimer.rs index c51812e3d..9e66e82d8 100644 --- a/embassy-mcxa/src/ostimer.rs +++ b/embassy-mcxa/src/ostimer.rs | |||
| @@ -32,7 +32,7 @@ use core::sync::atomic::{AtomicBool, Ordering}; | |||
| 32 | use embassy_hal_internal::{Peri, PeripheralType}; | 32 | use embassy_hal_internal::{Peri, PeripheralType}; |
| 33 | 33 | ||
| 34 | use crate::clocks::periph_helpers::{OsTimerConfig, OstimerClockSel}; | 34 | use crate::clocks::periph_helpers::{OsTimerConfig, OstimerClockSel}; |
| 35 | use crate::clocks::{assert_reset, enable_and_reset, is_reset_released, release_reset, Gate, PoweredClock}; | 35 | use crate::clocks::{Gate, PoweredClock, assert_reset, enable_and_reset, is_reset_released, release_reset}; |
| 36 | use crate::interrupt::InterruptExt; | 36 | use crate::interrupt::InterruptExt; |
| 37 | use crate::pac; | 37 | use crate::pac; |
| 38 | 38 | ||
| @@ -521,11 +521,11 @@ pub mod time_driver { | |||
| 521 | use embassy_time_driver as etd; | 521 | use embassy_time_driver as etd; |
| 522 | 522 | ||
| 523 | use super::{ | 523 | use super::{ |
| 524 | bin_to_gray, now_ticks_read, Regs, ALARM_ACTIVE, ALARM_CALLBACK, ALARM_FLAG, ALARM_TARGET_TIME, | 524 | ALARM_ACTIVE, ALARM_CALLBACK, ALARM_FLAG, ALARM_TARGET_TIME, EVTIMER_HI_MASK, EVTIMER_HI_SHIFT, |
| 525 | EVTIMER_HI_MASK, EVTIMER_HI_SHIFT, LOW_32_BIT_MASK, | 525 | LOW_32_BIT_MASK, Regs, bin_to_gray, now_ticks_read, |
| 526 | }; | 526 | }; |
| 527 | use crate::clocks::periph_helpers::{OsTimerConfig, OstimerClockSel}; | 527 | use crate::clocks::periph_helpers::{OsTimerConfig, OstimerClockSel}; |
| 528 | use crate::clocks::{enable_and_reset, PoweredClock}; | 528 | use crate::clocks::{PoweredClock, enable_and_reset}; |
| 529 | use crate::pac; | 529 | use crate::pac; |
| 530 | 530 | ||
| 531 | #[allow(non_camel_case_types)] | 531 | #[allow(non_camel_case_types)] |
