/* Send a request to read or write a GPIO.  */
sl_status_t sl_wfx_control_gpio(uint8_t gpio_label, uint8_t gpio_mode, uint32_t *value)
/* Send a request to read or write a GPIO.  */
sl_status_t sl_wfx_control_gpio(uint8_t gpio_label, uint8_t gpio_mode, uint32_t *value)
{
  sl_status_t result;
  sl_wfx_control_gpio_cnf_t *reply = NULL;
  sl_wfx_control_gpio_req_body_t payload;
  payload.gpio_label = gpio_label;
  payload.gpio_mode = gpio_mode;
  result = sl_wfx_send_command(SL_WFX_CONTROL_GPIO_REQ_ID, &payload, sizeof(payload), SL_WFX_STA_INTERFACE, (sl_wfx_generic_confirmation_t **)&reply);
  if (result == SL_STATUS_OK) {
    result = sl_wfx_get_status_code(sl_wfx_htole32(reply->body.status), SL_WFX_CONTROL_GPIO_REQ_ID);
    *value = sl_wfx_htole32(reply->body.value);
  }
  return result;
}