Skip to content

Commit

Permalink
enum from output
Browse files Browse the repository at this point in the history
  • Loading branch information
burrbull committed Apr 22, 2023
1 parent 557b7f2 commit 74ce5e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- Split USART and UART implementations
- Add `lapce` editor settings [#601]
- Use `enum`s for alternate peripheral pins [#594]
- Use `enum`s for alternate peripheral pins [#594] [#610]
- Added missing U(S)ART DMA traits for HAL serial types [#593]
- Improve SPI::new* docs [#587]
- Add advanced timer dead time insertion example [#585]
Expand All @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
[#599]: https://github.com/stm32-rs/stm32f4xx-hal/pull/599
[#601]: https://github.com/stm32-rs/stm32f4xx-hal/pull/601
[#603]: https://github.com/stm32-rs/stm32f4xx-hal/pull/603
[#610]: https://github.com/stm32-rs/stm32f4xx-hal/pull/610

## [v0.15.0] - 2023-03-13

Expand Down
9 changes: 6 additions & 3 deletions src/gpio/alt.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{Alternate, NoPin, OpenDrain, PinMode};
use super::{marker, Alternate, NoPin, OpenDrain, PinMode};
use crate::gpio::{self, Edge, ExtiPin};
use crate::pac::EXTI;
use crate::syscfg::SysCfg;
Expand Down Expand Up @@ -122,8 +122,11 @@ macro_rules! pin {

$(
$(#[$attr])*
impl From<gpio::$PX> for $name {
fn from(p: gpio::$PX) -> Self {
impl<MODE> From<gpio::$PX<MODE>> for $name
where
MODE: marker::NotAlt + PinMode
{
fn from(p: gpio::$PX<MODE>) -> Self {
Self::$PX(p.into_mode())
}
}
Expand Down

0 comments on commit 74ce5e0

Please sign in to comment.