#include <7040S.H>
#include "encCtrl.h"

Go to the source code of this file.
Functions | |
| void | initEnc (void) |
| エンコーダデバイスの初期化 | |
| void | initEncInfo (const unsigned char id, encInfo_t *enc) |
| エンコーダ制御用の構造体を初期化 | |
| void | updateEncDiff (encInfo_t *enc) |
| エンコーダ値を更新する | |
| int | getEncDiff (encInfo_t *enc) |
| エンコーダ値の変位を取得する | |
$Id$
Definition in file encCtrl.c.
| void initEncInfo | ( | const unsigned char | id, | |
| encInfo_t * | enc | |||
| ) |
エンコーダ制御用の構造体を初期化
エンコーダ制御用の構造体のメンバ変数を初期化する。
| id | [i] エンコーダデバイスID | |
| enc | [o] エンコーダ制御用の構造体 |
Definition at line 70 of file encCtrl.c.
References encInfo_t::diff, ENC_CW_TO_PLUSE, encInfo_t::enc_direction, encInfo_t::id, encInfo_t::prev, and encInfo_t::total.
| void updateEncDiff | ( | encInfo_t * | enc | ) |
エンコーダ値を更新する
エンコーダ値の変位量を更新する
| enc | [i/o] エンコーダ制御用の構造体 |
Definition at line 88 of file encCtrl.c.
References encInfo_t::diff, encInfo_t::enc_direction, encInfo_t::id, encInfo_t::prev, and encInfo_t::total.
| int getEncDiff | ( | encInfo_t * | enc | ) |
エンコーダ値の変位を取得する
前回の制御周期におけるエンコーダ値の変位量をエンコーダ制御用の構造体に格納すると同時に、返り値として返す。
| enc | [i/o] エンコーダ制御用の構造体 |
| エンコーダの変位量 |
Definition at line 105 of file encCtrl.c.
References encInfo_t::diff.
1.5.7.1