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

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

Functions

bool mygpio_gpiolist (struct t_mygpio_connection *connection)
struct t_mygpio_gpiomygpio_recv_gpio_list (struct t_mygpio_connection *connection)

Detailed Description

This module provides functions for the gpiolist protocol command.

Function Documentation

◆ mygpio_gpiolist()

bool mygpio_gpiolist ( struct t_mygpio_connection * connection)

Lists the modes and values of all configured GPIOs. Retrieve the list elements with mygpio_recv_gpio_list and end the response with mygpio_response_end.

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

◆ mygpio_recv_gpio_list()

struct t_mygpio_gpio * mygpio_recv_gpio_list ( struct t_mygpio_connection * connection)

Receives a list element of mygpio_gpiolist. Use the mygpio_gpio_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.