dwm_gpio_value_get

Reads pin value.

void dwm_gpio_value_get(uint8_t gpio_idx, uint8_t *value);
Parameters
  • gpio_idx – 8-bit integer (see the section gpio_idx for allowed values)

  • outputStatus code [, gpio_val].

  • gpio_val – ‘0’ | ‘1’

C code example

uint8_t value;
dwm_gpio_value_get(DWM_GPIO_IDX_13, &value);
printf("%u\n”, value);

SPI/UART example

TLV Request

Type

Length

Value

pin index

0x2b

0x01

0x0D

Type 0x2b means command dwm_gpio_value_get

TLV Response

Type

Length

value (see error codes)

Type

Length

Value

pin value (0,1)

0x40

0x01

0x00

0x55

0x01

0x00

Type 0x40 means Status code of previous command Type 0x55 means pin value