More support for U5 PWR (ish), RCC, and FLASH (ish).

This commit is contained in:
Bob McWhirter 2021-11-08 14:27:33 -05:00
parent 5f124ec49f
commit 12a64b867b
2 changed files with 2 additions and 9 deletions

View file

@ -1,4 +1,3 @@
use crate::pac::{PWR, RCC, SYSCFG};
use crate::peripherals;
/// Voltage Scale

View file

@ -1,7 +1,7 @@
use crate::pac;
use crate::peripherals::{self, RCC};
use crate::pwr::{Power, VoltageScale};
use crate::rcc::{get_freqs, set_freqs, Clocks};
use crate::rcc::{set_freqs, Clocks};
use crate::time::{Hertz, U32Ext};
use stm32_metapac::rcc::vals::{Hpre, Msirange, Msirgsel, Pllm, Pllsrc, Ppre, Sw};
@ -108,12 +108,6 @@ pub enum PllM {
Div16 = 0b1111,
}
impl PllM {
fn to_div(&self) -> u32 {
(*self as u32) + 1
}
}
impl Into<Pllm> for PllM {
fn into(self) -> Pllm {
Pllm(self as u8)
@ -490,7 +484,7 @@ impl RccExt for RCC {
}
};
let (apb3_freq, apb3_tim_freq) = match cfgr.apb3_pre {
let (apb3_freq, _apb3_tim_freq) = match cfgr.apb3_pre {
APBPrescaler::NotDivided => (ahb_freq, ahb_freq),
pre => {
let pre: u8 = pre.into();