Basic Led Library

Committer:
WakoTakeru
Date:
Sat Feb 18 04:11:45 2017 +0000
Revision:
0:ccc1d1ad706f
Basic Led Library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
WakoTakeru 0:ccc1d1ad706f 1 #ifndef __LED_H__
WakoTakeru 0:ccc1d1ad706f 2 #define __LED_H__
WakoTakeru 0:ccc1d1ad706f 3 #include "mbed.h"
WakoTakeru 0:ccc1d1ad706f 4 class Led{
WakoTakeru 0:ccc1d1ad706f 5 private:
WakoTakeru 0:ccc1d1ad706f 6 DigitalOut _pin;
WakoTakeru 0:ccc1d1ad706f 7 bool state;
WakoTakeru 0:ccc1d1ad706f 8 public:
WakoTakeru 0:ccc1d1ad706f 9 Led(PinName pin);
WakoTakeru 0:ccc1d1ad706f 10 void On();
WakoTakeru 0:ccc1d1ad706f 11 void Off();
WakoTakeru 0:ccc1d1ad706f 12 void Toggle();
WakoTakeru 0:ccc1d1ad706f 13 };
WakoTakeru 0:ccc1d1ad706f 14 #endif