zephyr::raw

Function gpio_pin_is_input

source
pub unsafe extern "C" fn gpio_pin_is_input(
    port: *const device,
    pin: u8,
) -> i32
Expand description

@brief Check if @p pin is configured for input

@param port Pointer to device structure for the driver instance. @param pin Pin number to query the direction of

@retval 1 if @p pin is configured as @ref GPIO_INPUT. @retval 0 if @p pin is not configured as @ref GPIO_INPUT. @retval -ENOSYS if the underlying driver does not support this call. @retval -EIO I/O error when accessing an external GPIO chip. @retval -EWOULDBLOCK if operation would block.