diff python/stm32f4/blink.c3 @ 219:1fa3e0050b49

Expanded ad hoc code generator
author Windel Bouwman
date Sat, 06 Jul 2013 12:38:09 +0200
parents 62386bcee1ba
children 3f6c30a5d234
line wrap: on
line diff
--- a/python/stm32f4/blink.c3	Fri Jul 05 15:30:22 2013 +0200
+++ b/python/stm32f4/blink.c3	Sat Jul 06 12:38:09 2013 +0200
@@ -17,7 +17,7 @@
     if (true)
 	{
 		divider = divider + 1;
-		if (divider > 100000)
+		if (divider == 100000)
 		{
 			divider = 0;
 			//GPIOD->ODR ^= (1 << 13);
@@ -28,6 +28,9 @@
 function void main()
 {
     divider = 0;
+
+    var int* RCC_AHB1ENR;
+    RCC_AHB1ENR = 0x40003022;
     /*
 	RCC->AHB1ENR |= RCC_AHB1ENR_GPIODEN;
 	RCC->APB1ENR |= RCC_APB1ENR_TIM2EN;