示例#1
0
void bttv_input_irq(struct bttv *btv)
{
	struct bttv_ir *ir = btv->remote;

	if (!ir->polling)
		ir_handle_key(btv);
}
示例#2
0
static void bttv_input_timer(unsigned long data)
{
	struct bttv *btv = (struct bttv*)data;
	struct card_ir *ir = btv->remote;

	ir_handle_key(btv);
	mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling));
}
示例#3
0
void bttv_input_irq(struct bttv *btv)
{
	struct bttv_ir *ir = btv->remote;

	if (ir->rc5_gpio)
		bttv_rc5_irq(btv);
	else if (!ir->polling)
		ir_handle_key(btv);
}
示例#4
0
static void bttv_input_timer(unsigned long data)
{
	struct bttv *btv = (struct bttv*)data;
	struct bttv_ir *ir = btv->remote;
	unsigned long timeout;

	ir_handle_key(btv);
	timeout = jiffies + (ir->polling * HZ / 1000);
	mod_timer(&ir->timer, timeout);
}
示例#5
0
static void bttv_input_timer(unsigned long data)
{
	struct bttv *btv = (struct bttv*)data;
	struct card_ir *ir = btv->remote;

	if (btv->c.type == BTTV_BOARD_ENLTV_FM_2)
		ir_enltv_handle_key(btv);
	else
		ir_handle_key(btv);
	mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling));
}
示例#6
0
文件: bttv-input.c 项目: Lyude/linux
static void bttv_input_timer(struct timer_list *t)
{
	struct bttv_ir *ir = from_timer(ir, t, timer);
	struct bttv *btv = ir->btv;

	if (btv->c.type == BTTV_BOARD_ENLTV_FM_2)
		ir_enltv_handle_key(btv);
	else
		ir_handle_key(btv);
	mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling));
}
/*
 * when sm receives msg and the msg is to ir, 
 * sm's interrupt function will call this function.
 * (And sm needs to work under interrupt mode) 
 */
int girl_sm_int(void )
{	
	int iMsgBody[8], iMsgLen = 0, iRet;
	int ir_key;

	iRet = bsm_msg_receive( MV_SM_ID_IR, iMsgBody, &iMsgLen );
	
	if( iRet != 0 ||  iMsgLen != 4 )
	return 0;//no new ir key
	
	ir_key = iMsgBody[0];;
	ir_handle_key(ir_key);
	girl_key_buf_write(ir_key);
//	printk("Girl sm int in ir.c,key is %#X \n",ir_key);
	wake_up_interruptible(&girl_wait);
	return 0;
	
}
static int girl_receive_key(void *arg)
{
	while (!kthread_should_stop()) {
		//printk("girl_receive_key\n");
		//set_current_state(TASK_INTERRUPTIBLE);
#ifndef CONFIG_MV88DE3010_IR_SM
		readout_ircbuffer();
#else /* CONFIG_MV88DE3010_IR_SM */
		{
			int iMsgBody[8], iMsgLen = 0, iRet;

			iRet = bsm_msg_receive( MV_SM_ID_IR/*IR module id*/, iMsgBody, &iMsgLen );
			if( iRet != 0 ||  iMsgLen != 4 )
			{
				msleep(100);
				continue;
			}

			ir_key_recvflag = 1;
			ir_key = iMsgBody[0];
		}
#endif /* CONFIG_MV88DE3010_IR_SM */

		if (ir_key_recvflag) {
			ir_key_recvflag = 0;
			ir_handle_key(ir_key);
			//printk("[GIRL key]=0x%08x\n", ir_key);

			/* wake up userland process */
			girl_key_buf_write(ir_key);
			wake_up_interruptible(&girl_wait);
		}
		//schedule();
		msleep(100);
	}

	return 0;
}