Mercurial > lcfOS
comparison python/c3/examples/burn2.c3 @ 279:2ccd57b1d78c
Fix register allocator to do burn2 OK
author | Windel Bouwman |
---|---|
date | Sat, 12 Oct 2013 09:56:23 +0200 |
parents | cf7d5fb7d9c8 |
children | 02385f62f250 |
comparison
equal
deleted
inserted
replaced
278:9fca39eebe50 | 279:2ccd57b1d78c |
---|---|
22 GPIOD = cast<GPIO_Type>(0x40020C00); | 22 GPIOD = cast<GPIO_Type>(0x40020C00); |
23 | 23 |
24 var int pin; | 24 var int pin; |
25 pin = 15; | 25 pin = 15; |
26 // PD13 == output (01) | 26 // PD13 == output (01) |
27 GPIOD->MODER = (1 << (pin * 2)); | 27 GPIOD->MODER = (1 << (pin << 1)); |
28 GPIOD->ODR = (1 << pin); | 28 GPIOD->ODR = (1 << pin); |
29 } | 29 } |
30 | 30 |
31 | 31 |
32 function void main() | 32 function void main() |