void _main_func(void)
{
	/* first we try to get rid of pending to-be-sent stuff */
	usb_out_process();

	/* next we deal with incoming reqyests from USB EP1 (OUT) */
	usb_in_process();

	/* try unthrottling sources since we now are [more] likely to
	 * have empty request contexts */
	rc632_unthrottle();
#ifdef SSC
	ssc_rx_unthrottle();
#endif

	led_toggle(2);
}
Exemplo n.º 2
0
void _main_func(void)
{
	int ret;

	usb_out_process();
	usb_in_process();
	
	ret = init_proto();

	if (ret >= 4)
		rfid_protocol_close(ph);
	if (ret >= 3)
		rfid_layer2_close(l2h);

	rc632_turn_off_rf(NULL);
	{ volatile int i; for (i = 0; i < 0xfffff; i++) ; }
	rc632_turn_on_rf(NULL);

	led_switch(1, 0);
	led_toggle(2);
}
void _main_func(void)
{
	u_int32_t uid;
	int status;
	
	status = rfid_layer2_open(l2h);
        if (status >= 0  && l2h->uid_len==4)
	{
	    uid=((u_int32_t)l2h->uid[0])    |
		((u_int32_t)l2h->uid[1])<< 8|
		((u_int32_t)l2h->uid[2])<<16|
		((u_int32_t)l2h->uid[3])<<24;
			
	    delay_scan=100;
		
	    if(uid!=last_uid)
	    {
		last_uid=last_polled_uid=uid;
		delay_blink=10;
		    
		DEBUGPCR("UID:0x%08X", uid);
	    }
	}
	else
	    if(delay_scan)
		delay_scan--;
	    else
		last_uid=0;
	    
        led_switch(1,(delay_blink==0)?1:0);
	if(delay_blink)
	    delay_blink--;
	
	/* first we try to get rid of pending to-be-sent stuff */
	usb_out_process();
	/* next we deal with incoming reqyests from USB EP1 (OUT) */
	usb_in_process();
	rc632_unthrottle();
}
Exemplo n.º 4
0
/*******************************************************************************
* Function Name  : HID_Status_In.
* Description    : HID status IN routine.
* Input          : None.
* Output         : None.
* Return         : None.
*******************************************************************************/
void HID_Status_In(void)
{
	usb_in_process (Report_Buf);
}