7.1.3 GPIO_Read Command and its Response
The GPIO_Read command (0x68) reads the logic state of the
specified GPIO pin.
This command is sent through Endpoint 0x04 (OUT). The response is read through Endpoint 0x84 (IN).
| Byte Index | Command | Description | |
|---|---|---|---|
| 0 | 0x68 | Command code | Reads the specified GPIO pin and returns the state |
| 1 |
|
GPIO0 GPIO1 GPIO2 GPIO3 GPIO4 GPIO5 | GPIO pin |
| Byte Index | Response | Description | |
|---|---|---|---|
| 0 | 0x68 | Returns the command code | Returns whether the GPIO_Read command was accepted
along with the pin state |
| 1 |
|
Accepted - success Rejected – not a GPIO pin . |
Accepted, and the pin is read. Rejected because the selected pin is not configured as a GPIO. |
| 2 | 0x00
| The GPIO pin state is LOW. The GPIO pin state is HIGH. | The GPIO pin state |
