Basic led control library for the onboard LEDs on the LPC1768.

Dependents:   modular_blinky 20220803GY

Committer:
BaserK
Date:
Mon Jul 06 07:28:06 2015 +0000
Revision:
0:428949329e53
Child:
1:c86dd9e1bb24
First Release

Who changed what in which revision?

UserRevisionLine numberNew contents of line
BaserK 0:428949329e53 1 #include "ledControl.h"
BaserK 0:428949329e53 2
BaserK 0:428949329e53 3 DigitalOut led1(LED1);
BaserK 0:428949329e53 4 DigitalOut led2(LED2);
BaserK 0:428949329e53 5 DigitalOut led3(LED3);
BaserK 0:428949329e53 6 DigitalOut led4(LED4);
BaserK 0:428949329e53 7
BaserK 0:428949329e53 8 // Controls the 4 LEDs on the LPC1768
BaserK 0:428949329e53 9 void ledControl(int ledNum,int value)
BaserK 0:428949329e53 10 {
BaserK 0:428949329e53 11 switch(ledNum)
BaserK 0:428949329e53 12 {
BaserK 0:428949329e53 13 case 1: led1.write(value);
BaserK 0:428949329e53 14 break;
BaserK 0:428949329e53 15
BaserK 0:428949329e53 16 case 2: led2.write(value);
BaserK 0:428949329e53 17 break;
BaserK 0:428949329e53 18
BaserK 0:428949329e53 19 case 3: led3.write(value);
BaserK 0:428949329e53 20 break;
BaserK 0:428949329e53 21
BaserK 0:428949329e53 22 case 4: led4.write(value);
BaserK 0:428949329e53 23 break;
BaserK 0:428949329e53 24 }
BaserK 0:428949329e53 25 }