Kentaro Okuda / BlinkingLED
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers BlinkingLED.cpp Source File

BlinkingLED.cpp

Go to the documentation of this file.
00001 /**
00002  * @file BlinkingLED.cpp
00003  */
00004 
00005 #include "BlinkingLED.h"
00006 
00007 BlinkingLED::BlinkingLED(PinName led, uint32_t frequency) : _led(led) {
00008     setting.time = 1.0f / frequency;
00009     t.attach(callback(this, &BlinkingLED::flip), setting.time);
00010 }
00011 
00012 void BlinkingLED::flip(void) {
00013     _led = !_led;
00014 }