Mercurial > lcfOS
comparison python/stm32f4/burn.c3 @ 241:ce6d390043a7 burnchain
Added reset and run at end of flashing
author | Windel Bouwman |
---|---|
date | Mon, 22 Jul 2013 22:56:21 +0200 |
parents | 81752b0f85a5 |
children | 6ed3d3a82a63 |
comparison
equal
deleted
inserted
replaced
240:6259856841a0 | 241:ce6d390043a7 |
---|---|
1 /* | 1 /* |
2 | 2 |
3 This file blinks a LED on the STM32F4 discovery board. | 3 This file blinks a LED on the STM32F4 discovery board. |
4 | 4 |
5 the board has 4 leds on PD12, PD13, PD14 and PD15 | 5 the board has 4 leds on PD12, PD13, PD14 and PD15 |
6 | 6 |
48 | 48 |
49 // Enable the clock to port D: | 49 // Enable the clock to port D: |
50 RCC->AHB1ENR = RCC->AHB1ENR | (1 << 3); | 50 RCC->AHB1ENR = RCC->AHB1ENR | (1 << 3); |
51 | 51 |
52 var int pin; | 52 var int pin; |
53 pin = 13; | 53 pin = 15; |
54 // PD13 == output (01) | 54 // PD13 == output (01) |
55 GPIOD->MODER = (1 << (pin << 1)); | 55 GPIOD->MODER = (1 << (pin << 1)); |
56 GPIOD->ODR = (1 << pin); | 56 GPIOD->ODR = (1 << pin); |
57 | 57 |
58 while(true) {} | 58 while(true) {} |