libmygpio
libmygpio API documentation
Loading...
Searching...
No Matches
libmygpio_idle.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-3.0-or-later
3 libmygpio (c) 2020-2026 Juergen Mang <mail@jcgames.de>
4 https://github.com/jcorporation/mympd
5*/
6
12
13#ifndef LIBMYGPIO_IDLE_H
14#define LIBMYGPIO_IDLE_H
15
16#include <stdbool.h>
17#include <stdint.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
24
33
41
53
59enum mygpio_event mygpio_parse_event(const char *str);
60
66const char *mygpio_lookup_event(enum mygpio_event event);
67
76bool mygpio_send_idle(struct t_mygpio_connection *connection);
77
83bool mygpio_send_noidle(struct t_mygpio_connection *connection);
84
92bool mygpio_wait_idle(struct t_mygpio_connection *connection, int timeout);
93
102
109
116
123
130
137
144
151
158
164
168
169#ifdef __cplusplus
170}
171#endif
172
173#endif
struct t_mygpio_idle_event * mygpio_recv_idle_event(struct t_mygpio_connection *connection)
const char * mygpio_idle_event_get_input_code(struct t_mygpio_idle_event *event)
void mygpio_free_idle_event(struct t_mygpio_idle_event *event)
const char * mygpio_lookup_event(enum mygpio_event event)
const char * mygpio_idle_event_get_event_name(struct t_mygpio_idle_event *event)
enum mygpio_event mygpio_idle_event_get_event(struct t_mygpio_idle_event *event)
const char * mygpio_idle_event_get_input_device(struct t_mygpio_idle_event *event)
const char * mygpio_idle_event_get_input_type(struct t_mygpio_idle_event *event)
bool mygpio_wait_idle(struct t_mygpio_connection *connection, int timeout)
mygpio_event
Definition libmygpio_idle.h:45
bool mygpio_send_idle(struct t_mygpio_connection *connection)
enum mygpio_event mygpio_parse_event(const char *str)
bool mygpio_send_noidle(struct t_mygpio_connection *connection)
unsigned mygpio_idle_event_get_input_value(struct t_mygpio_idle_event *event)
unsigned mygpio_idle_event_get_gpio(struct t_mygpio_idle_event *event)
uint64_t mygpio_idle_event_get_timestamp_ms(struct t_mygpio_idle_event *event)
@ MYGPIO_EVENT_GPIO_LONG_PRESS_RELEASE
GPIO long_press release.
Definition libmygpio_idle.h:50
@ MYGPIO_EVENT_UNKNOWN
unknown
Definition libmygpio_idle.h:46
@ MYGPIO_EVENT_INPUT
Input event.
Definition libmygpio_idle.h:51
@ MYGPIO_EVENT_GPIO_LONG_PRESS
GPIO long_press.
Definition libmygpio_idle.h:49
@ MYGPIO_EVENT_GPIO_FALLING
GPIO falling.
Definition libmygpio_idle.h:47
@ MYGPIO_EVENT_GPIO_RISING
GPIO rising.
Definition libmygpio_idle.h:48