X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=new_cmsis%2Fmain.c;h=3daf11b277da6ef392c25bd02aa61e77dea8cf92;hb=0163b16211dc58d6619b923b370be8491fb984cb;hp=2c70737f4a6944592f829d614372ae88aabd1f15;hpb=3438bf0abc23eef37e92dfc56cd9410663b35434;p=rapper.git diff --git a/new_cmsis/main.c b/new_cmsis/main.c index 2c70737..3daf11b 100644 --- a/new_cmsis/main.c +++ b/new_cmsis/main.c @@ -8,9 +8,9 @@ * * Copyright (C) 2008 ARM Limited. All rights reserved. * - * ARM Limited (ARM) is supplying this software for use with Cortex-M3 - * processor based microcontrollers. This file can be freely distributed - * within development tools that are supporting such ARM based processors. + * ARM Limited (ARM) is supplying this software for use with Cortex-M3 + * processor based microcontrollers. This file can be freely distributed + * within development tools that are supporting such ARM based processors. * * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF @@ -46,7 +46,7 @@ __inline static void Delay (uint32_t dlyTicks) { *------------------------------------------------------------------------------*/ __inline static void LED_Config(void) { - GPIO1->FIODIR = 0xB0000000; /* LEDs PORT1 are Output */ + GPIO1->FIODIR = (1<<29)|(1<<18); /* LEDs on PORT1 18 & 29 are Output */ } /*------------------------------------------------------------------------------ @@ -75,15 +75,19 @@ int main (void) { if (SysTick_Config(SystemFrequency / 1000)) { /* Setup SysTick Timer for 1 msec interrupts */ while (1); /* Capture error */ } - - LED_Config(); - + + LED_Config(); + while(1) { - LED_On ((1<<28)); /* Turn on the LED. */ + LED_On ((1<<29)); /* Turn on the LED. */ + LED_On ((1<<18)); /* Turn on the LED. */ Delay (100); /* delay 100 Msec */ - LED_Off ((1<<28)); /* Turn off the LED. */ + LED_Off ((1<<29)); /* Turn on the LED. */ + Delay (100); /* delay 100 Msec */ + LED_Off ((1<<18)); /* Turn on the LED. */ + LED_On ((1<<29)); /* Turn on the LED. */ Delay (100); /* delay 100 Msec */ } - + }