AirsoftTimer software based on mbed
Dependencies: mbed TextLCD keypad
board/Leds.cpp
- Committer:
- sillevl
- Date:
- 2017-02-09
- Revision:
- 27:f29805113454
- Parent:
- 11:50572814f73e
File content as of revision 27:f29805113454:
#include "Leds.h" Leds::Leds(PinName leftPin, PinName rightPin) : leftLed(leftPin), rightLed(rightPin){ off(ALL); } void Leds::on(Leds::LedName ledname){ switch(ledname){ case LEFT: leftLed.write(1); break; case RIGHT: rightLed.write(1); break; case ALL: leftLed.write(1); rightLed.write(1); //break: } } void Leds::off(Leds::LedName ledname){ switch(ledname){ case LEFT: leftLed.write(0); break; case RIGHT: rightLed.write(0); break; case ALL: leftLed.write(0); rightLed.write(0); //break: } }