| LIRC libraries LinuxInfraredRemoteControl

receive.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** receive.h ***************************************************************
3 ****************************************************************************
4 *
5 * functions that decode IR codes
6 *
7 * Copyright (C) 1999 Christoph Bartelmus <lirc@bartelmus.de>
8 *
9 */
10
18 #ifndef _RECEIVE_H
19 #define _RECEIVE_H
20
21 #include "ir_remote.h"
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
34 #define MIN_RECEIVE_TIMEOUT 100000
35
40 void rec_set_update_mode(int mode);
41
46 void rec_buffer_set_logfile(FILE* f);
47
49 static inline lirc_t receive_timeout(lirc_t usec)
50 {
51 return 2 * usec < MIN_RECEIVE_TIMEOUT ? MIN_RECEIVE_TIMEOUT : 2 * usec;
52 }
53
63 int waitfordata(__u32 maxusec);
64
66 void rec_buffer_init(void);
67
72 int rec_buffer_clear(void);
73
80 int receive_decode(struct ir_remote* remote, struct decode_ctx_t* ctx);
81
86 void rec_buffer_rewind(void);
87
89 void rec_buffer_reset_wptr(void);
90
91
93 #ifdef __cplusplus
94 }
95 #endif
96
97 #endif
rec_buffer_init
void rec_buffer_init(void)
Definition: receive.c:204
rec_buffer_set_logfile
void rec_buffer_set_logfile(FILE *f)
Definition: receive.c:191
ir_remote
Definition: ir_remote_types.h:167
waitfordata
int waitfordata(__u32 maxusec)
Definition: receive.c:165
rec_buffer_rewind
void rec_buffer_rewind(void)
Definition: receive.c:209
receive_decode
int receive_decode(struct ir_remote *remote, struct decode_ctx_t *ctx)
Definition: receive.c:1041
rec_buffer_reset_wptr
void rec_buffer_reset_wptr(void)
Definition: receive.c:219
ir_remote.h
Describes and decodes the signals from IR remotes.
decode_ctx_t
Definition: ir_remote_types.h:154
rec_set_update_mode
void rec_set_update_mode(int mode)
Definition: receive.c:68
MIN_RECEIVE_TIMEOUT
#define MIN_RECEIVE_TIMEOUT
Definition: receive.h:34
rec_buffer_clear
int rec_buffer_clear(void)
Definition: receive.c:224