Ejemplo n.º 1
0
static inline void flush_send_buffer(void)
{
	if (send_buffer.pendingp > 0) {
		add_send_buffer(send_buffer.pendingp);
		send_buffer.pendingp = 0;
	}
	if (send_buffer.pendings > 0) {
		add_send_buffer(send_buffer.pendings);
		send_buffer.pendings = 0;
	}
}
Ejemplo n.º 2
0
void sync_send_buffer(void)
{
	if(send_buffer.pendingp>0)
	{
		add_send_buffer(send_buffer.pendingp);
		send_buffer.pendingp=0;
	}
	if(send_buffer.wptr>0 && send_buffer.wptr%2==0) send_buffer.wptr--;
}
Ejemplo n.º 3
0
static void send_signals(lirc_t *signals, int n)
{
	int i;
	
	for(i=0; i<n; i++)
	{
		add_send_buffer(signals[i]);
	}
}
Ejemplo n.º 4
0
inline void send_pulse(lirc_t data)
{
	if (send_buffer.pendingp > 0) {
		send_buffer.pendingp += data;
	} else {
		if (send_buffer.pendings > 0) {
			add_send_buffer(send_buffer.pendings);
			send_buffer.pendings = 0;
		}
		send_buffer.pendingp = data;
	}
}
Ejemplo n.º 5
0
inline void send_space(lirc_t data)
{
	if (send_buffer.wptr == 0 && send_buffer.pendingp == 0) {
		LOGPRINTF(1, "first signal is a space!");
		return;
	}
	if (send_buffer.pendings > 0) {
		send_buffer.pendings += data;
	} else {
		if (send_buffer.pendingp > 0) {
			add_send_buffer(send_buffer.pendingp);
			send_buffer.pendingp = 0;
		}
		send_buffer.pendings = data;
	}
}
Ejemplo n.º 6
0
void send_space(lirc_t data)
{
	if(send_buffer.wptr==0 && send_buffer.pendingp==0)
	{
		return;
	}
	if(send_buffer.pendings>0)
	{
		send_buffer.pendings+=data;
	}
	else
	{
		if(send_buffer.pendingp>0)
		{
			add_send_buffer(send_buffer.pendingp);
			send_buffer.pendingp=0;
		}
		send_buffer.pendings=data;
	}
}