Fredrik Kåhre / Mbed 2 deprecated labb2_task3

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers led.h Source File

led.h

00001 #ifndef LED_H
00002 #define LED_H
00003 
00004 #include "mbed.h"
00005 
00006 class led{
00007     public:
00008         led(PinName name);
00009         
00010         /**
00011         *turn on led
00012         */
00013         void on();
00014         
00015         /**
00016         *turn of led
00017         */
00018         void off();
00019         
00020         /**
00021         * toggles state of led
00022         */
00023         void toggle();
00024         
00025         /**
00026         *make led blink once, given a duraiton in seconds
00027         */
00028         void blink(int time);
00029         
00030     private:
00031     
00032         /**
00033         *the led on the board
00034         */
00035         DigitalOut myled;
00036     
00037 };
00038 
00039 
00040 
00041 #endif
00042 
00043