Mercurial > lcfOS
view python/stm32f4/burn.c3 @ 254:bd26dc13f270
Added logger
author | Windel Bouwman |
---|---|
date | Wed, 31 Jul 2013 21:20:58 +0200 |
parents | 6ed3d3a82a63 |
children | 225f444019b1 |
line wrap: on
line source
/* This file blinks a LED on the STM32F4 discovery board. the board has 4 leds on PD12, PD13, PD14 and PD15 */ package burn; import stm32f4xx; function void init() { } function void main() { //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; // PD13 == output (01) GPIOD->MODER = (1 << (pin << 1)); GPIOD->ODR = (1 << pin); while(true) {} }