zephyr::raw

Function gpio_port_get_direction

source
pub unsafe extern "C" fn gpio_port_get_direction(
    port: *const device,
    map: u32,
    inputs: *mut u32,
    outputs: *mut u32,
) -> i32
Expand description

@brief Get direction of select pins in a port.

Retrieve direction of each pin specified in @p map.

If @p inputs or @p outputs is NULL, then this function does not get the respective input or output direction information.

@param port Pointer to the device structure for the driver instance. @param map Bitmap of pin directions to query. @param inputs Pointer to a variable where input directions will be stored. @param outputs Pointer to a variable where output directions will be stored.

@retval 0 If successful. @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.