Skip to content

Commit

Permalink
Remove Serial::split
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh3Rm4n committed Nov 28, 2023
1 parent ce7ebb1 commit eca1fcb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 360 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Add `impl From<Toggle> for Switch` to reduce churn.
- Fix undefined behavior in SPI implementation ([#346])
- Add `num_traits::PrimInt` bounds to `Word`
- Remove `Serial::split`, which possibly creates two mutable references two
one Serial instance, which could've caused UB. The use case of this function
was hard to find out anyway.

### Added

Expand Down
6 changes: 0 additions & 6 deletions src/dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,6 @@ dma!( 2: { 1,2,3,4,5 } );
/// Marker trait mapping DMA targets to their channels
pub trait OnChannel<C: Channel>: Target + crate::private::Sealed {}

use crate::serial::{RxPin, TxPin};

macro_rules! on_channel {
(
$(
Expand All @@ -581,10 +579,6 @@ macro_rules! on_channel {
) => {
$(
$(
impl<Pin> crate::private::Sealed for serial::Tx<$USART, Pin> {}
impl<Pin> OnChannel<$dma::$TxChannel> for serial::Tx<$USART, Pin> where Pin: TxPin<$USART> {}
impl<Pin> crate::private::Sealed for serial::Rx<$USART, Pin> {}
impl<Pin> OnChannel<$dma::$RxChannel> for serial::Rx<$USART, Pin> where Pin: RxPin<$USART> {}
impl<Tx, Rx> crate::private::Sealed for serial::Serial<$USART, (Tx, Rx)> {}
impl<Tx, Rx> OnChannel<$dma::$TxChannel> for serial::Serial<$USART, (Tx, Rx)> {}
impl<Tx, Rx> OnChannel<$dma::$RxChannel> for serial::Serial<$USART, (Tx, Rx)> {}
Expand Down
Loading

0 comments on commit eca1fcb

Please sign in to comment.