You are here

GPIO_GET_PULSE_CFG (0x24)

The GPIO_GET_PULSE_CFG command allows to retrieve the pulse generation settings.

GPIO_GET_PULSE_CFG Command

Go to Response

Byte 0 GPIO_GET_PULSE_CFG Command ID (0x24).
Byte 1 ECHO Echo to associate a command with the response.
Byte 2 GPIO GPIO pin number.
Byte 3..7 Reserved Reserved (must be 0).

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

Byte 0: GPIO_GET_PULSE_CFG (0x24)

Command ID (command type). It should be set to 0x24.

Byte 1: ECHO

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

Byte 2: GPIO

GPIO pin number:

  • 0..7 corresponds to GPIO PORT A pins 0..7;

  • 8..15 corresponds to GPIO PORT B pins 0..7;

  • 16..23 corresponds to GPIO PORT C pins 0..7.

Bytes 3..7: Reserved

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

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

GPIO-24 adapter sends GPIO_GET_PULSE_CFG response after command execution. The response contains pulse configuration settings.

GPIO_GET_PULSE_CFG Response

Go to Command

Byte 0 GPIO_GET_PULSE_CFG Response ID (0x24).
Byte 1 ECHO Echo to associate command with the response.
Byte 2 ST Status of the command execution.
Byte 3 GPIO GPIO pin number.
Byte 4 STATE State of pulse.
Byte 5 VAL Logical level of the pulse.
Byte 6 TL Pulse length (least significant byte).
Byte 7 TH Pulse length (most significant byte).

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

Byte 0: GPIO_GET_PULSE_CFG (0x23)

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

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) – Command execution succeeded.

Byte 3: GPIO

GPIO pin number:

  • 0..7 corresponds to GPIO PORT A pins 0..7;

  • 8..15 corresponds to GPIO PORT B pins 0..7;

  • 16..23 corresponds to GPIO PORT C pins 0..7.

Byte 4: STATE

The state of pulse:

  • GPIO_CFG_PULSE_IDLE (0x01) – The pin is switched to pulse mode, but it is not sending a pulse at the moment.

  • GPIO_CFG_PULSE_ACTIVE (0x00) – The pin is sending a pulse at the moment.

Byte 5: VAL

Logical level of the pulse:

  • 0 – negative pulse;

  • 1 – positive pulse.

Bytes 6, 7: TL/TH

Byte 6: TL – least significant byte (low byte) of pulse length.

Byte 7: TH – most significant byte (high byte) of pulse length.

Pulse length is specified in ms in the range from 1 to 65535 ms (65.535 seconds).

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