Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Serial::split #351

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

@@ -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
6 changes: 0 additions & 6 deletions src/dma.rs
Original file line number Diff line number Diff line change
@@ -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 {
(
$(
@@ -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)> {}
Loading