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 e903cc8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 361 deletions.
5 changes: 4 additions & 1 deletion 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. ([#351])

### Added

Expand Down Expand Up @@ -607,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 Expand Up @@ -722,7 +726,6 @@ let clocks = rcc
[v0.9.1]: https://github.com/stm32-rs/stm32f3xx-hal/releases/tag/v0.9.1
[v0.9.0]: https://github.com/stm32-rs/stm32f3xx-hal/releases/tag/v0.9.0
[v0.8.1]: https://github.com/stm32-rs/stm32f3xx-hal/releases/tag/v0.8.1
[v0.8.1]: https://github.com/stm32-rs/stm32f3xx-hal/releases/tag/v0.8.1
[v0.8.0]: https://github.com/stm32-rs/stm32f3xx-hal/releases/tag/v0.8.0
[v0.7.0]: https://github.com/stm32-rs/stm32f3xx-hal/releases/tag/v0.7.0
[v0.6.1]: https://github.com/stm32-rs/stm32f3xx-hal/releases/tag/v0.6.1
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 e903cc8

Please sign in to comment.