Search Code
About round-robin-rtos

Published 09 Sep 2010.

Last change message: N/A

Import this program

round-robin-rtos

Published 09 Sep 2010, by   user Tim Exton-McGuinness   tag No tags
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers adc.c Source File

adc.c

00001 
00002 #include "globals.h"
00003 
00004 extern "C" void sleep(void);
00005 
00006 //DigitalOut myled4(LED4);
00007 
00008 extern "C" {
00009 void adc(void)
00010 {
00011   LPC_PINCON->PINSEL3 &= 0xffff3fff;    //select p1.23 as normal I/O pin
00012   LPC_GPIO1->FIODIR   |= 0x00800000;    //set direction as output
00013   
00014   while (1) 
00015     {
00016 //        myled4 = !myled4;
00017         LPC_GPIO1->FIOCLR = 0x00800000; //pin off
00018         sleep();
00019         LPC_GPIO1->FIOSET = 0x00800000; //pin on
00020         sleep();
00021     }
00022 }
00023 
00024 
00025 }//end of extern "C"