Laurentiu Cocanu - blinking led app for PIC32.
[openocd.git] / testing / examples / PIC32 / BlinkingLeds.c
blobd1647c4592479b218732c1213136faa56ec5b86f
1 #include <plib.h>
2 int main(void)
4 int i;
5 mPORTDClearBits(BIT_0);
6 mPORTDSetPinsDigitalOut(BIT_0);
7 mPORTDClearBits(BIT_1);
8 mPORTDSetPinsDigitalOut(BIT_1);
9 mPORTDClearBits(BIT_2);
10 mPORTDSetPinsDigitalOut(BIT_2);
12 while(1)
14 for(i = 0; i < 500000; i++)
15 mPORTDToggleBits(BIT_0);
16 for(i = 0; i < 500000; i++)
17 mPORTDToggleBits(BIT_1);
18 for(i = 0; i < 500000; i++)
19 mPORTDToggleBits(BIT_2);
22 return 0;