Basic led control library for the onboard LEDs on the LPC1768.
Dependents: modular_blinky 20220803GY
Diff: ledControl.cpp
- Revision:
- 0:428949329e53
- Child:
- 1:c86dd9e1bb24
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ledControl.cpp Mon Jul 06 07:28:06 2015 +0000 @@ -0,0 +1,25 @@ +#include "ledControl.h" + +DigitalOut led1(LED1); +DigitalOut led2(LED2); +DigitalOut led3(LED3); +DigitalOut led4(LED4); + +// Controls the 4 LEDs on the LPC1768 +void ledControl(int ledNum,int value) +{ + switch(ledNum) + { + case 1: led1.write(value); + break; + + case 2: led2.write(value); + break; + + case 3: led3.write(value); + break; + + case 4: led4.write(value); + break; + } +} \ No newline at end of file