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 483a8e5 commit 1312cdb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 361 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- 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. ([#352])
was hard to find out anyway. ([#351])

### Added

Expand Down Expand Up @@ -610,6 +610,7 @@ let clocks = rcc
[filter]: https://defmt.ferrous-systems.com/filtering.html

[#352]: https://github.com/stm32-rs/stm32f3xx-hal/pull/352
[#351]: https://github.com/stm32-rs/stm32f3xx-hal/pull/351
[#345]: https://github.com/stm32-rs/stm32f3xx-hal/pull/345
[#346]: https://github.com/stm32-rs/stm32f3xx-hal/pull/346
[#347]: https://github.com/stm32-rs/stm32f3xx-hal/pull/347
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 1312cdb

Please sign in to comment.