19 #ifdef TIME_WITH_SYS_TIME
20 # include <sys/time.h>
23 # ifdef HAVE_SYS_TIME_H
24 # include <sys/time.h>
39 #include <sys/socket.h>
41 #include <sys/types.h>
53 #define min(a, b) (a > b ? b : a)
54 #define max(a, b) (a > b ? a : b)
56 #define BUTTON (80 + 1)
60 #define MAX_SIGNALS 200
63 #define TH_SPACE_ENC 80
69 #define TH_RC6_SIGNAL 550
72 #define MAX_GAP 100000
84 typedef void (*remote_func) (
struct ir_remote* remotes);
86 enum analyse_mode { MODE_GET_GAP, MODE_HAVE_GAP };
103 enum get_gap_status {
107 STS_GAP_GOT_ONE_PRESS,
115 STS_TGL_GOT_ONE_PRESS,
127 STS_BTN_GET_RAW_DATA,
129 STS_BTN_GET_TOGGLE_BITS,
132 STS_BTN_BUTTONS_DONE,
143 lirc_t sum, upper_bound, lower_bound, min, max;
156 int disable_namespace;
165 const char* filename;
167 const char* backupfile;
171 char commandline[128];
186 struct timeval start;
208 lirc_t remaining_gap;
211 enum analyse_mode mode;
251 extern unsigned int eps;
258 ssize_t raw_read(
void* buffer,
size_t size,
unsigned int timeout_us);
261 void for_each_remote(
struct ir_remote* remotes, remote_func func);
264 void btn_state_set_message(
struct button_state* state,
const char* fmt, ...);
270 void gap_state_init(
struct gap_state* state);
282 enum get_gap_status get_gap_length(
struct gap_state* state,
292 void free_all_lengths(
void);
302 enum button_status record_buttons(
struct button_state* btn_state,
303 enum button_status last_status,
314 void get_pre_data(
struct ir_remote* remote);
317 void get_post_data(
struct ir_remote* remote);
320 void remove_pre_data(
struct ir_remote* remote);
323 void remove_post_data(
struct ir_remote* remote);
326 void invert_data(
struct ir_remote* remote);
329 void remove_trail(
struct ir_remote* remote);
Main include file for lirc applications.