comparison test/c3examples/burn2.c3 @ 287:1c7c1e619be8

File movage
author Windel Bouwman
date Thu, 21 Nov 2013 11:57:27 +0100
parents 05184b95fa16
children bd2593de3ff8
comparison
equal deleted inserted replaced
286:d9df72971cbf 287:1c7c1e619be8
20 if (pin < 12) 20 if (pin < 12)
21 { 21 {
22 return; 22 return;
23 } 23 }
24 24
25 /*if (pin > 15) 25 if (pin > 15)
26 { 26 {
27 return; 27 return;
28 }*/ 28 }
29 29
30 var RCC_Type RCC; 30 var stm32f4xx.RCC_Type RCC;
31 RCC = cast<RCC_Type>(0x40023800); 31 RCC = cast<RCC_Type>(0x40023800);
32 32
33 // Enable the clock to port D: 33 // Enable the clock to port D:
34 RCC->AHB1ENR = RCC->AHB1ENR | (1 << 3); 34 RCC->AHB1ENR = RCC->AHB1ENR | (1 << 3);
35 // Memory mapped control registers: 35 // Memory mapped control registers:
49 49
50 var int a; 50 var int a;
51 a = 0 51 a = 0
52 while (a < 1000) 52 while (a < 1000)
53 { 53 {
54 a = a + 1; 54 a = add(a, 1);
55 } 55 }
56 56
57 while(true) {} 57 while(true) {}
58 } 58 }
59 59