The GPIO_GET_CMP_VAL command retrieves the comparison results of GPIO-24 adaptor comparators COMP0 and COMP1.
| Byte 0 | GPIO_GET_CMP_VAL | Command ID (0x22). |
| Byte 1 | ECHO | Echo to associate a command with the response. |
| Bytes 2..7 | Reserved | Reserved (must be 0). |
Command is an 8-byte array of the following format:
This byte contains command ID (command type). It should be set to 0x22.
This byte is used to associate a response received from GPIO-24 adapter with a specific command. Response will contain exactly the same value in its echo byte.
These bytes are reserved for future usage and must be set to 0.
For convenience GPIO_GET_CMP_VAL_CMD structure is declared in reports.h file.
GPIO-24 adapter sends GPIO_GET_CMP_VAL response after command execution. The results of comparison for GPIO-24 adaptor comparators COMP0 and COMP1 are specified inside the response.
| Byte 0 | GPIO_GET_CMP_VAL | Response ID (0x22). |
| Byte 1 | ECHO | Echo to associate a response with a specific command. |
| Byte 2 | ST | Status of the command execution. |
| Byte 3 | CMP_0_OUT | The result of comparison for CMP0 comparator. |
| Byte 4 | CMP_1_OUT | The result of comparison for CMP1 comparator. |
| Byte 5..7 | Reserved | Reserved |
Response is an 8-byte array of the following format:
Response ID (response type). This byte will contain 0x22.
This byte is used to associate a response received from GPIO-24 adapter with a specific command. Response will contain exactly the same value in its echo byte.
Status of the command execution.
The result of comparison for CMP0 comparator.
The comparator output can be inverted with Bit 5: CMP0_INV in Byte 2: CMP_CFG of GPIO_SET_CMP_CFG command.
If CMP0_INV = 1, CMP0 comparator output is inverted:
1, if VIN+ < VIN-;
0, if VIN+ > VIN-.
1, if VIN+ > VIN-;
0, if VIN+ < VIN-.
The result of comparison for CMP1 comparator.
The comparator output can be inverted with Bit 4: CMP1_INV in Byte 2: CMP_CFG of GPIO_SET_CMP_CFG command.
If CMP1_INV = 1, CMP1 comparator output is inverted:
1, if VIN+ < VIN-;
0, if VIN+ > VIN-.
1, if VIN+ > VIN-;
0, if VIN+ < VIN-.
These bytes are reserved for future usage.