zephyr::raw

Function gpio_port_get

source
pub unsafe extern "C" fn gpio_port_get(
    port: *const device,
    value: *mut u32,
) -> i32
Expand description

@brief Get logical level of all input pins in a port.

Get logical level of an input pin taking into account GPIO_ACTIVE_LOW flag. If pin is configured as Active High, a low physical level will be interpreted as logical value 0. If pin is configured as Active Low, a low physical level will be interpreted as logical value 1.

Value of a pin with index n will be represented by bit n in the returned port value.

@param port Pointer to the device structure for the driver instance. @param value Pointer to a variable where pin values will be stored.

@retval 0 If successful. @retval -EIO I/O error when accessing an external GPIO chip. @retval -EWOULDBLOCK if operation would block.