zephyr::raw

Function gpio_pin_is_output

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

@brief Check if @p pin is configured for output

@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_OUTPUT. @retval 0 if @p pin is not configured as @ref GPIO_OUTPUT. @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.