AirsoftTimer software based on mbed

Dependencies:   mbed TextLCD keypad

Committer:
sillevl
Date:
Wed Dec 31 15:27:43 2014 +0000
Revision:
11:50572814f73e
Parent:
4:2c91c9eccf3a
ShowBuzzer;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sillevl 4:2c91c9eccf3a 1 #include "Leds.h"
sillevl 4:2c91c9eccf3a 2
sillevl 4:2c91c9eccf3a 3
sillevl 11:50572814f73e 4 Leds::Leds(PinName leftPin, PinName rightPin) : leftLed(leftPin), rightLed(rightPin){
sillevl 11:50572814f73e 5 off(ALL);
sillevl 11:50572814f73e 6 }
sillevl 11:50572814f73e 7
sillevl 11:50572814f73e 8 void Leds::on(Leds::LedName ledname){
sillevl 11:50572814f73e 9 switch(ledname){
sillevl 11:50572814f73e 10 case LEFT:
sillevl 11:50572814f73e 11 leftLed.write(1);
sillevl 11:50572814f73e 12 break;
sillevl 11:50572814f73e 13 case RIGHT:
sillevl 11:50572814f73e 14 rightLed.write(1);
sillevl 11:50572814f73e 15 break;
sillevl 11:50572814f73e 16 case ALL:
sillevl 11:50572814f73e 17 leftLed.write(1);
sillevl 11:50572814f73e 18 rightLed.write(1);
sillevl 11:50572814f73e 19 //break:
sillevl 11:50572814f73e 20 }
sillevl 11:50572814f73e 21 }
sillevl 11:50572814f73e 22
sillevl 11:50572814f73e 23 void Leds::off(Leds::LedName ledname){
sillevl 11:50572814f73e 24 switch(ledname){
sillevl 11:50572814f73e 25 case LEFT:
sillevl 11:50572814f73e 26 leftLed.write(0);
sillevl 11:50572814f73e 27 break;
sillevl 11:50572814f73e 28 case RIGHT:
sillevl 11:50572814f73e 29 rightLed.write(0);
sillevl 11:50572814f73e 30 break;
sillevl 11:50572814f73e 31 case ALL:
sillevl 11:50572814f73e 32 leftLed.write(0);
sillevl 11:50572814f73e 33 rightLed.write(0);
sillevl 11:50572814f73e 34 //break:
sillevl 11:50572814f73e 35 }
sillevl 4:2c91c9eccf3a 36 }