LIRC libraries
LinuxInfraredRemoteControl
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
receive.h
Go to the documentation of this file.
1 
2 /****************************************************************************
3  ** receive.h ***************************************************************
4  ****************************************************************************
5  *
6  * functions that decode IR codes
7  *
8  * Copyright (C) 1999 Christoph Bartelmus <lirc@bartelmus.de>
9  *
10  */
11 
19 #ifndef _RECEIVE_H
20 #define _RECEIVE_H
21 
22 #include "ir_remote.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
35 #define MIN_RECEIVE_TIMEOUT 100000
36 
41 void rec_buffer_set_logfile(FILE* f);
42 
44 static inline lirc_t receive_timeout(lirc_t usec)
45 {
46  return 2 * usec < MIN_RECEIVE_TIMEOUT ? MIN_RECEIVE_TIMEOUT : 2 * usec;
47 }
48 
56 int waitfordata(__u32 maxusec);
57 
59 void rec_buffer_init();
60 
65 int rec_buffer_clear(void);
66 
73 int receive_decode(struct ir_remote* remote, struct decode_ctx_t* ctx);
74 
79 void rec_buffer_rewind(void);
80 
82 void rec_buffer_reset_wptr(void);
83 
84 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif
void rec_buffer_set_logfile(FILE *f)
Definition: receive.c:205
int waitfordata(__u32 maxusec)
Definition: receive.c:168
void rec_buffer_rewind(void)
Definition: receive.c:224
void rec_buffer_init()
Definition: receive.c:219
int receive_decode(struct ir_remote *remote, struct decode_ctx_t *ctx)
Definition: receive.c:1050
void rec_buffer_reset_wptr(void)
Definition: receive.c:234
Describes and decodes the signals from IR remotes.
#define MIN_RECEIVE_TIMEOUT
Definition: receive.h:35
int rec_buffer_clear(void)
Definition: receive.c:239