gpio_set_level()

Set the GPIO level

Synopsis:

#include <hw/gpio_api.h>

int32_t gpio_set_level( int32_t gpio_fd,
                        gpio_header_t hdr,
                        gpio_level_t level );

Arguments:

gpio_fd
The file descriptor of a GPIO device.
hdr
The GPIO header identifying a GPIO pin.
level
The GPIO level.

Description:

The gpio_set_level() function sets the GPIO level of a pin.

Returns:

0 on success, or -1 if an error occurs (errno is set).

Errors:

Any error value that MsgSend() can return, or:

EINVAL
The reply value is outside the int32_t range.
Page updated: