Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ledlib.cpp
- Committer:
- robarzangana
- Date:
- 2020-07-08
- Revision:
- 0:f2dd1916acde
File content as of revision 0:f2dd1916acde:
#include "ledlib.h"
LED::LED(PinName pin): LED0(pin){
LED0 = false;
};
void LED::on(){
LED0 = true;
};
void LED::off(){
LED0 = false;
};
void LED::toggle(){
LED0 = !LED0;
};
void LED::blink(float sec){
LED0 = !LED0;
wait(sec);
LED0 = !LED0;
}