Skip to content

Commit a0b209d

Browse files
authored
Merge pull request #210 from Sh3Rm4n/ppre-public
Make ppre methods public
2 parents 450668c + bb4040c commit a0b209d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1212
### Added
1313

1414
- Replace custom time based units with types defined in the [embedded-time][] crate ([#192])
15+
- Make `Clocks` `ppre1()` and `ppre2()` methods public, to get the current
16+
Prescaler value. ([#210])
1517

1618
### Breaking changes
1719

@@ -296,6 +298,7 @@ let clocks = rcc
296298

297299
- Support `stm32f303` device
298300

301+
[#210]: https://github.com/stm32-rs/stm32f3xx-hal/pull/210
299302
[#208]: https://github.com/stm32-rs/stm32f3xx-hal/pull/208
300303
[#203]: https://github.com/stm32-rs/stm32f3xx-hal/issues/203
301304
[#192]: https://github.com/stm32-rs/stm32f3xx-hal/pull/192

src/rcc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -800,13 +800,13 @@ impl Clocks {
800800
self.pclk2
801801
}
802802

803-
pub(crate) fn ppre1(&self) -> u8 {
803+
/// Returns the prescaler of the APB1
804+
pub fn ppre1(&self) -> u8 {
804805
self.ppre1
805806
}
806807

807-
// TODO remove `allow`
808-
#[allow(dead_code)]
809-
pub(crate) fn ppre2(&self) -> u8 {
808+
/// Returns the prescaler of the APB2
809+
pub fn ppre2(&self) -> u8 {
810810
self.ppre2
811811
}
812812

0 commit comments

Comments
 (0)