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.
MyBlinker.cpp
- Committer:
- clemounet
- Date:
- 2015-02-17
- Revision:
- 1:ee7a5f05513d
- Child:
- 2:6cc4c56940af
File content as of revision 1:ee7a5f05513d:
#include "MyBlinker.h"
MyBlinker::MyBlinker(PwmOut *o, int32_t d, float hState, float lState): MyThread("MyBlinker") {
led = o;
delay = d;
highState = hState;
lowState = lState;
}
void MyBlinker::setDelay(int32_t d) {
delay = d;
}
void MyBlinker::setHighState(float hState) {
highState = hState;
}
void MyBlinker::setLowState(float lState) {
lowState = lState;
}
void MyBlinker::Main(void) {
while(running){
led->write(highState);
Wait(delay);
led->write(lowState);
Wait(delay);
}
}