teamALI
/
HB2018
ジャイロ追加前
Diff: typedef.h
- Revision:
- 50:76413e8e073d
- Parent:
- 48:71aec693a7dc
- Child:
- 57:56b7e66a0c3d
--- a/typedef.h Mon Feb 25 12:51:35 2019 +0000 +++ b/typedef.h Tue Feb 26 08:44:06 2019 +0000 @@ -96,6 +96,18 @@ }typUserSw; /** + * @typedef typSwCounter + * @brief ユーザースイッチ(ハンドル)のチャタリング防止用カウンターとフラグの共用体 + */ +typedef union{ + UINT16 w; + struct{ + bool flg : 1; //!< SW押されたフラグ + UINT16 cnt : 15; //!< カウンター + }bf; +}typSwCounter; + +/** * @enum ePIDMode * @brief 使用するPIDアルゴリズムと実行のON/OFFを表すENUM */