aboutsummaryrefslogtreecommitdiff
path: root/tests/stm32/src/common.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2024-02-26 00:00:17 +0100
committerDario Nieuwenhuis <[email protected]>2024-02-26 00:00:17 +0100
commit489d0be2a2971cfae7d6413b601bbd044d42e351 (patch)
treeb930aa13b1f43efedcf8bc19e85e94036dedc7d2 /tests/stm32/src/common.rs
parent497515ed57b768332295ef58630231609fb959fc (diff)
stm32/rcc: unify naming sysclk field to `sys`, enum to `Sysclk`.
Diffstat (limited to 'tests/stm32/src/common.rs')
-rw-r--r--tests/stm32/src/common.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/stm32/src/common.rs b/tests/stm32/src/common.rs
index 1e6b1cce9..7b9585afd 100644
--- a/tests/stm32/src/common.rs
+++ b/tests/stm32/src/common.rs
@@ -527,7 +527,7 @@ pub fn config() -> Config {
527 #[cfg(any(feature = "stm32l496zg", feature = "stm32l4a6zg", feature = "stm32l4r5zi"))] 527 #[cfg(any(feature = "stm32l496zg", feature = "stm32l4a6zg", feature = "stm32l4r5zi"))]
528 { 528 {
529 use embassy_stm32::rcc::*; 529 use embassy_stm32::rcc::*;
530 config.rcc.mux = ClockSrc::PLL1_R; 530 config.rcc.sys = Sysclk::PLL1_R;
531 config.rcc.hsi = true; 531 config.rcc.hsi = true;
532 config.rcc.pll = Some(Pll { 532 config.rcc.pll = Some(Pll {
533 source: PllSource::HSI, 533 source: PllSource::HSI,
@@ -547,7 +547,7 @@ pub fn config() -> Config {
547 mode: HseMode::Bypass, 547 mode: HseMode::Bypass,
548 prescaler: HsePrescaler::DIV1, 548 prescaler: HsePrescaler::DIV1,
549 }); 549 });
550 config.rcc.mux = ClockSrc::PLL1_R; 550 config.rcc.sys = Sysclk::PLL1_R;
551 config.rcc.pll = Some(Pll { 551 config.rcc.pll = Some(Pll {
552 source: PllSource::HSE, 552 source: PllSource::HSE,
553 prediv: PllPreDiv::DIV2, 553 prediv: PllPreDiv::DIV2,
@@ -562,7 +562,7 @@ pub fn config() -> Config {
562 { 562 {
563 use embassy_stm32::rcc::*; 563 use embassy_stm32::rcc::*;
564 config.rcc.hsi = true; 564 config.rcc.hsi = true;
565 config.rcc.mux = ClockSrc::PLL1_R; 565 config.rcc.sys = Sysclk::PLL1_R;
566 config.rcc.pll = Some(Pll { 566 config.rcc.pll = Some(Pll {
567 // 110Mhz clock (16 / 4 * 55 / 2) 567 // 110Mhz clock (16 / 4 * 55 / 2)
568 source: PllSource::HSI, 568 source: PllSource::HSI,
@@ -586,7 +586,7 @@ pub fn config() -> Config {
586 divq: None, 586 divq: None,
587 divr: Some(PllDiv::DIV1), // 160 MHz 587 divr: Some(PllDiv::DIV1), // 160 MHz
588 }); 588 });
589 config.rcc.mux = ClockSrc::PLL1_R; 589 config.rcc.sys = Sysclk::PLL1_R;
590 config.rcc.voltage_range = VoltageScale::RANGE1; 590 config.rcc.voltage_range = VoltageScale::RANGE1;
591 config.rcc.hsi48 = Some(Hsi48Config { sync_from_usb: true }); // needed for USB 591 config.rcc.hsi48 = Some(Hsi48Config { sync_from_usb: true }); // needed for USB
592 } 592 }
@@ -594,7 +594,7 @@ pub fn config() -> Config {
594 #[cfg(feature = "stm32wba52cg")] 594 #[cfg(feature = "stm32wba52cg")]
595 { 595 {
596 use embassy_stm32::rcc::*; 596 use embassy_stm32::rcc::*;
597 config.rcc.mux = ClockSrc::HSI; 597 config.rcc.sys = Sysclk::HSI;
598 598
599 embassy_stm32::pac::RCC.ccipr2().write(|w| { 599 embassy_stm32::pac::RCC.ccipr2().write(|w| {
600 w.set_rngsel(embassy_stm32::pac::rcc::vals::Rngsel::HSI); 600 w.set_rngsel(embassy_stm32::pac::rcc::vals::Rngsel::HSI);
@@ -610,7 +610,7 @@ pub fn config() -> Config {
610 mul: PllMul::MUL4, 610 mul: PllMul::MUL4,
611 div: PllDiv::DIV2, // 32Mhz clock (16 * 4 / 2) 611 div: PllDiv::DIV2, // 32Mhz clock (16 * 4 / 2)
612 }); 612 });
613 config.rcc.mux = ClockSrc::PLL1_R; 613 config.rcc.sys = Sysclk::PLL1_R;
614 } 614 }
615 615
616 #[cfg(any(feature = "stm32l152re"))] 616 #[cfg(any(feature = "stm32l152re"))]
@@ -622,7 +622,7 @@ pub fn config() -> Config {
622 mul: PllMul::MUL4, 622 mul: PllMul::MUL4,
623 div: PllDiv::DIV2, // 32Mhz clock (16 * 4 / 2) 623 div: PllDiv::DIV2, // 32Mhz clock (16 * 4 / 2)
624 }); 624 });
625 config.rcc.mux = ClockSrc::PLL1_R; 625 config.rcc.sys = Sysclk::PLL1_R;
626 } 626 }
627 627
628 config 628 config