first

Dependents:   17robo_fuzi 17robo_tokyo_kaede

cyclic_io.h

Committer:
echo_piyo
Date:
2017-09-20
Revision:
0:3555e86bf40d
Child:
1:e0bcbeb71a97

File content as of revision 0:3555e86bf40d:

/*
 * [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