first
Dependents: 17robo_fuzi 17robo_tokyo_kaede
Diff: cyclic_var.h
- Revision:
- 0:2cff474c9122
diff -r 000000000000 -r 2cff474c9122 cyclic_var.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cyclic_var.h Wed Sep 20 07:09:40 2017 +0000 @@ -0,0 +1,29 @@ +/* + * [CyclicVar] + * **任意の<int>0/1状態(sbdbtのボタン)を受け渡すことで、サイクリックし状態を<int>で返す + * + * [Public Member Functions] + * CyclicVar(PinName pin) + * **<Create> 宣言 + * int cyclic(int state) + * **0/1で状態を入力 + * int getState() + * **サイクリックの状態を出力 + */ + +#ifndef MBED_CYCLIC_VAR_H +#define MBED_CYCLIC_VAR_H + +#include "mbed.h" + +class CyclicVar{ + public: + void cyclic(int state_in); + int getState(); + + private: + bool flag; + bool state; +}; + +#endif \ No newline at end of file