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

Make ppre methods public #210

Merged
merged 1 commit into from
Mar 13, 2021
Merged
Show file tree
Hide file tree
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: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Added

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

### Breaking changes

Expand Down Expand Up @@ -296,6 +298,7 @@ let clocks = rcc

- Support `stm32f303` device

[#210]: https://github.com/stm32-rs/stm32f3xx-hal/pull/210
[#208]: https://github.com/stm32-rs/stm32f3xx-hal/pull/208
[#203]: https://github.com/stm32-rs/stm32f3xx-hal/issues/203
[#192]: https://github.com/stm32-rs/stm32f3xx-hal/pull/192
Expand Down
8 changes: 4 additions & 4 deletions src/rcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -800,13 +800,13 @@ impl Clocks {
self.pclk2
}

pub(crate) fn ppre1(&self) -> u8 {
/// Returns the prescaler of the APB1
pub fn ppre1(&self) -> u8 {
self.ppre1
}

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

Expand Down