Use RCC_CFGR_SW helper function to set software clock
This commit is contained in:
11
build/main.i
11
build/main.i
@@ -2302,8 +2302,7 @@ static void system_clock_init(void) {
|
||||
((struct rcc *) (0x40023800U))->CFGR |= ((0x0111) << 0);
|
||||
|
||||
|
||||
((struct rcc *) (0x40023800U))->CFGR &= ~((0b11) << 0);
|
||||
((struct rcc *) (0x40023800U))->CFGR |= ((0b10) << 0);
|
||||
((struct rcc *) (0x40023800U))->CFGR |= (((0b10) & (0b11)) << 0);
|
||||
|
||||
|
||||
|
||||
@@ -2322,13 +2321,13 @@ int main(void) {
|
||||
|
||||
uint16_t counter = ((struct timer *) (0x40000800U))->CNT;
|
||||
|
||||
# 87 "src/main.c" 3 4
|
||||
# 86 "src/main.c" 3 4
|
||||
_Bool
|
||||
# 87 "src/main.c"
|
||||
# 86 "src/main.c"
|
||||
led_on =
|
||||
# 87 "src/main.c" 3 4
|
||||
# 86 "src/main.c" 3 4
|
||||
((_Bool)+0u)
|
||||
# 87 "src/main.c"
|
||||
# 86 "src/main.c"
|
||||
;
|
||||
while(1) {
|
||||
if ((((struct timer *) (0x40000800U))->CNT - counter) >= 250) {
|
||||
|
||||
Reference in New Issue
Block a user