You are here

GPIO_SET_PULL_UPS (0x19)

The GPIO_SET_PULL_UPS command allows to turn on/off weak pull-up resistors for either of the two groups of pins.

GPIO_SET_PULL_UPS Command

Go to Response

Byte 0 GPIO_SET_PULL_UPS Command ID (0x19).
Byte 1 ECHO Echo to associate a command with the response
Byte 2 PINS_GROUP1 Enable byte for the first group of pins
Byte 3 PINS_GROUP2 Enable byte for the second group of pins
Byte 4..7 Reserved Reserved

 

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

Byte 0: GPIO_SET_PULL_UPS (0x19)

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

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: PINS_GPOUP1

The Enable byte for the first group of pins (A0, A1, A2, A3, A4, B0, B1, B4):

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

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

 

Byte 3: PINS_GROUP2

The Enable byte for the second group of pins (A6, A7, B7, C0, C7):

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

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

 

Bytes 4..7: Reserved

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

 

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

GPIO-24 adapter sends GPIO_SET_PULL_UPS response after command execution.

GPIO_SET_PULL_UPS Response

Go to Command

Byte 0 GPIO_SET_PULL_UPS Response ID (0x19).
Byte 1 ECHO Echo to associate a command with the response.
Byte 2 ST Status of the command execution.
Byte 3..7 Reserved Reserved

 

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

Byte 0: GPIO_SET_PULL_UPS (0x19)

Response ID (response type). This byte will contain 0x19.

Byte 1: ECHO

Echo byte copied from the corresponding command. It is used to associate the response with the specific command.

Byte 2: ST

Status of the command execution:

  • GPIO_ST_SUCCESS (0x00) – The weak pull-ups were succesfully configured;

  • GPIO_ST_INVALID_PARAMETER (0x01) – Invalid parameter has been specified.

 

Bytes 3..5: Reserved

These bytes are reserved for future usage.

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