Functions provided by API-CNT(WDM) driver can be broadly divided into three types: common processing functions, counter mode functions, and sampling mode functions.
The equipped function varies depending on the device.
Please refer to the counter type specification for details.
Common Processing
It is necessary to perform initialization and exit processing for not only counter mode but also sampling mode.
After initialization processing, every function can be used until exit processing is executed.
Counter Mode
In counter mode, it performs usual counter operation of setting counter operation condition first, then starting the counter and reading the count value and the status.
Sampling Mode
Performs periodic sampling using the clock installed in the device.
Set the counter operation condition and sampling operation condition, start the counter, then start sampling to obtain the transition of the count value as sampling data.
It is possible to use counter mode and sampling mode at the same time.
Therefore, the current count value can be confirmed while sampling.