27 #if !defined(__LWS_BUTTON_H__)
28 #define __LWS_BUTTON_H__
30 typedef uint16_t lws_button_idx_t;
33 #define LWS_BUTTON_MON_TIMER_MS 5
35 typedef void (*lws_button_cb_t)(
void *opaque, lws_button_idx_t idx,
int state);
41 LWSBTNRGMFLAG_CLASSIFY_DOUBLECLICK = (1 << 0)
46 uint16_t ms_min_down_longpress;
47 uint16_t ms_up_settle;
48 uint16_t ms_doubleclick_grace;
49 uint16_t ms_repeat_down;
65 _lws_plat_gpio_t gpio;
66 const char *smd_interaction_name;
72 const char *smd_bc_name;
75 lws_button_idx_t active_state_bitmap;
76 uint8_t count_buttons;
79 struct lws_button_state;
91 LWS_VISIBLE LWS_EXTERN
struct lws_button_state *
92 lws_button_controller_create(
struct lws_context *ctx,
104 LWS_VISIBLE LWS_EXTERN
void
105 lws_button_controller_destroy(
struct lws_button_state *bcs);
108 LWS_VISIBLE LWS_EXTERN lws_button_idx_t
109 lws_button_get_bit(
struct lws_button_state *bcs,
const char *name);
115 LWS_VISIBLE LWS_EXTERN
void
116 lws_button_enable(
struct lws_button_state *bcs,
117 lws_button_idx_t _reset, lws_button_idx_t _set);
Definition: lws-gpio.h:52