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

Dependents:   modular_blinky 20220803GY

ledControl.cpp

Committer:
BaserK
Date:
2015-07-06
Revision:
0:428949329e53
Child:
1:c86dd9e1bb24

File content as of revision 0:428949329e53:

#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;
  }  
}