Function esp_idf_svc::hal::sys::gpio_get_level
source ยท pub unsafe extern "C" fn gpio_get_level(gpio_num: i32) -> i32
Expand description
@brief GPIO get input level
@warning If the pad is not configured for input (or input and output) the returned value is always 0.
@param gpio_num GPIO number. If you want to get the logic level of e.g. pin GPIO16, gpio_num should be GPIO_NUM_16 (16);
@return - 0 the GPIO input level is 0 - 1 the GPIO input level is 1