Satoshi Togawa / Mbed 2 deprecated mpod_picasa_photoframe

Dependencies:   BlinkLed HTTPClient EthernetInterface FatFileSystemCpp MSCFileSystem mbed-rtos mbed

Committer:
togayan
Date:
Tue Aug 28 14:41:17 2012 +0000
Revision:
5:66c3398a14c9
Parent:
0:dfd5cfea7112
Large RSS can be read.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
togayan 5:66c3398a14c9 1 /* BlinkLed.h */
togayan 5:66c3398a14c9 2 #ifndef BLINKLED_H_
togayan 5:66c3398a14c9 3 #define BLINKLED_H_
togayan 5:66c3398a14c9 4
togayan 5:66c3398a14c9 5 #include "mbed.h"
togayan 5:66c3398a14c9 6 #include "rtos.h"
togayan 5:66c3398a14c9 7
togayan 5:66c3398a14c9 8 /** LED which blinks automatically with RTOS
togayan 5:66c3398a14c9 9 */
togayan 5:66c3398a14c9 10 class BlinkLed
togayan 5:66c3398a14c9 11 {
togayan 5:66c3398a14c9 12 public:
togayan 5:66c3398a14c9 13 /** Constructor
togayan 5:66c3398a14c9 14 */
togayan 5:66c3398a14c9 15 BlinkLed(PinName pin, float dutyChangeStep, const char* name = NULL);
togayan 5:66c3398a14c9 16
togayan 5:66c3398a14c9 17 /** Destructor
togayan 5:66c3398a14c9 18 */
togayan 5:66c3398a14c9 19 ~BlinkLed();
togayan 5:66c3398a14c9 20
togayan 5:66c3398a14c9 21 /** Start biinking
togayan 5:66c3398a14c9 22 */
togayan 5:66c3398a14c9 23 void startBlink();
togayan 5:66c3398a14c9 24
togayan 5:66c3398a14c9 25 /** Finish biinking
togayan 5:66c3398a14c9 26 */
togayan 5:66c3398a14c9 27 void finishBlink();
togayan 5:66c3398a14c9 28
togayan 5:66c3398a14c9 29 private:
togayan 5:66c3398a14c9 30 /** Copy constructor
togayan 5:66c3398a14c9 31 * Disable because it is only declaration
togayan 5:66c3398a14c9 32 */
togayan 5:66c3398a14c9 33 BlinkLed(const BlinkLed&);
togayan 5:66c3398a14c9 34
togayan 5:66c3398a14c9 35 /** Copy assignment operators
togayan 5:66c3398a14c9 36 * Disable because it is only declaration
togayan 5:66c3398a14c9 37 */
togayan 5:66c3398a14c9 38 BlinkLed& operator=(const BlinkLed&);
togayan 5:66c3398a14c9 39
togayan 5:66c3398a14c9 40 /** Function for blinking
togayan 5:66c3398a14c9 41 * This function will be bind to new thread
togayan 5:66c3398a14c9 42 */
togayan 5:66c3398a14c9 43 static void blink(void const *argument);
togayan 5:66c3398a14c9 44
togayan 5:66c3398a14c9 45 /** Target Led
togayan 5:66c3398a14c9 46 */
togayan 5:66c3398a14c9 47 PwmOut led;
togayan 5:66c3398a14c9 48
togayan 5:66c3398a14c9 49 /** Duty ratio step of changing every 20ms
togayan 5:66c3398a14c9 50 */
togayan 5:66c3398a14c9 51 float dutyChangeStep;
togayan 5:66c3398a14c9 52
togayan 5:66c3398a14c9 53 /** Flag of Continue Blink
togayan 5:66c3398a14c9 54 */
togayan 5:66c3398a14c9 55 bool continueBlink;
togayan 5:66c3398a14c9 56
togayan 5:66c3398a14c9 57 /** Pointer to thread for blinking
togayan 5:66c3398a14c9 58 */
togayan 5:66c3398a14c9 59 Thread* thread;
togayan 5:66c3398a14c9 60 };
togayan 5:66c3398a14c9 61
togayan 5:66c3398a14c9 62 #endif /* BLINKLED_H_ */