Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: 17robo_fuzi 17robo_tokyo_kaede
cylinder.h
- Committer:
- echo_piyo
- Date:
- 2017-09-28
- Revision:
- 1:d4fa6f96bab5
- Parent:
- 0:46dd0245886c
File content as of revision 1:d4fa6f96bab5:
/*
* [Cylinder]
* **シリンダ用クラス IOを2つ指定しサイクリックで出力を変更する
* **
*
* [Public Member Functions]
* Cylinder(PinName pin_in,PinName pin_out);
* **<Create> 宣言
* void cyclic(int state)
* **シリンダの出力切り替え
* **stateに1が入力されるたび、出力が切り替わる
* int getInState()
* **シリンダ[Pin_in]の状態取得
* int getOutState()
* **シリンダ[Pin_out]の状態取得
*/
#ifndef MBED_CYLINDER_H
#define MBED_CYLINDER_H
#include "mbed.h"
class Cylinder
{
public:
Cylinder(PinName pin_in,PinName pin_out);
void cyclic(int state);
int getInState();
int getOutState();
void cyclicIn();
void cyclicOut();
private:
DigitalOut cylinder_in;
DigitalOut cylinder_out;
bool flag;
};
#endif