Skip to content

Commit 10a5e9f

Browse files
committed
CHANGELOG.md updated
1 parent d2dae44 commit 10a5e9f

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- Implementation of From trait for Pin-to-PartiallyErasedPin [#507]
13+
- Implementation of From trait for Pin-to-ErasedPin [#507]
14+
- Implementation of From trait for PartiallyErasedPin-to-ErasedPin [#507]
15+
16+
[#507]: https://github.com/stm32-rs/stm32f4xx-hal/pull/507
17+
1018
### Changed
1119
- use `stm32_i2s_v12x` version 0.3, reexport it, and implements requirement for it
1220
- i2s module don't reuse marker from spi module and define its own.

src/gpio.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -341,21 +341,21 @@ impl<const P: char, const N: u8, MODE> Pin<P, N, MODE> {
341341
}
342342
}
343343

344-
impl<const P: char, const N: u8, MODE> From<Pin<P, N, MODE>> for ErasedPin<MODE> {
345-
/// Pin-to-erased pin conversion using the [`From`] trait.
344+
impl<const P: char, const N: u8, MODE> From<Pin<P, N, MODE>> for PartiallyErasedPin<P, MODE> {
345+
/// Pin-to-partially erased pin conversion using the [`From`] trait.
346346
///
347347
/// Note that [`From`] is the reciprocal of [`Into`].
348348
fn from(p: Pin<P, N, MODE>) -> Self {
349-
p.erase()
349+
p.erase_number()
350350
}
351351
}
352352

353-
impl<const P: char, const N: u8, MODE> From<Pin<P, N, MODE>> for PartiallyErasedPin<P, MODE> {
354-
/// Pin-to-partially erased pin conversion using the [`From`] trait.
353+
impl<const P: char, const N: u8, MODE> From<Pin<P, N, MODE>> for ErasedPin<MODE> {
354+
/// Pin-to-erased pin conversion using the [`From`] trait.
355355
///
356356
/// Note that [`From`] is the reciprocal of [`Into`].
357357
fn from(p: Pin<P, N, MODE>) -> Self {
358-
p.erase_number()
358+
p.erase()
359359
}
360360
}
361361

0 commit comments

Comments
 (0)