first
Dependents: 17robo_fuzi 17robo_tokyo_kaede
Diff: cyclic_io.h
- Revision:
- 0:3555e86bf40d
- Child:
- 1:e0bcbeb71a97
diff -r 000000000000 -r 3555e86bf40d cyclic_io.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cyclic_io.h Wed Sep 20 07:09:50 2017 +0000 @@ -0,0 +1,33 @@ +/* + * [CyclicIo] + * **任意の0/1状態(sbdbtのボタン)を受け渡すことで、指定のIOをサイクリックする + * + * [Public Member Functions] + * CyclicIo(PinName pin) + * **<Create> 宣言 + * + * cyclic(<int> state) + * **<int> (ボタン等の)0/1で状態を入力 + * + * getState() + * **<int> サイクリックの状態を出力 + */ + +#ifndef MBED_CYCLIC_IO_H +#define MBED_CYCLIC_IO_H + +#include "mbed.h" + +class CyclicIo +{ + public: + CyclicIo(PinName pin); + void cyclic(int state); + int getState(); + + private: + DigitalOut gpio; + bool flag; +}; + +#endif \ No newline at end of file