GPIO-24 adapter can send GPIO_EV_FR_CNT event to your application.
The GPIO_EV_FR_CNT event returns the following information:
|Byte 0||GPIO_EV_FR_CNT||Event ID (0x85).|
|Byte 1||CNT||CNT is incremented each time after the event arises.|
|Byte 2||FREQUENCY||Current frequency in Hz (least significant byte)|
|Byte 3||FREQUENCY||Current frequency in Hz (middle byte)|
|Byte 4||FREQUENCY||Current frequency in Hz (most significant byte)|
|Byte 5||FR_CNT_NUMBER||ID number of the frequency counter, from which frequency has been retrieved.|
Event is an 8-byte array of the following format:
- Byte 0: GPIO_EV_FR_CNT (0x85)
Event ID (response type). Should be set to 0x85
- Byte 1: CNT
CNT byte value is incremented each time when any event arises.
- Byte 2..4: FREQUENCY
The current frequency in Hz.
Byte 2: FREQUENCY – least significant byte (low byte) of frequency.
Byte 3: FREQUENCY – middle byte of frequency.
Byte 4: FREQUENCY – most significant byte (high byte) of frequency.
- Byte 5: FR_CNT_NUMBER
The ID number of the frequency counter, from which current frequency has been retrieved:
0 – frequency counter on A.3 pin;
1 – frequency counter on A.4 pin.
- Bytes 6..7: Reserved
These bytes are reserved for future usage.
For convenience GPIO_EV_FR_CNT structure is declared in reports.h file.