You are here

GPIO_GET_PULL_UPS (0x1A)

The GPIO_GET_PULL_UPS command allows to retrieve the state (on/off) of the weak pull-up resistors.

GPIO_GET_PULL_UPS Command

Go to Response

Byte 0 GPIO_GET_PULL_UPS Command ID (0x1A).
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:

Byte 0: GPIO_GET_PULL_UPS (0x1A)

This byte contains command ID (command type). It should be set to 0x1A.

Byte 1: ECHO

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.

Bytes 2..7: Reserved

These bytes are reserved for future usage and must be set to 0.

 

For convenience GPIO_GET_PULL_UPS_CMD structure is declared in reports.h file.

GPIO-24 adapter sends GPIO_GET_PULL_UPS response after command execution. The weak pull-ups state (on/off) is specified inside the response.

GPIO_GET_PULL_UPS Response

Go to Command

 

Byte 0 GPIO_GET_PULL_UPS Response ID (0x1A).
Byte 1 ECHO Echo to associate a command with the response
Byte 2 ST Status of the command execution
Byte 3 PINS_GROUP1 State (on/off) of the weak pull-ups for the first group of pins
Byte 4 PINS_GROUP2 State (on/off) of the weak pull-ups for the second group of pins
Byte 5..7 Reserved Reserved

 

Response is an 8-byte array of the following format:

Byte 0: GPIO_GET_PULL_UPS (0x1A)

This byte contains response ID (response type). This byte will contain 0x1A.

Byte 1: ECHO

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.

Byte 2: ST

Status of the command execution:

  • GPIO_ST_SUCCESS (0x00) – The weak pull-ups configuration was successfully retrieved.

 

Byte 3: PINS_GPOUP1

The state of the weak pull-ups for the first group of pins (A0, A1, A2, A3, A4, B0, B1, B4):

  • 1 – weak pull-up resistors are enabled for the group of pins;

  • 0 – weak pull-up resistors are disabled for the group of pins.

 

Byte 4: PINS_GROUP2

The state of the weak pull-ups for the second group of pins (A6, A7, B7, C0, C7):

  • 1 – weak pull-up resistors are enabled for the group of pins;

  • 0 – weak pull-up resistors are disabled for the group of pins.

 

Bytes 5..7: Reserved

These bytes are reserved for future usage.

For convenience GPIO_GET_PULL_UPS_RSP structure is declared in reports.h file.