RCC: PLL: Modify CR instead of write, plus remove unnecessary unsafe tag.

This commit is contained in:
Nathan Conrad 2019-12-27 14:06:25 -05:00
parent 22ad0dc0ed
commit 3ba20dc0cb
2 changed files with 6 additions and 3 deletions

View File

@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Fixed
- RCC: Correct code to enable PLL.
## [v0.15.2] - 2019-11-04
### Changed

View File

@ -87,9 +87,9 @@ mod inner {
// Set PLL source and multiplier
rcc.cfgr
.modify(|_, w| unsafe { w.pllsrc().bit(pllsrc_bit).pllmul().bits(pllmul_bits) });
.modify(|_, w| w.pllsrc().bit(pllsrc_bit).pllmul().bits(pllmul_bits));
rcc.cr.write(|w| w.pllon().set_bit());
rcc.cr.modify(|_, w| w.pllon().set_bit());
while rcc.cr.read().pllrdy().bit_is_clear() {}
rcc.cfgr
@ -176,7 +176,7 @@ mod inner {
rcc.cfgr
.modify(|_, w| w.pllsrc().bits(pllsrc_bit).pllmul().bits(pllmul_bits));
rcc.cr.write(|w| w.pllon().set_bit());
rcc.cr.modify(|_, w| w.pllon().set_bit());
while rcc.cr.read().pllrdy().bit_is_clear() {}
rcc.cfgr