diff options
| -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/dma.rs | 2 | ||||
| -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 | 8 | ||||
| -rw-r--r-- | embassy-mcxa/src/ostimer.rs | 8 | ||||
| -rw-r--r-- | examples/mcxa/src/bin/adc_interrupt.rs | 4 | ||||
| -rw-r--r-- | examples/mcxa/src/bin/adc_polling.rs | 2 | ||||
| -rw-r--r-- | examples/mcxa/src/bin/i2c-async.rs | 2 | ||||
| -rw-r--r-- | examples/mcxa/src/bin/i2c-scan-blocking.rs | 2 | ||||
| -rw-r--r-- | examples/mcxa/src/bin/lpuart_buffered.rs | 2 |
14 files changed, 23 insertions, 27 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/dma.rs b/embassy-mcxa/src/dma.rs index 7996a45bc..1293f8445 100644 --- a/embassy-mcxa/src/dma.rs +++ b/embassy-mcxa/src/dma.rs | |||
| @@ -104,7 +104,7 @@ use core::future::Future; | |||
| 104 | use core::marker::PhantomData; | 104 | use core::marker::PhantomData; |
| 105 | use core::pin::Pin; | 105 | use core::pin::Pin; |
| 106 | use core::ptr::NonNull; | 106 | use core::ptr::NonNull; |
| 107 | use core::sync::atomic::{fence, AtomicUsize, Ordering}; | 107 | use core::sync::atomic::{AtomicUsize, Ordering, fence}; |
| 108 | use core::task::{Context, Poll}; | 108 | use core::task::{Context, Poll}; |
| 109 | 109 | ||
| 110 | use embassy_hal_internal::PeripheralType; | 110 | use embassy_hal_internal::PeripheralType; |
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 1b468c6cf..c960af7a2 100644 --- a/embassy-mcxa/src/interrupt.rs +++ b/embassy-mcxa/src/interrupt.rs | |||
| @@ -40,7 +40,7 @@ mod generated { | |||
| 40 | 40 | ||
| 41 | use core::sync::atomic::{AtomicU16, AtomicU32, Ordering}; | 41 | use core::sync::atomic::{AtomicU16, AtomicU32, Ordering}; |
| 42 | 42 | ||
| 43 | pub use generated::interrupt::{typelevel, Priority}; | 43 | pub use generated::interrupt::{Priority, typelevel}; |
| 44 | 44 | ||
| 45 | use crate::pac::Interrupt; | 45 | use crate::pac::Interrupt; |
| 46 | 46 | ||
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 616c7e7e4..e59ce8140 100644 --- a/embassy-mcxa/src/lpuart/mod.rs +++ b/embassy-mcxa/src/lpuart/mod.rs | |||
| @@ -5,13 +5,13 @@ use embassy_hal_internal::{Peri, PeripheralType}; | |||
| 5 | use paste::paste; | 5 | use paste::paste; |
| 6 | 6 | ||
| 7 | use crate::clocks::periph_helpers::{Div4, LpuartClockSel, LpuartConfig}; | 7 | use crate::clocks::periph_helpers::{Div4, LpuartClockSel, LpuartConfig}; |
| 8 | use crate::clocks::{enable_and_reset, ClockError, Gate, PoweredClock}; | 8 | use crate::clocks::{ClockError, Gate, PoweredClock, enable_and_reset}; |
| 9 | use crate::gpio::SealedPin; | 9 | use crate::gpio::SealedPin; |
| 10 | use crate::pac::lpuart0::baud::Sbns as StopBits; | 10 | use crate::pac::lpuart0::baud::Sbns as StopBits; |
| 11 | use crate::pac::lpuart0::ctrl::{Idlecfg as IdleConfig, Ilt as IdleType, Pt as Parity, M as DataBits}; | 11 | use crate::pac::lpuart0::ctrl::{Idlecfg as IdleConfig, Ilt as IdleType, M as DataBits, Pt as Parity}; |
| 12 | use crate::pac::lpuart0::modir::{Txctsc as TxCtsConfig, Txctssrc as TxCtsSource}; | 12 | use crate::pac::lpuart0::modir::{Txctsc as TxCtsConfig, Txctssrc as TxCtsSource}; |
| 13 | use crate::pac::lpuart0::stat::Msbf as MsbFirst; | 13 | use crate::pac::lpuart0::stat::Msbf as MsbFirst; |
| 14 | use crate::{interrupt, pac, AnyPin}; | 14 | use crate::{AnyPin, interrupt, pac}; |
| 15 | 15 | ||
| 16 | pub mod buffered; | 16 | pub mod buffered; |
| 17 | 17 | ||
| @@ -20,7 +20,7 @@ pub mod buffered; | |||
| 20 | // ============================================================================ | 20 | // ============================================================================ |
| 21 | 21 | ||
| 22 | use crate::dma::{ | 22 | use crate::dma::{ |
| 23 | Channel as DmaChannelTrait, DmaChannel, DmaRequest, EnableInterrupt, RingBuffer, DMA_MAX_TRANSFER_SIZE, | 23 | Channel as DmaChannelTrait, DMA_MAX_TRANSFER_SIZE, DmaChannel, DmaRequest, EnableInterrupt, RingBuffer, |
| 24 | }; | 24 | }; |
| 25 | 25 | ||
| 26 | // ============================================================================ | 26 | // ============================================================================ |
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)] |
diff --git a/examples/mcxa/src/bin/adc_interrupt.rs b/examples/mcxa/src/bin/adc_interrupt.rs index 83d8046b3..c88b1fe8d 100644 --- a/examples/mcxa/src/bin/adc_interrupt.rs +++ b/examples/mcxa/src/bin/adc_interrupt.rs | |||
| @@ -4,13 +4,13 @@ | |||
| 4 | use embassy_executor::Spawner; | 4 | use embassy_executor::Spawner; |
| 5 | use embassy_mcxa_examples::init_adc_pins; | 5 | use embassy_mcxa_examples::init_adc_pins; |
| 6 | use hal::adc::{LpadcConfig, TriggerPriorityPolicy}; | 6 | use hal::adc::{LpadcConfig, TriggerPriorityPolicy}; |
| 7 | use hal::clocks::periph_helpers::{AdcClockSel, Div4}; | ||
| 8 | use hal::clocks::PoweredClock; | 7 | use hal::clocks::PoweredClock; |
| 8 | use hal::clocks::periph_helpers::{AdcClockSel, Div4}; | ||
| 9 | use hal::pac::adc1::cfg::{Pwrsel, Refsel}; | 9 | use hal::pac::adc1::cfg::{Pwrsel, Refsel}; |
| 10 | use hal::pac::adc1::cmdl1::{Adch, Mode}; | 10 | use hal::pac::adc1::cmdl1::{Adch, Mode}; |
| 11 | use hal::pac::adc1::ctrl::CalAvgs; | 11 | use hal::pac::adc1::ctrl::CalAvgs; |
| 12 | use hal::pac::adc1::tctrl::Tcmd; | 12 | use hal::pac::adc1::tctrl::Tcmd; |
| 13 | use hal::{bind_interrupts, InterruptExt}; | 13 | use hal::{InterruptExt, bind_interrupts}; |
| 14 | use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _}; | 14 | use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _}; |
| 15 | 15 | ||
| 16 | bind_interrupts!(struct Irqs { | 16 | bind_interrupts!(struct Irqs { |
diff --git a/examples/mcxa/src/bin/adc_polling.rs b/examples/mcxa/src/bin/adc_polling.rs index ddf3f586b..07c50f224 100644 --- a/examples/mcxa/src/bin/adc_polling.rs +++ b/examples/mcxa/src/bin/adc_polling.rs | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | use embassy_executor::Spawner; | 4 | use embassy_executor::Spawner; |
| 5 | use embassy_mcxa_examples::init_adc_pins; | 5 | use embassy_mcxa_examples::init_adc_pins; |
| 6 | use hal::adc::{ConvResult, LpadcConfig, TriggerPriorityPolicy}; | 6 | use hal::adc::{ConvResult, LpadcConfig, TriggerPriorityPolicy}; |
| 7 | use hal::clocks::periph_helpers::{AdcClockSel, Div4}; | ||
| 8 | use hal::clocks::PoweredClock; | 7 | use hal::clocks::PoweredClock; |
| 8 | use hal::clocks::periph_helpers::{AdcClockSel, Div4}; | ||
| 9 | use hal::pac::adc1::cfg::{Pwrsel, Refsel}; | 9 | use hal::pac::adc1::cfg::{Pwrsel, Refsel}; |
| 10 | use hal::pac::adc1::cmdl1::{Adch, Mode}; | 10 | use hal::pac::adc1::cmdl1::{Adch, Mode}; |
| 11 | use hal::pac::adc1::ctrl::CalAvgs; | 11 | use hal::pac::adc1::ctrl::CalAvgs; |
diff --git a/examples/mcxa/src/bin/i2c-async.rs b/examples/mcxa/src/bin/i2c-async.rs index 47b5f3cbe..edcfd5f22 100644 --- a/examples/mcxa/src/bin/i2c-async.rs +++ b/examples/mcxa/src/bin/i2c-async.rs | |||
| @@ -6,8 +6,8 @@ use embassy_time::Timer; | |||
| 6 | use hal::bind_interrupts; | 6 | use hal::bind_interrupts; |
| 7 | use hal::clocks::config::Div8; | 7 | use hal::clocks::config::Div8; |
| 8 | use hal::config::Config; | 8 | use hal::config::Config; |
| 9 | use hal::i2c::controller::{self, I2c, Speed}; | ||
| 10 | use hal::i2c::InterruptHandler; | 9 | use hal::i2c::InterruptHandler; |
| 10 | use hal::i2c::controller::{self, I2c, Speed}; | ||
| 11 | use hal::peripherals::LPI2C3; | 11 | use hal::peripherals::LPI2C3; |
| 12 | use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _}; | 12 | use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _}; |
| 13 | 13 | ||
diff --git a/examples/mcxa/src/bin/i2c-scan-blocking.rs b/examples/mcxa/src/bin/i2c-scan-blocking.rs index 4e203597b..0197f9b1d 100644 --- a/examples/mcxa/src/bin/i2c-scan-blocking.rs +++ b/examples/mcxa/src/bin/i2c-scan-blocking.rs | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | 3 | ||
| 4 | use embassy_executor::Spawner; | 4 | use embassy_executor::Spawner; |
| 5 | use embassy_mcxa::gpio::Pull; | ||
| 6 | use embassy_mcxa::Input; | 5 | use embassy_mcxa::Input; |
| 6 | use embassy_mcxa::gpio::Pull; | ||
| 7 | use embassy_time::Timer; | 7 | use embassy_time::Timer; |
| 8 | use hal::clocks::config::Div8; | 8 | use hal::clocks::config::Div8; |
| 9 | use hal::config::Config; | 9 | use hal::config::Config; |
diff --git a/examples/mcxa/src/bin/lpuart_buffered.rs b/examples/mcxa/src/bin/lpuart_buffered.rs index 420589d00..47b56b7c7 100644 --- a/examples/mcxa/src/bin/lpuart_buffered.rs +++ b/examples/mcxa/src/bin/lpuart_buffered.rs | |||
| @@ -3,8 +3,8 @@ | |||
| 3 | 3 | ||
| 4 | use embassy_executor::Spawner; | 4 | use embassy_executor::Spawner; |
| 5 | use embassy_mcxa::clocks::config::Div8; | 5 | use embassy_mcxa::clocks::config::Div8; |
| 6 | use embassy_mcxa::lpuart::buffered::BufferedLpuart; | ||
| 7 | use embassy_mcxa::lpuart::Config; | 6 | use embassy_mcxa::lpuart::Config; |
| 7 | use embassy_mcxa::lpuart::buffered::BufferedLpuart; | ||
| 8 | use embassy_mcxa::{bind_interrupts, lpuart}; | 8 | use embassy_mcxa::{bind_interrupts, lpuart}; |
| 9 | use embedded_io_async::Write; | 9 | use embedded_io_async::Write; |
| 10 | use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _}; | 10 | use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _}; |
