libmygpio
libmygpio API documentation
Loading...
Searching...
No Matches
GPIO info

This module provides functions for the gpioinfo protocol command. More...

Functions

bool mygpio_gpioinfo (struct t_mygpio_connection *connection, unsigned gpio)
struct t_mygpio_gpiomygpio_recv_gpio_info (struct t_mygpio_connection *connection)

Detailed Description

This module provides functions for the gpioinfo protocol command.

Function Documentation

◆ mygpio_gpioinfo()

bool mygpio_gpioinfo ( struct t_mygpio_connection * connection,
unsigned gpio )

Lists the current settings of a GPIO. Retrieve the settings with mygpio_recv_gpio_info and end the response with mygpio_response_end.

Parameters
connectionPointer to the connection struct returned by mygpio_connection_new.
gpioGPIO number
Returns
bool true on success, else false.

◆ mygpio_recv_gpio_info()

struct t_mygpio_gpio * mygpio_recv_gpio_info ( struct t_mygpio_connection * connection)

Receives the result of mygpio_gpioinfo. Free it with mygpio_free_gpio. Use the mygpio_gpio_get_gpio_*, mygpio_gpio_in_get_gpio_* and mygpio_gpio_in_get_gpio_* functions to access the values. The caller must free it with mygpio_free_gpio.

Parameters
connectionPointer to the connection struct returned by mygpio_connection_new.
Returns
Allocated struct t_mygpio_gpio or NULL on list end or error.