Browse Source

Use modify instead of write for HSI14 clock setup

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
trying.tmp
Daniel Egger 4 years ago
parent
commit
2f0fb0b09e
  1. 4
      CHANGELOG.md
  2. 2
      src/adc.rs

4
CHANGELOG.md

@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Updated the ADC code to use variants added in stm32-rs v0.6.0 - @HarkonenBade
- Improved serial `write_str` implementation
### Fixed
- Fixed ADC use trampling over the HSI48 clock settings
## [v0.12.0] - 2019-01-13
### Added

2
src/adc.rs

@ -561,7 +561,7 @@ impl Adc {
fn select_clock(&mut self, rcc: &mut Rcc) {
rcc.regs.apb2enr.modify(|_, w| w.adcen().enabled());
rcc.regs.cr2.write(|w| w.hsi14on().on());
rcc.regs.cr2.modify(|_, w| w.hsi14on().on());
while rcc.regs.cr2.read().hsi14rdy().is_not_ready() {}
}

Loading…
Cancel
Save