/* $Id: receive.h,v 5.7 2010/05/30 11:43:35 lirc Exp $ */ /**************************************************************************** ** receive.h *************************************************************** **************************************************************************** * * functions that decode IR codes * * Copyright (C) 1999 Christoph Bartelmus * */ #ifndef _RECEIVE_H #define _RECEIVE_H #include "ir_remote.h" #define RBUF_SIZE (512) #define REC_SYNC 8 #define MIN_RECEIVE_TIMEOUT 100000 struct rbuf { lirc_t data[RBUF_SIZE]; ir_code decoded; int rptr; int wptr; int too_long; int is_biphase; lirc_t pendingp; lirc_t pendings; lirc_t sum; }; static inline lirc_t receive_timeout(lirc_t usec) { return 2*usec