mFrame
載入中...
搜尋中...
無符合項目
PulseWidth.h
1
6#ifndef MFRAME_43857172_A41F_4211_809F_A275C99741DE
7#define MFRAME_43857172_A41F_4211_809F_A275C99741DE
8
9/* ***************************************************************************************
10 * Include
11 */
12
13//----------------------------------------------------------------------------------------
14
15//----------------------------------------------------------------------------------------
16#include "./../Base.h"
17
18/* ***************************************************************************************
19 * Namespace
20 */
21namespace hal::counter {
22 struct PulseWidth;
23} // namespace hal::counter
24
25/* ***************************************************************************************
26 * Class/Interface/Struct/Enum
27 */
28
38 /* *************************************************************************************
39 * Class/Interface/Struct/Enum
40 */
41 struct Channel;
42
43 /* *************************************************************************************
44 * Method
45 */
46
53 virtual int setPeriod(float hz) abstract;
54
62 virtual bool setPercent(int channel, float percent) abstract;
63
71 virtual bool getPercent(int channel, float& result) abstract;
72
79 virtual bool start(bool enable) abstract;
80};
81
91 /* *************************************************************************************
92 * Method
93 */
94
101 virtual bool setPercent(float percent) abstract;
102
109 virtual bool getPeriod(float& result) abstract;
110};
111
112/* ***************************************************************************************
113 * End of file
114 */
115#endif /* MFRAME_43857172_A41F_4211_809F_A275C99741DE */
Definition AdvancedTimer.h:22
[Interface] 硬體抽象層基礎介面
Definition Base.h:38
[Interface] 脈寬計數器通道介面定義
Definition PulseWidth.h:90
virtual bool setPercent(float percent) override
設定脈寬百分比
virtual bool getPeriod(float &result) override
取得脈寬週期
[Interface] 脈寬計數器介面定義
Definition PulseWidth.h:37
virtual bool setPercent(int channel, float percent) override
設定指定通道的脈寬百分比
virtual bool start(bool enable) override
啟動或停止計數器
virtual int setPeriod(float hz) override
設定計數器週期
virtual bool getPercent(int channel, float &result) override
取得指定通道的脈寬百分比