Skip to content

Commit

Permalink
Remove deprecated APIs for 0.6 release
Browse files Browse the repository at this point in the history
- Remove the misspelled TracClk 1010 clock selection.
- Remove *PitChan.
  • Loading branch information
mciantyre committed Mar 7, 2023
1 parent 8a10aec commit f6318e0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 61 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
12 changes: 0 additions & 12 deletions src/chip/imxrt10xx/imxrt1010.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
34 changes: 0 additions & 34 deletions src/common/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,29 +383,12 @@ fn prepare_gpt<const N: u8>(gpt: &mut gpt::Gpt<N>) {
/// A single PIT channel that acts as a blocking timer.
pub type BlockingPit<const N: u8, const HZ: u32> = Blocking<pit::Pit<N>, 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<const N: u8, const HZ: u32> = BlockingPit<N, HZ>;

impl<const N: u8, const HZ: u32> BlockingPit<N, HZ> {
/// Create a blocking adapter from a PIT channel.
pub fn from_pit(mut pit: pit::Pit<N>) -> 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<N>) -> Self {
Self::from_pit(pit)
}
}

/// A chain of PIT channels that act as a blocking timer.
Expand Down Expand Up @@ -529,29 +512,12 @@ where
/// A count down timer over a PIT channel.
pub type RawCountDownPit<const N: u8> = RawCountDown<pit::Pit<N>>;

/// 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<const N: u8> = RawCountDownPit<N>;

impl<const N: u8> RawCountDownPit<N> {
/// Create a count down timer from a PIT channel.
pub fn from_pit(mut pit: pit::Pit<N>) -> 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<N>) -> Self {
Self::from_pit(pit)
}
}

/// A count down timer over two chained PIT channels.
Expand Down
15 changes: 0 additions & 15 deletions tests/1010_trace_clk_rename.rs

This file was deleted.

0 comments on commit f6318e0

Please sign in to comment.