dwm_gpio_cfg_input

Configures GPIO pin as input.

void dwm_gpio_cfg_input(uint8_t gpio_idx, uint8_t gpio_pull);
Parameters
  • gpio_idx – ? 8-bit integer ? (see the section gpio_idx for allowed values)

  • gpio_pull – ? 8-bit integer ? (0 no pull, 1 pull down, 3 pull up).

  • outputStatus code.

C code example

dwm_gpio_cfg_input(DWM_GPIO_IDX_13, DWM_GPIO_PIN_PULLUP);
dwm_gpio_cfg_input(DWM_GPIO_IDX_9, DWM_GPIO_PIN_NOPULL);
dwm_gpio_cfg_input(DWM_GPIO_IDX_31, DWM_GPIO_PIN_PULLDOWN);

SPI/UART example

TLV Request

Type

Length

Value

pin index

pull config

0x29

0x02

0x0D

0x03

Type 0x29 means command dwm_gpio_cfg_input

TLV Response

Type

Length

Value (see error codes)

0x40

0x01

0x00

Type 0x40 means err_code of the previous command