Esempio n. 1
0
static char *iguana_rec(struct ir_remote *remotes)
{
	char *retval = NULL;
	if (clear_rec_buffer())
		retval = decode_all(remotes);
	return retval;
}
Esempio n. 2
0
static char *uirt2_raw_rec(struct ir_remote *remotes)
{
	LOGPRINTF(1, "uirt2_raw_rec");
	LOGPRINTF(1, "uirt2_raw_rec: %p", remotes);

	if (!clear_rec_buffer())
		return (NULL);

	if (remotes) {
		char *res;
		res = decode_all(remotes);

		return res;
	} else {
		lirc_t data;

		queue_clear();
		data = uirt2_read_raw(dev, 1);
		if (data) {
			queue_put(data);
		}

		return NULL;
	}
}
Esempio n. 3
0
char *default_rec(struct ir_remote *remotes)
{
	if (!clear_rec_buffer()) {
		default_deinit();
		return NULL;
	}
	return (decode_all(remotes));
}
Esempio n. 4
0
static char *ati_rec(struct ir_remote *remotes)
{
	if (!clear_rec_buffer()) {
		ati_deinit();
		return NULL;
	}
	return decode_all(remotes);
}
Esempio n. 5
0
File: MCE.cpp Progetto: leg0/WinLIRC
WL_API int decodeIR(struct ir_remote *remotes, char *out) {

	if(sendReceiveData) {

		if(!sendReceiveData->waitTillDataIsReady(0)) {
			return 0;
		}

		clear_rec_buffer(&hw);

		if(decodeCommand(&hw,remotes,out)) {
			return 1;
		}
	}

	return 0;
}
Esempio n. 6
0
char *default_rec(struct ir_remote *remotes)
{
	char c;
	int n;
	static char message[PACKET_SIZE+1];


	if(hw.rec_mode==LIRC_MODE_STRING)
	{
		int failed=0;

		/* inefficient but simple, fix this if you want */
		n=0;
		do
		{
			if(read(hw.fd,&c,1)!=1)
			{
				logprintf(LOG_ERR,"reading in mode "
					  "LIRC_MODE_STRING failed");
				return(NULL);
			}
			if(n>=PACKET_SIZE-1)
			{
				failed=1;
				n=0;
			}
			message[n++]=c;
		}
		while(c!='\n');
		message[n]=0;
		if(failed) return(NULL);
		return(message);
	}
	else
	{
		if(!clear_rec_buffer()) return(NULL);
		return(decode_all(remotes));
	}
}
Esempio n. 7
0
char *audio_rec(struct ir_remote *remotes)
{
	if (!clear_rec_buffer())
		return (NULL);
	return (decode_all(remotes));
}
Esempio n. 8
0
char *tira_rec_mode2 (struct ir_remote *remotes)
{
	if(!clear_rec_buffer()) return(NULL);
	return(decode_all(remotes));
}
Esempio n. 9
0
static char *awlibusb_rec(struct ir_remote *remotes)
{
	if (!clear_rec_buffer())
		return NULL;
	return decode_all(remotes);
}