File tree Expand file tree Collapse file tree 3 files changed +307
-158
lines changed Expand file tree Collapse file tree 3 files changed +307
-158
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
17
17
18
18
### Added
19
19
20
+ - ` rcc::Config ` with prescalers for direct setting of clocks without calculating
20
21
- ` From<Bps> ` for ` serial::Config `
21
22
- ` From<Into<Hertz>> ` for ` i2c::Mode `
22
23
- ` exti_rtic ` example
Original file line number Diff line number Diff line change @@ -23,6 +23,17 @@ fn main() -> ! {
23
23
. pclk1 ( 28 . mhz ( ) )
24
24
. adcclk ( 14 . mhz ( ) )
25
25
. freeze ( & mut flash. acr ) ;
26
+ /*
27
+ // Alternative configuration using dividers and multipliers directly
28
+ let clocks = rcc.cfgr.freeze_with_config(rcc::Config {
29
+ hse: Some(8_000_000),
30
+ pllmul: Some(7),
31
+ hpre: rcc::HPre::DIV1,
32
+ ppre1: rcc::PPre::DIV2,
33
+ ppre2: rcc::PPre::DIV1,
34
+ usbpre: rcc::UsbPre::DIV1_5,
35
+ adcpre: rcc::AdcPre::DIV2,
36
+ }, &mut flash.acr);*/
26
37
hprintln ! ( "sysclk freq: {}" , clocks. sysclk( ) . 0 ) . unwrap ( ) ;
27
38
hprintln ! ( "adc freq: {}" , clocks. adcclk( ) . 0 ) . unwrap ( ) ;
28
39
You can’t perform that action at this time.
0 commit comments