Functions for manipulating request configuration objects.
More...
Functions for manipulating request configuration objects.
Request config objects are used to pass a set of options to the kernel at the time of the line request. The mutators don't return error values. If the values are invalid, in general they are silently adjusted to acceptable ranges.
◆ gpiod_request_config_free()
Free the request config object and release all associated resources.
- Parameters
-
config | Line config object. |
◆ gpiod_request_config_get_consumer()
Get the consumer name configured in the request config.
- Parameters
-
config | Request config object. |
- Returns
- Consumer name stored in the request config.
◆ gpiod_request_config_get_event_buffer_size()
Get the edge event buffer size for the request config.
- Parameters
-
config | Request config object. |
- Returns
- Edge event buffer size setting from the request config.
◆ gpiod_request_config_new()
Create a new request config object.
- Returns
- New request config object or NULL on error. The returned object must be freed by the caller using gpiod_request_config_free.
◆ gpiod_request_config_set_consumer()
void gpiod_request_config_set_consumer |
( |
struct gpiod_request_config * |
config, |
|
|
const char * |
consumer |
|
) |
| |
Set the consumer name for the request.
- Parameters
-
config | Request config object. |
consumer | Consumer name. |
- Note
- If the consumer string is too long, it will be truncated to the max accepted length.
◆ gpiod_request_config_set_event_buffer_size()
void gpiod_request_config_set_event_buffer_size |
( |
struct gpiod_request_config * |
config, |
|
|
size_t |
event_buffer_size |
|
) |
| |
Set the size of the kernel event buffer for the request.
- Parameters
-
config | Request config object. |
event_buffer_size | New event buffer size. |
- Note
- The kernel may adjust the value if it's too high. If set to 0, the default value will be used.
-
The kernel buffer is distinct from and independent of the user space buffer (gpiod_edge_event_buffer_new).