TsctlEDIOEdgeCountDesc

From embeddedTS Manuals

This function returns the current value of the specified edge counter for pin number num. If edge is positive, then the value of the positive edge counter is returned. Ifedge is negative, then the value of the negative edge counter is returned. If edge is zero, then the value returned will be the sum of the positive and negative edge counters.

The edge counters always start at zero on power-up and increment until they reach the maximum possible value, at which point on the next edge they roll back over to zero. The maximum possible value for each counter is hardware dependant.

The return value is a 64-bit unsigned integer. This is sufficient to count at 1Ghz for over 584 years before roll-over occurs. However, not all hardware will support this size counter natively. Adapter objects in libtsctl will internally poll the edge counters in order to keep a 64-bit total counter, however these will have the limitation of missing edges if the input signal is changing too fast. How fast is too fast will depend on hardware counter side and to some extent CPU loading.

A value of zero will always be returned if the specified edge counter is not supported by the hardware for the given pin.