Use modify instead of write for HSI14 clock setup

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
This commit is contained in:
Daniel Egger 2019-02-05 12:20:40 +01:00
parent 77a6dad00a
commit 2f0fb0b09e
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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() {}
}