STM32: Remove vestigal build.rs cfgs, add new flashsize_X and package_X cfgs, use in F3 RCC

This commit is contained in:
Adam Greig
2023-11-19 03:06:30 +00:00
committed by Dario Nieuwenhuis
parent f5c9e3baa6
commit 2218d30c80
2 changed files with 5 additions and 18 deletions

View File

@ -346,10 +346,7 @@ fn calc_pll(config: &Config, Hertz(sysclk): Hertz) -> (Hertz, PllConfig) {
None => {
cfg_if::cfg_if! {
// For some chips PREDIV is always two, and cannot be changed
if #[cfg(any(
stm32f302xd, stm32f302xe, stm32f303xd,
stm32f303xe, stm32f398xe
))] {
if #[cfg(any(flashsize_d, flashsize_e))] {
let (multiplier, divisor) = get_mul_div(sysclk, HSI_FREQ.0);
(
Hertz((HSI_FREQ.0 / divisor) * multiplier),