Basic Led Library
LED.cpp
- Committer:
- WakoTakeru
- Date:
- 2017-02-18
- Revision:
- 0:ccc1d1ad706f
File content as of revision 0:ccc1d1ad706f:
#include "mbed.h" #include "LED.h" Led::Led(PinName pin):_pin(pin){ _pin = 0; state = false; } void Led::On(){ _pin = 1; state = true; } void Led::Off(){ _pin = 0; state = false; } void Led::Toggle(){ if(state){ Led::Off(); }else{ Led::On(); } }