diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2020-11-24 14:03:19 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2020-11-24 14:03:19 -0700 |
commit | 351ff7059a5bacb322664412a8c62ee4640b33bf (patch) | |
tree | 53ef3fb16c5742c2edc45e633d80f6e16896f864 /src/arch/stm32l4xxx/peripherals/clock.c | |
parent | 6a1e0acc14b62c00317ac61c6ad6d8ffe441be4f (diff) | |
download | stm32l4-351ff7059a5bacb322664412a8c62ee4640b33bf.tar.gz stm32l4-351ff7059a5bacb322664412a8c62ee4640b33bf.tar.bz2 stm32l4-351ff7059a5bacb322664412a8c62ee4640b33bf.zip |
Update .clang-format and run it on filse
Diffstat (limited to 'src/arch/stm32l4xxx/peripherals/clock.c')
-rw-r--r-- | src/arch/stm32l4xxx/peripherals/clock.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/arch/stm32l4xxx/peripherals/clock.c b/src/arch/stm32l4xxx/peripherals/clock.c index 9051572..32cd00c 100644 --- a/src/arch/stm32l4xxx/peripherals/clock.c +++ b/src/arch/stm32l4xxx/peripherals/clock.c @@ -3,14 +3,13 @@ */ #include "arch/stm32l4xxx/peripherals/clock.h" -#include "arch/stm32l4xxx/peripherals/flash.h" - -#include "kern/init.h" #include <stdint.h> -#define TIMEOUT 10000 +#include "arch/stm32l4xxx/peripherals/flash.h" +#include "kern/init.h" +#define TIMEOUT 10000 int pll_off() { @@ -43,7 +42,8 @@ int pll_on() } int configure_pll( - uint8_t pllp_div_factor, pll_divisor_t pllr, /* System clock divisor. */ + uint8_t pllp_div_factor, + pll_divisor_t pllr, /* System clock divisor. */ pll_divisor_t pllq, /* Divison factor for PLL48M1CLK. */ pllp_divisor_t pllp, /* Divison factor for PLLSAI2CLK. */ uint8_t plln, /* PLL numerator. */ @@ -89,12 +89,15 @@ int set_system_clock_MHz(uint8_t mhz) pll_off(); configure_pll( - 0 /* pllp_div_factor */, PLL_DIVISOR_4 /* pllr: VCO / 4 = mhz MHz. */, - PLL_DIVISOR_4 /* pllq: VCO / 4 = mhz MHz */, PLLP_DIVISOR_7 /* pllp */, + 0 /* pllp_div_factor */, + PLL_DIVISOR_4 /* pllr: VCO / 4 = mhz MHz. */, + PLL_DIVISOR_4 /* pllq: VCO / 4 = mhz MHz */, + PLLP_DIVISOR_7 /* pllp */, /* The following set the frequency of VCO to (mhz*4)MHz: mhz * 1 * 4MHz. */ - mhz /* plln | mhz */, PLLM_DIVISOR_1 /* pllm | 01 */, + mhz /* plln | mhz */, + PLLM_DIVISOR_1 /* pllm | 01 */, PLL_SRC_MSI /* pll src | 04 Mhz */); pll_on(); |