Mercurial > lcfOS
view examples/c3/blink.c3 @ 392:bb4289c84907
Added some sort of drop event test
author | Windel Bouwman |
---|---|
date | Fri, 16 May 2014 13:05:10 +0200 |
parents | 158068af716c |
children |
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 */ module blink; import stm32f4xx; // Functions: function void main() { // Memory mapped control registers: var GPIO_Type GPIOD; GPIOD = cast<GPIO_Type>(0x40020C00); var RCC_Type RCC; RCC = cast<RCC_Type>(0x40023800); // Enable the clock to port D: RCC->AHB1ENR = RCC->AHB1ENR | 0x8; // PD13 == output (01) GPIOD->MODER = (1 << 26); GPIOD->ODR = (1 << 13); while(true) {} }