Skip to content

Commit

Permalink
fix: Fixed warning unsuffixed floating constant [-Wunsuffixed-float-c…
Browse files Browse the repository at this point in the history
…onstants]
  • Loading branch information
lasutek authored and dragonmux committed Feb 5, 2024
1 parent cbf2766 commit ec9cc4d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion lib/lm4f/rcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ void rcc_change_pll_divisor(uint8_t pll_div400)
/* Disable PLL bypass to derive the system clock from the PLL clock */
rcc_pll_bypass_disable();
/* Update the system clock frequency for housekeeping */
lm4f_rcc_sysclk_freq = (uint32_t)400E6 / pll_div400;
lm4f_rcc_sysclk_freq = (uint32_t)400000000 / pll_div400;
}

/**
Expand Down
42 changes: 21 additions & 21 deletions lib/stm32/f1/rcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ const struct rcc_clock_scale rcc_hse_configs[RCC_CLOCK_HSE_END] = {
.adcpre = RCC_CFGR_ADCPRE_DIV6,
.flash_waitstates = 2,
.prediv1 = RCC_CFGR2_PREDIV_DIV2,
.ahb_frequency = 72e6,
.apb1_frequency = 36e6,
.apb2_frequency = 72e6,
.ahb_frequency = 72000000,
.apb1_frequency = 36000000,
.apb2_frequency = 72000000,
},
{
/* hse25 to 72, this was a f105 config originally! intention preserved */
Expand All @@ -101,9 +101,9 @@ const struct rcc_clock_scale rcc_hse_configs[RCC_CLOCK_HSE_END] = {
.pll2_mul = RCC_CFGR2_PLL2MUL_PLL2_CLK_MUL8,
.prediv2 = RCC_CFGR2_PREDIV2_DIV5,
.usbpre = RCC_CFGR_USBPRE_PLL_VCO_CLK_DIV3,
.ahb_frequency = 72e6,
.apb1_frequency = 36e6,
.apb2_frequency = 72e6,
.ahb_frequency = 72000000,
.apb1_frequency = 36000000,
.apb2_frequency = 72000000,
},
{
/* hse8, pll to 24 (f100 value line max) */
Expand All @@ -115,9 +115,9 @@ const struct rcc_clock_scale rcc_hse_configs[RCC_CLOCK_HSE_END] = {
.adcpre = RCC_CFGR_ADCPRE_DIV2,
.flash_waitstates = 0,
.prediv1 = RCC_CFGR2_PREDIV_NODIV,
.ahb_frequency = 24e6,
.apb1_frequency = 24e6,
.apb2_frequency = 24e6,
.ahb_frequency = 24000000,
.apb1_frequency = 24000000,
.apb2_frequency = 24000000,
},
{
/* hse8, pll to 72 */
Expand All @@ -129,9 +129,9 @@ const struct rcc_clock_scale rcc_hse_configs[RCC_CLOCK_HSE_END] = {
.adcpre = RCC_CFGR_ADCPRE_DIV8,
.flash_waitstates = 2,
.prediv1 = RCC_CFGR2_PREDIV_NODIV,
.ahb_frequency = 72e6,
.apb1_frequency = 36e6,
.apb2_frequency = 72e6,
.ahb_frequency = 72000000,
.apb1_frequency = 36000000,
.apb2_frequency = 72000000,
},
};

Expand All @@ -146,9 +146,9 @@ const struct rcc_clock_scale rcc_hsi_configs[RCC_CLOCK_HSI_END] = {
.ppre2 = RCC_CFGR_PPRE_NODIV,
.adcpre = RCC_CFGR_ADCPRE_DIV2,
.flash_waitstates = 0,
.ahb_frequency = 24e6,
.apb1_frequency = 24e6,
.apb2_frequency = 24e6,
.ahb_frequency = 24000000,
.apb1_frequency = 24000000,
.apb2_frequency = 24000000,
},
{
/* hsi to 48Mhz, allows usb, but out of spec */
Expand All @@ -161,9 +161,9 @@ const struct rcc_clock_scale rcc_hsi_configs[RCC_CLOCK_HSI_END] = {
.adcpre = RCC_CFGR_ADCPRE_DIV8,
.usbpre = RCC_CFGR_USBPRE_PLL_CLK_NODIV,
.flash_waitstates = 1,
.ahb_frequency = 48e6,
.apb1_frequency = 24e6,
.apb2_frequency = 48e6,
.ahb_frequency = 48000000,
.apb1_frequency = 24000000,
.apb2_frequency = 48000000,
},
{
/* hsi to 64Mhz, max possible from hsi */
Expand All @@ -175,9 +175,9 @@ const struct rcc_clock_scale rcc_hsi_configs[RCC_CLOCK_HSI_END] = {
.ppre2 = RCC_CFGR_PPRE_NODIV,
.adcpre = RCC_CFGR_ADCPRE_DIV8,
.flash_waitstates = 2,
.ahb_frequency = 64e6,
.apb1_frequency = 32e6,
.apb2_frequency = 64e6,
.ahb_frequency = 64000000,
.apb1_frequency = 32000000,
.apb2_frequency = 64000000,
},
};

Expand Down
6 changes: 3 additions & 3 deletions lib/stm32/f3/rcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ const struct rcc_clock_scale rcc_hse8mhz_configs[] = {
.hpre = RCC_CFGR_HPRE_NODIV,
.ppre1 = RCC_CFGR_PPRE_DIV2,
.ppre2 = RCC_CFGR_PPRE_NODIV,
.ahb_frequency = 72e6,
.apb1_frequency = 36e6,
.apb2_frequency = 72e6,
.ahb_frequency = 72000000,
.apb1_frequency = 36000000,
.apb2_frequency = 72000000,
}
};

Expand Down

0 comments on commit ec9cc4d

Please sign in to comment.