Tim Exton-McGuinness
/
round-robin-rtos
Round robin Scheduler
Diff: adc.c
- Revision:
- 0:cf2d4c337b6f
diff -r 000000000000 -r cf2d4c337b6f adc.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/adc.c Thu Sep 09 14:09:14 2010 +0000 @@ -0,0 +1,25 @@ + +#include "globals.h" + +extern "C" void sleep(void); + +//DigitalOut myled4(LED4); + +extern "C" { +void adc(void) +{ + LPC_PINCON->PINSEL3 &= 0xffff3fff; //select p1.23 as normal I/O pin + LPC_GPIO1->FIODIR |= 0x00800000; //set direction as output + + while (1) + { +// myled4 = !myled4; + LPC_GPIO1->FIOCLR = 0x00800000; //pin off + sleep(); + LPC_GPIO1->FIOSET = 0x00800000; //pin on + sleep(); + } +} + + +}//end of extern "C" \ No newline at end of file