From 7f1e75c3a8f7bd4accdbf88a127b24d87131e617 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sun, 13 Nov 2011 09:13:27 +0100 Subject: other/*: Random coding-style fixes. --- examples/stm32/f1/other/systick/systick.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'examples/stm32/f1/other/systick/systick.c') diff --git a/examples/stm32/f1/other/systick/systick.c b/examples/stm32/f1/other/systick/systick.c index 173ff2a..2422d6e 100644 --- a/examples/stm32/f1/other/systick/systick.c +++ b/examples/stm32/f1/other/systick/systick.c @@ -37,11 +37,11 @@ void gpio_setup(void) GPIO_CNF_OUTPUT_PUSHPULL, GPIO7); } -void sys_tick_handler() +void sys_tick_handler(void) { temp32++; - - /* we call this handler every 1ms so 1000ms = 1s on/off */ + + /* We call this handler every 1ms so 1000ms = 1s on/off. */ if (temp32 == 1000) { gpio_toggle(GPIOB, GPIO6); /* LED2 on/off */ temp32 = 0; @@ -50,26 +50,26 @@ void sys_tick_handler() int main(void) { - rcc_clock_setup_in_hse_16mhz_out_72mhz(); + rcc_clock_setup_in_hse_16mhz_out_72mhz(); gpio_setup(); gpio_clear(GPIOB, GPIO7); /* LED1 on */ gpio_set(GPIOB, GPIO6); /* LED2 off */ - + temp32 = 0; /* 72MHz / 8 => 9000000 counts per second */ - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); /* 9000000/9000 = 1000 overflows per second - every 1ms one interrupt */ systick_set_reload(9000); systick_interrupt_enable(); - /* start counting */ + /* Start counting. */ systick_counter_enable(); - - while(1); /* Halt. */ + + while (1); /* Halt. */ return 0; } -- cgit v1.2.3