Function rc_button_get_state#

Function Documentation#

int rc_button_get_state(int chip, int pin)#

used to query the position of a button.

Parameters:
  • chip[in] The gpio chip

  • pin[in] The gpio pin for that chip

Returns:

RC_BTN_STATE_PRESSED or RC_BTN_STATE_RELEASED on success, -1 on failure.