dwm_gpio_cfg_output

Configures GPIO pin as output and sets value.

void dwm_gpio_cfg_output(uint8_t gpio_idx, uint8_t value)
Parameters
  • gpio_idx – ? 8-bit integer ? (see previous chapter for allowed values).

  • value – ? 8-bit integer ? (0 or 1).

  • outputStatus code.

C code example 1

dwm_gpio_cfg_output(DWM_GPIO_IDX_13, 1);
dwm_gpio_cfg_output(DWM_GPIO_IDX_13, 0);

SPI/UART example 1

TLV Request

Type

Length

Value

pin index

pin value

0x28

0x02

0x0D

0x01

Type 0x28 means command dwm_gpio_cfg_output

TLV Response

Type

Length

Value (see error codes)

0x40

0x01

0x00

Type 0x40 means err_code of the previous command

SPI/UART example 2

TLV Request

Type

Length

Value

pin index 8 is a reserved pin

pin value

0x28

0x02

0x08

0x01

Type 0x28 means command dwm_gpio_cfg_output

TLV Response

Type

Length

Value

0x40

0x01

0 OK
1 Error

0x01

Type 0x40 means err_code of the previous command