Kentaro Okuda / BlinkingLED
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers BlinkingLED.h Source File

BlinkingLED.h

Go to the documentation of this file.
00001 /**
00002  * @file BlinkingLED.h
00003  * @brief indicator LED class
00004  *
00005  */
00006 
00007 #ifndef BLINKING_LED_H
00008 #define BLINKING_LED_H
00009 
00010 #include "mbed.h"
00011 
00012 class BlinkingLED {
00013 
00014 public:
00015     /**
00016      * @brief constructor.
00017      * @param PinName for LED.
00018      * @param led flip frequency. default: 1hz
00019      */
00020     BlinkingLED(PinName led, uint32_t freqency = 1);
00021     
00022     /**
00023      * @brief flips LED.
00024      */
00025     void flip(void);
00026 
00027 private:
00028     Ticker t;
00029     DigitalOut _led;
00030 
00031     /**
00032      * @brief setting struct
00033      */
00034     typedef struct setting_s {
00035         float time;
00036     } setting_s;
00037 
00038     setting_s setting;
00039 };
00040 
00041 #endif