first

Dependents:   17robo_fuzi 17robo_tokyo_kaede

Committer:
echo_piyo
Date:
Thu Sep 28 02:24:05 2017 +0000
Revision:
1:e0bcbeb71a97
Parent:
0:3555e86bf40d
.cyclicOn().cyclicOff() ???????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
echo_piyo 0:3555e86bf40d 1 /*
echo_piyo 0:3555e86bf40d 2 * [CyclicIo]
echo_piyo 0:3555e86bf40d 3 * **任意の0/1状態(sbdbtのボタン)を受け渡すことで、指定のIOをサイクリックする
echo_piyo 0:3555e86bf40d 4 *
echo_piyo 0:3555e86bf40d 5 * [Public Member Functions]
echo_piyo 0:3555e86bf40d 6 * CyclicIo(PinName pin)
echo_piyo 0:3555e86bf40d 7 * **<Create> 宣言
echo_piyo 0:3555e86bf40d 8 *
echo_piyo 0:3555e86bf40d 9 * cyclic(<int> state)
echo_piyo 0:3555e86bf40d 10 * **<int> (ボタン等の)0/1で状態を入力
echo_piyo 0:3555e86bf40d 11 *
echo_piyo 0:3555e86bf40d 12 * getState()
echo_piyo 0:3555e86bf40d 13 * **<int> サイクリックの状態を出力
echo_piyo 0:3555e86bf40d 14 */
echo_piyo 0:3555e86bf40d 15
echo_piyo 0:3555e86bf40d 16 #ifndef MBED_CYCLIC_IO_H
echo_piyo 0:3555e86bf40d 17 #define MBED_CYCLIC_IO_H
echo_piyo 0:3555e86bf40d 18
echo_piyo 0:3555e86bf40d 19 #include "mbed.h"
echo_piyo 0:3555e86bf40d 20
echo_piyo 0:3555e86bf40d 21 class CyclicIo
echo_piyo 0:3555e86bf40d 22 {
echo_piyo 0:3555e86bf40d 23 public:
echo_piyo 0:3555e86bf40d 24 CyclicIo(PinName pin);
echo_piyo 0:3555e86bf40d 25 void cyclic(int state);
echo_piyo 0:3555e86bf40d 26 int getState();
echo_piyo 1:e0bcbeb71a97 27 void cyclicOn();
echo_piyo 1:e0bcbeb71a97 28 void cyclicOff();
echo_piyo 0:3555e86bf40d 29
echo_piyo 0:3555e86bf40d 30 private:
echo_piyo 0:3555e86bf40d 31 DigitalOut gpio;
echo_piyo 0:3555e86bf40d 32 bool flag;
echo_piyo 0:3555e86bf40d 33 };
echo_piyo 0:3555e86bf40d 34
echo_piyo 0:3555e86bf40d 35 #endif