Mercurial > lcfOS
comparison python/stm32f4/blink.c3 @ 207:8b2f20aae086
cleaning of files
author | Windel Bouwman |
---|---|
date | Sat, 29 Jun 2013 10:05:42 +0200 |
parents | d77cb5962cc5 |
children | 62386bcee1ba |
comparison
equal
deleted
inserted
replaced
206:6c6bf8890d8a | 207:8b2f20aae086 |
---|---|
1 // This file blinks a LED on the STM32F4 discovery board. | |
2 package blink; | |
1 | 3 |
2 // This file blinks a LED on the STM32F4 discovery board. | 4 // import bla |
3 | 5 //type struct TIM2_s { |
4 package blink; | 6 // uint32_t SR; |
7 //}; | |
5 | 8 |
6 // Globals: | 9 // Globals: |
7 var int divider; | 10 var int divider; |
11 //const TIM2_s *TIM2; | |
8 | 12 |
9 // Functions: | 13 // Functions: |
10 function void tim2_handler() | 14 function void tim2_handler() |
11 { | 15 { |
12 divider = 0; | 16 // if (TIM2->SR & TIM_SR_UIF) |
13 /* if (TIM2->SR & TIM_SR_UIF) | 17 if (true) |
14 { | 18 { |
15 divider++; | 19 divider = divider + 1; |
20 /* | |
16 if (divider > 100000) | 21 if (divider > 100000) |
17 { | 22 { |
18 divider = 0; | 23 divider = 0; |
19 GPIOD->ODR ^= (1 << 13); | 24 GPIOD->ODR ^= (1 << 13); |
20 } | 25 } |
26 */ | |
21 } | 27 } |
22 */ | |
23 } | 28 } |
24 | 29 |
25 function void main() | 30 function void main() |
26 { | 31 { |
27 divider = 0; | 32 divider = 0; |