From f6318e044cf9b13366dfe1d3be209b3d1f24d838 Mon Sep 17 00:00:00 2001 From: Ian McIntyre Date: Sat, 4 Mar 2023 12:28:52 -0500 Subject: [PATCH] Remove deprecated APIs for 0.6 release - Remove the misspelled TracClk 1010 clock selection. - Remove *PitChan. --- CHANGELOG.md | 3 +++ src/chip/imxrt10xx/imxrt1010.rs | 12 ------------ src/common/timer.rs | 34 --------------------------------- tests/1010_trace_clk_rename.rs | 15 --------------- 4 files changed, 3 insertions(+), 61 deletions(-) delete mode 100644 tests/1010_trace_clk_rename.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index 886196f5..12ffec56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## [Unreleased] +**BREAKING** Remove deprecated APIs `clko2::Selection::TracClk` and +`timer::*PitChan`. + ## [0.5.1] 2023-03-07 Add support for i.MX RT 1020 processors. Enable support with the `"imxrt1020"` diff --git a/src/chip/imxrt10xx/imxrt1010.rs b/src/chip/imxrt10xx/imxrt1010.rs index b3befddf..2316cc26 100644 --- a/src/chip/imxrt10xx/imxrt1010.rs +++ b/src/chip/imxrt10xx/imxrt1010.rs @@ -117,18 +117,6 @@ pub(crate) mod ccm { /// SPDIF0 clock root. Spdif0Clk = 0b11101, } - - impl Clko2Selection { - /// Trace clock root. - /// - /// Prefer [`TraceClk`](Self::TraceClk), which is correctly spelled. - #[deprecated( - since = "0.5.1", - note = "Use the correctly-spelled 'TraceClk' variant." - )] - #[allow(non_upper_case_globals)] - pub const TracClk: Clko2Selection = Clko2Selection::TraceClk; - } } } pub(crate) const DMA_CHANNEL_COUNT: usize = 16; diff --git a/src/common/timer.rs b/src/common/timer.rs index 6766e041..37dbddb1 100644 --- a/src/common/timer.rs +++ b/src/common/timer.rs @@ -383,29 +383,12 @@ fn prepare_gpt(gpt: &mut gpt::Gpt) { /// A single PIT channel that acts as a blocking timer. pub type BlockingPit = Blocking, HZ>; -/// A single PIT channel that acts as a blocking timer. -/// -/// Prefer [`BlockingPit`], which is easier to type. It is also more -/// distinct than [`BlockingPitChain`], which varies from `BlockingPitChan` -/// by only one letter. -#[deprecated(since = "0.5.1", note = "Use BlockingPit")] -pub type BlockingPitChan = BlockingPit; - impl BlockingPit { /// Create a blocking adapter from a PIT channel. pub fn from_pit(mut pit: pit::Pit) -> Self { prepare_pit(&mut pit); Self::new(pit) } - - /// Create a blocking adapter from a PIT channel. - /// - /// Prefer [`from_pit`](Self::from_pit), which is easier to type - /// and matches the name of the type we're converting. - #[deprecated(since = "0.5.1", note = "Use from_pit")] - pub fn from_pit_channel(pit: pit::Pit) -> Self { - Self::from_pit(pit) - } } /// A chain of PIT channels that act as a blocking timer. @@ -529,29 +512,12 @@ where /// A count down timer over a PIT channel. pub type RawCountDownPit = RawCountDown>; -/// A count down timer over a PIT channel. -/// -/// Prefer [`RawCountDownPit`], which is easier to type. It is also more -/// distinct than [`RawCountDownPitChain`], which varies from `RawCountDownPitChan` -/// by only one letter. -#[deprecated(since = "0.5.1", note = "Use RawCountDownPit")] -pub type RawCountDownPitChan = RawCountDownPit; - impl RawCountDownPit { /// Create a count down timer from a PIT channel. pub fn from_pit(mut pit: pit::Pit) -> Self { prepare_pit(&mut pit); Self::new(pit) } - - /// Create a count down timer from a PIT channel. - /// - /// Prefer [`from_pit`](Self::from_pit), which is easier to type - /// and matches the name of the type we're converting. - #[deprecated(since = "0.5.1", note = "Use from_pit")] - pub fn from_pit_channel(pit: pit::Pit) -> Self { - Self::from_pit(pit) - } } /// A count down timer over two chained PIT channels. diff --git a/tests/1010_trace_clk_rename.rs b/tests/1010_trace_clk_rename.rs deleted file mode 100644 index c3ebc982..00000000 --- a/tests/1010_trace_clk_rename.rs +++ /dev/null @@ -1,15 +0,0 @@ -//! Tests backwards compatibility of a typo correction. - -#![cfg(chip = "imxrt1010")] -#![allow(deprecated)] - -use hal::ccm::output_source::clko2::Selection; -use imxrt_hal as hal; - -const USER_CONSTANT: Selection = Selection::TracClk; - -#[test] -fn trace_clk_match() { - assert!(matches!(USER_CONSTANT, Selection::TracClk)); - assert!(matches!(USER_CONSTANT, Selection::TraceClk)); -}