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];
187 struct timeval start;
211 lirc_t remaining_gap;
214 enum analyse_mode mode;
255 extern unsigned int eps;
262 ssize_t raw_read(
void* buffer,
size_t size,
unsigned int timeout_us);
265 void for_each_remote(
struct ir_remote* remotes, remote_func func);
268 void btn_state_set_message(
struct button_state* state,
const char* fmt, ...);
274 void gap_state_init(
struct gap_state* state);
283 void button_state_init(
struct button_state* state,
int started_as_root);
286 enum get_gap_status get_gap_length(
struct gap_state* state,
296 void free_all_lengths(
void);
306 enum button_status record_buttons(
struct button_state* btn_state,
307 enum button_status last_status,
318 void get_pre_data(
struct ir_remote* remote);
321 void get_post_data(
struct ir_remote* remote);
324 void remove_pre_data(
struct ir_remote* remote);
327 void remove_post_data(
struct ir_remote* remote);
330 void invert_data(
struct ir_remote* remote);
333 void remove_trail(
struct ir_remote* remote);
Main include file for lirc applications.