Accessors for the info event objects allowing to monitor changes in GPIO line status.
More...
Accessors for the info event objects allowing to monitor changes in GPIO line status.
Callers are notified about changes in a line's status due to GPIO uAPI calls. Each info event contains information about the event itself (timestamp, type) as well as a snapshot of line's status in the form of a line-info object.
◆ gpiod_info_event_type
Line status change event types.
Enumerator |
---|
GPIOD_INFO_EVENT_LINE_REQUESTED | Line has been requested.
|
GPIOD_INFO_EVENT_LINE_RELEASED | Previously requested line has been released.
|
GPIOD_INFO_EVENT_LINE_CONFIG_CHANGED | Line configuration has changed.
|
Definition at line 589 of file gpiod.h.
◆ gpiod_info_event_free()
Free the info event object and release all associated resources.
- Parameters
-
◆ gpiod_info_event_get_event_type()
◆ gpiod_info_event_get_line_info()
Get the snapshot of line-info associated with the event.
- Parameters
-
event | Line info event object. |
- Returns
- Returns a pointer to the line-info object associated with the event. The object lifetime is tied to the event object, so the pointer must be not be freed by the caller.
◆ gpiod_info_event_get_timestamp_ns()
Get the timestamp of the event.
- Parameters
-
event | Line status watch event. |
- Returns
- Timestamp in nanoseconds, read from the monotonic clock.