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.
Fork of BlinkLed by
BlinkLed.cpp
00001 #include "BlinkLed.h" 00002 00003 BlinkLed::BlinkLed(PinName pin, int n) : 00004 led(pin), 00005 n(n) 00006 { 00007 } 00008 00009 BlinkLed::~BlinkLed() 00010 { 00011 } 00012 00013 void BlinkLed::startBlink() 00014 { 00015 thread = new Thread(blink, this); 00016 } 00017 00018 void BlinkLed::blink(void const *argument) 00019 { 00020 BlinkLed* self = (BlinkLed*)argument; 00021 00022 while(1) 00023 { 00024 self->led = !self->led; 00025 Thread::wait(self->n); 00026 } 00027 }
Generated on Mon Jul 18 2022 19:54:30 by
1.7.2
