Use modify instead of write for HSI14 clock setup
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
This commit is contained in:
parent
77a6dad00a
commit
2f0fb0b09e
|
@ -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
|
||||
|
|
|
@ -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…
Reference in New Issue