All GPIO-24 adapter pins have an output data latch. The
GPIO_GET_OUT_VAL command retrieves the values on these
data latches. If a pin is not configured as digital output, the value on the pin may
differ from the value in its output data latch. Use GPIO_GET_VAL command to retrieve the values on the I/O pins.
| Byte 0 | GPIO_GET_OUT_VAL | Command ID (0x04). |
| Byte 1 | ECHO | Echo to associate a command with the response. |
| Byte 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 0x04.
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_OUT_VAL_CMD structure is declared in reports.h file.
GPIO-24 adapter sends GPIO_GET_OUT_VAL response after command execution. The values on output data latches are specified inside the response.
The GPIO_GET_OUT_VAL response returns the values on data
latches. If pin is not configured in output mode, the value on the pin may differ
from the value on its output data latch. Use GPIO_GET_VAL command to retrieve the values currently present on the
I/O pins.
| Byte 0 | GPIO_GET_OUT_VAL | Response ID (0x04). |
| Byte 1 | ECHO | Echo to associate a response with a specific command. |
| Byte 2 | ST | Status of the command execution. |
| Byte 3 | PORT A | Output values on data latches of the GPIO port A pins. |
| Byte 4 | PORT B | Output values on data latches of the GPIO port B pins. |
| Byte 5 | PORT C | Output values on data latches of the GPIO port C pins. |
| Byte 6..7 | Reserved | Reserved |
Response is an 8-byte array of the following format:
Response ID (response type). This byte will contain 0x04.
Echo byte copied from the corresponding command. It is used to associate the response with the specific command.
Status of the command execution:
GPIO_ST_SUCCESS (0x00) – The I/O pins output values were successfully
retrieved.
Output values of the GPIO port A pins.
Output values of the GPIO port B pins.
Output values of the GPIO port C pins.
These bytes are reserved for future usage.
![]() | Warning |
|---|---|
The |
For convenience GPIO_GET_OUT_VAL_RSP structure is declared in reports.h file.