diff python/stm32f4/burn.c3 @ 251:6ed3d3a82a63

Added another c3 example. First import attempt
author Windel Bouwman
date Mon, 29 Jul 2013 20:23:13 +0200
parents ce6d390043a7
children 225f444019b1
line wrap: on
line diff
--- a/python/stm32f4/burn.c3	Sun Jul 28 19:07:51 2013 +0200
+++ b/python/stm32f4/burn.c3	Mon Jul 29 20:23:13 2013 +0200
@@ -6,48 +6,25 @@
 
 */
 
-package blink;
+package burn;
 
-type struct {
-    int MODER;
-    int OTYPER;
-    int OSPEEDR;
-    int PUPDR;
-    int IDR;
-    int ODR;
-}* GPIO_Type;
+import stm32f4xx;
 
-type struct {
-    int CR;
-    int PLLCFGR;
-    int CFGR;
-    int CIR;
-    int AHB1RSTR;
-    int AHB2RSTR;
-    int AHB3RSTR;
-    int reserved0;
-    int APB1RSTR;
-    int APB2RSTR;
-    int reserved1a, reserved1b;
-    int AHB1ENR;
-    int AHB2ENR;
-    int AHB3ENR;
-    int reserved2;
-    int APB1ENR, APB2ENR;
-}* RCC_Type;
+function void init()
+{
+}
 
-
-// Functions:
 function void main()
 {
-    // Memory mapped control registers:
-    var GPIO_Type GPIOD;
-    GPIOD = cast<GPIO_Type>(0x40020C00);
+    //init();
     var RCC_Type RCC;
     RCC = cast<RCC_Type>(0x40023800);
 
     // Enable the clock to port D:
     RCC->AHB1ENR = RCC->AHB1ENR | (1 << 3);
+    // Memory mapped control registers:
+    var GPIO_Type GPIOD;
+    GPIOD = cast<GPIO_Type>(0x40020C00);
 
     var int pin;
     pin = 15;