亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? main_c.c

?? This Zip file Contains Firmware for TRF7960 RF ID Evaluation Kit Developed by TI.it also contains al
?? C
?? 第 1 頁 / 共 2 頁
字號:
	*(pbuf + 9) = 0xF4;	*(pbuf + 10) = 0x23;	*(pbuf + 11) = 0x00;	*(pbuf + 12) = 0x00;	*(pbuf + 13) = 0x07;	*(pbuf + 14) = 0xE0;	*(pbuf + 15) = 0x00;	*(pbuf + 16) = 0x01;		if(lenght > 12) lenght = 12;	if(lenght == 0x00 && brokenBits != 0x00)	{		lenght = 1;		RXTXstate = 1;	}	command = IRQStatus;	RFID_ReadSingle(&command, 1);	RFID_RAWwrite(pbuf, lenght + 5);		/* send the request using RAW writing */	/* Write 12 bytes the first time you write to FIFO *///	irqCLR;					/* PORT2 interrupt flag clear */	irqON;	RXTXstate = RXTXstate - 12;	//RXTXstate = RXTXstate - lenght;	index = 17;	i_reg = 0x01;	command = IRQStatus;	RFID_ReadSingle(&command, 1);	while(RXTXstate > 0)	{		//myDelay(20);		//LPM0;				/* enter low power mode and exit on interrupt */		//sleep_cpu();		if(RXTXstate > 9)		{					/* the number of unsent bytes is in the RXTXstate global */			lenght = 10;	/* count variable has to be 10 : 9 bytes for FIFO and 1 address */		}		else if(RXTXstate < 1)		{			break;			/* return from interrupt if all bytes have been sent to FIFO */		}		else		{			lenght = RXTXstate + 1; /* all data has been sent out */		}						/* if */		buf[index - 1] = FIFO;	/* writes 9 or less bytes to FIFO for transmitting */		RFID_WriteCont(&buf[index - 1], lenght);		RXTXstate = RXTXstate - 3;//9	/* write 9 bytes to FIFO */		index = index + 9;	}				/* while */	RXTXstate = 1;	/* the response will be stored in buf[1] upwards */	/* wait for end of transmit */	while(i_reg == 0x01)	{		myDelay(30);/*		CounterSet();		countValue = 0xF000;	// 60ms for TIMEOUT 		startCounter;			// start timer up mode 		LPM0;*/		sleep_cpu();	}	i_reg = 0x01;	myDelay(30);/*	CounterSet();	countValue = count1ms * 60; // 60ms for TIMEOUT 	startCounter;				// start timer up mode */	if	(		(((buf[5] & BIT6) == BIT6) && ((buf[6] == 0x21) || (buf[6] == 0x24) || (buf[6] == 0x27) || (buf[6] == 0x29)))	||	(buf[5] == 0x00 && ((buf[6] & 0xF0) == 0x20 || (buf[6] & 0xF0) == 0x30 || (buf[6] & 0xF0) == 0x40))	)	{		delay_ms(20);		command = Reset;		RFID_DirectCommand(&command);		command = TransmitNextSlot;		RFID_DirectCommand(&command);	}				/* if */	while(i_reg == 0x01)	{	}				/* wait for RX complete */	if(!POLLING)	{		switch(noCRC)		{		case 0:			if(i_reg == 0xFF)			{		// recieved response //				kputchar('[');				for(j = 1; j < RXTXstate; j++)				{//					Put_byte(buf[j]);				}	// for //				kputchar(']');				return(0);			}			else if(i_reg == 0x02)			{		// collision occured //				kputchar('[');//				kputchar('z');//				kputchar(']');				return(0);			}			else if(i_reg == 0x00)			{		// timer interrupt //				kputchar('[');//				kputchar(']');				return(1);			}			else				;			break;/*		case 1:			if(i_reg == 0xFF)			{		// recieved response 				kputchar('(');				for(j = 1; j < RXTXstate; j++)				{					Put_byte(buf[j]);				}	// for 				kputchar(')');				return(0);			}			else if(i_reg == 0x02)			{		// collision occured 				kputchar('(');				kputchar('z');				kputchar(')');				return(0);			}			else if(i_reg == 0x00)			{		// timer interrupt 				kputchar('(');				kputchar(')');				return(1);			}			else				;			break;*/		}			// switch 	}				// if 	irqOFF;	return(1);}					// RequestCommand void InterruptHandlerReader(unsigned char *Register){	/*~~~~~~~~~~~~~~~~*/	/*	 * char phello[20];	 * //for testing	 */	unsigned char	len,c;	/*~~~~~~~~~~~~~~~~*/	/*	 * Register = Register & 0xF7;	 * //set the parity flag to 0 ;	 * parity is not used in 15693 and Tag-It	 *///	fprintf(&uart_str,"%c",0x0D);            //    fprintf(&uart_str,"Register = %x \n",*Register);		if(*Register == 0xA0)	{					// TX active and only 3 bytes left in FIFO		i_reg = 0x00;//		fprintf(&uart_str,"%c",0x0D);            //    	fprintf(&uart_str,"FIFO done\n");	}	else 	if(*Register == BIT7)	{					/* TX complete */		i_reg = 0x00;//		fprintf(&uart_str,"%c",0x0D);            //    	fprintf(&uart_str,"TX completed\n");		*Register = Reset;			/* reset the FIFO after TX */		RFID_DirectCommand(Register);	}	else 	if((*Register & BIT1) == BIT1)	{								/* collision error */		i_reg = 0x02;				/* RX complete */				*Register = StopDecoders;	/* reset the FIFO after TX */		RFID_DirectCommand(Register);		CollPoss = CollisionPosition;		RFID_ReadSingle(&CollPoss, 1);//		fprintf(&uart_str,"%c",0x0D);            //    	fprintf(&uart_str,"Collision error = %x\n",CollPoss);		/*		 * CollPoss &= 0xF7;		 */		len = CollPoss - 0x20;		/* number of valid bytes if FIFO */		if((len & 0x0f) != 0x00) len = len + 0x10;	/* add 1 byte if broken byte recieved */		len = len >> 4;		if(len != 0x00)		{			buf[RXTXstate] = FIFO;					/* write the recieved bytes to the correct place of the													 * buffer;													 * */			RFID_ReadCont(&buf[RXTXstate], len);			RXTXstate = RXTXstate + len;		}						/* if *///		fprintf(&uart_str,"%c",0x0D);            //    	fprintf(&uart_str,"collision error  \n");		*Register = Reset;		RFID_DirectCommand(Register);		*Register = IRQStatus;	/* IRQ status register address */		RFID_ReadSingle(Register, 1);	/* function call for single address read */		irqCLR;	}	else 	if(*Register == BIT6)//0x40	{	/* RX flag means that EOF has been recieved */		/* and the number of unread bytes is in FIFOstatus regiter */		if(RXErrorFlag == 0x02)		{			i_reg = 0x02;			return;		}		*Register = FIFOStatus;		RFID_ReadSingle(Register, 1);					/* determine the number of bytes left in FIFO */				*Register = (0x0F &*Register) + 0x01;		for(c=0;c<=250;c++)			buf[c] = 0x00;		buf[RXTXstate] = FIFO;						/* write the recieved bytes to the correct place of the													 * buffer;													 * */		RFID_ReadCont(&buf[RXTXstate], *Register);		RXTXstate = RXTXstate +*Register;		*Register = TXLenghtByte2;					/* determine if there are broken bytes */		RFID_ReadSingle(Register, 1);					/* determine the number of bits */		if((*Register & BIT0) == BIT0)		{			*Register = (*Register >> 1) & 0x07;	/* mask the first 5 bits */			*Register = 8 -*Register;			buf[RXTXstate - 1] &= 0xFF << *Register;		}								/* if */		*Register = Reset;				/* reset the FIFO after last byte has been read out */		RFID_DirectCommand(Register);//		fprintf(&uart_str,"%c",0x0D);            //    	fprintf(&uart_str,"EOF received  \n");		i_reg = 0xFF;					/* signal to the recieve funnction that this are the last bytes */			}	else 	if(*Register == 0x60)	{									/* RX active and 9 bytes allready in FIFO */		i_reg = 0x01;				for(c=0;c<=250;c++)			buf[c] = 0x00;		buf[RXTXstate] = FIFO;		RFID_ReadCont(&buf[RXTXstate], 9);	/* read 9 bytes from FIFO */		RXTXstate = RXTXstate + 9;//		delay_ms(100);//		fprintf(&uart_str,"%c",0x0D);            //    	fprintf(&uart_str,"RX active\n");		if(irqPORT & irqPIN)		{			*Register = IRQStatus;		/* IRQ status register address */			RFID_ReadSingle(Register, 1);	/* function call for single address read */			irqCLR;			if (*Register == 0x40)			{	/* end of recieve */				*Register = FIFOStatus;				RFID_ReadSingle(Register, 1);					/* determine the number of bytes left in FIFO */				*Register = 0x0F & (*Register + 0x01);				buf[RXTXstate] = FIFO;						/* write the recieved bytes to the correct place of the															 * buffer;															 * */				RFID_ReadCont(&buf[RXTXstate], *Register);				RXTXstate = RXTXstate +*Register;				*Register = TXLenghtByte2;					/* determine if there are broken bytes */				RFID_ReadSingle(Register, 1);					/* determine the number of bits */				if((*Register & BIT0) == BIT0)				{					*Register = (*Register >> 1) & 0x07;	/* mask the first 5 bits */					*Register = 8 -*Register;					buf[RXTXstate - 1] &= 0xFF << *Register;				}						/* if *///				fprintf(&uart_str,"%c",0x0D);            //    			fprintf(&uart_str,"RX active 2\n");				i_reg = 0xFF;			/* signal to the recieve funnction that this are the last bytes */				*Register = Reset;		/* reset the FIFO after last byte has been read out */				RFID_DirectCommand(Register);//				fprintf(&uart_str,"%c",0x0D);            //    			fprintf(&uart_str,"register = %x \n",buf);			}			else if(*Register == 0x50)			{							// end of recieve and error 				i_reg = 0x02;//				fprintf(&uart_str,"%c",0x0D);            //    			fprintf(&uart_str,"End of receive error\n");			}		}		else		{			*Register = IRQStatus;			RFID_ReadSingle(Register, 2);	/* function call for single address read */			if(Register[0] == 0x00) i_reg = 0xFF;		}	}	else 	if((*Register & BIT4) == BIT4)	{						/* CRC error */		if((*Register & BIT5) == BIT5)		{			i_reg = 0x01;	/* RX active */			RXErrorFlag = 0x02;		}		else			i_reg = 0x02;	/* end of RX */	}	else 	if((*Register & BIT2) == BIT2)	{						/* byte framing error */		if((*Register & BIT5) == BIT5)		{			i_reg = 0x01;	/* RX active */			RXErrorFlag = 0x02;		}		else			i_reg = 0x02;	/* end of RX */	}	else 	if(*Register == BIT0)	{						/* No response interrupt */		i_reg = 0x00;//		fprintf(&uart_str,"%c",0x0D);            //    	fprintf(&uart_str,"No Response interrupt\n");	}	else	{						/* Interrupt register not properly set */		i_reg = 0x02;		*Register = StopDecoders;	/* reset the FIFO after TX */		RFID_DirectCommand(Register);		*Register = Reset;		RFID_DirectCommand(Register);		*Register = IRQStatus;		/* IRQ status register address */		RFID_ReadSingle(Register, 1);	/* function call for single address read *///		fprintf(&uart_str,"%c",0x0D);            //    	fprintf(&uart_str,"Interrupt error\n");	//	irqCLR;	}}	/* InterruptHandlerReader */void delay_ms(unsigned int n_ms) {    unsigned int ii1, ii0;    for(ii0=n_ms; ii0>0; ii0--) 	{        ii1 = 0x0033;                    // Delay        do (ii1--);        while (ii1 != 0);    }}// end of delay_ms	ISR(TIMER2_COMPA_vect){	unsigned char Register;		StopCounter;	Timer_Flag = 1;	Register = IRQStatus;		//IRQ status register address	irqCLR;				//PORT2 interrupt flag clear		RFID_ReadSingle(&Register, 1);	//function call for single address read								//IRQ status register has to be read	Register = Register & 0xF7;	//set the parity flag to 0//	fprintf(&uart_str,"%c",0x0D);            //    fprintf(&uart_str,"Timer Register = %x\n",Register);		if(Register == 0x00)	{      	i_reg = 0x00;	}	else		i_reg = 0x01;//	fprintf(&uart_str,"%c",0x0D);            //    fprintf(&uart_str,"IRQStatus 1 = %x\n",Register);}ISR(INT0_vect){	unsigned char Register[2];	StopCounter;					/* stop timer mode */	do	{		irqCLR;		Register[0] = IRQStatus;	/* IRQ status register address */		RFID_ReadSingle(Register, 1);	/* function call for single address read */		Last_Register[Last_Cnt] = Register[0];		Last_Cnt++;//		fprintf(&uart_str,"%c",0x0D);            //	   	fprintf(&uart_str,"Interrupt Register = %x\n",Register[0]);		/* IRQ status register has to be read */		if(*Register == 0xA0)		{	/* TX active and only 3 bytes left in FIFO *///			fprintf(&uart_str,"%c",0x0D);            //    		fprintf(&uart_str,"Interrupt FINISH\n");			goto FINISH;		}		else   			InterruptHandlerReader(&Register[0]);			}while((irqPORT & irqPIN) == irqPIN);FINISH://	sleep_cpu();	Nop = 1;}int main(){	unsigned char c=0;	unsigned char command[10];  	init();	stdout = stdin = &uart_str;	fprintf(&uart_str, "\nBefore main loop\n");/*	CountValue =  Count1ms*50;	CounterSet();		StartCounter;*/   	while(1)    	{/*	 // Timer_Flag = 0;	  if(Timer_Flag==1)	  {	  	Timer_Flag = 0;   		fprintf(&uart_str, "Loop counter = %x \n",cnt);//		StartCounter;	  }	  *///		PORTC = cnt;		for(c=0;c<=250;c++)			buf[c] = 0x00;		command[0] = Reset;		/* reset the FIFO after last byte has been read out */		RFID_DirectCommand(command);				command[0] = ChipStateControl;	 		command[1] = 0x21;		command[2] = ISOControl;				command[3] = 0x02;		RFID_WriteSingle(command, 4);		delay_ms(5);		flags = 0x06;//0x26		command[0] = 0x00;		RFID_RequestCommand(buf, 0x00, 0x00, 0);//		RFID_InventoryRequest(command, 0);			command[0] = ChipStateControl;			command[1] = 0x01;		RFID_WriteSingle(command, 2);		delay_ms(1);		command[0] = IRQStatus;//IRQStatus		RFID_ReadSingle(command, 1);			fprintf(&uart_str,"\n");		for(c=0;c<=10;c++)		{			fprintf(&uart_str,"Last Register = %02x\n",Last_Register[c]);		}		Last_Cnt = 0;				fprintf(&uart_str, "\n");		fprintf(&uart_str, "Buf = ");		for(c=0;c<=20;c++)		{		fprintf(&uart_str, "%02x ",buf[c]);				}	/*				fprintf(&uart_str, "\nAfter TX\n");		for(c=0;c<=0;c++)		{			delay_ms(100);				}*/		/*		RFID_Data[0] = TestSetting1;		RFID_Data[1] = 0x00;		RFID_WriteSingle(RFID_Data,2);		RFID_Data[0] = 0x00;		RFID_Data[1] = 0x00;		RFID_Data[0] = TestSetting1;		RFID_ReadSingle(&RFID_Data[0],1);*//*			fprintf(&uart_str,"%c",0x0D);                    fprintf(&uart_str,"buf = %x\n",buf[0]);				fprintf(&uart_str,"%c",0x0D);                    fprintf(&uart_str,"RFID i_reg = %x\n",i_reg);*//*		PORTC--;		if(PORTC<=1)		 PORTC = 0xFF;*///		PORTC = d;/*				for(c=1;c<=4000;c++)		{			_delay_ms(1);		}*/			}//while	return 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久亚洲一级片| 亚洲猫色日本管| 秋霞成人午夜伦在线观看| 欧美日韩国产精品成人| 亚洲国产一区在线观看| 欧美激情在线一区二区| 91老师国产黑色丝袜在线| 一区二区成人在线| 欧美欧美午夜aⅴ在线观看| 99久久er热在这里只有精品66| 亚洲综合一区二区精品导航| 欧美一级在线免费| 99精品视频中文字幕| 成人免费视频网站在线观看| 日韩精品欧美精品| 亚洲欧美日韩一区| 依依成人综合视频| 中文字幕不卡一区| 国产精品免费视频一区| 亚洲18影院在线观看| 欧美影视一区二区三区| 国产91精品一区二区麻豆网站 | 91蝌蚪porny| 99在线精品观看| 国产制服丝袜一区| 婷婷久久综合九色综合伊人色| 国产精品久久久久影院色老大| 精品播放一区二区| 日韩一级在线观看| 欧美日韩国产乱码电影| 欧美本精品男人aⅴ天堂| 欧美精品成人一区二区三区四区| 波多野结衣91| 欧美视频在线一区| 久久色在线视频| 亚洲欧美日本在线| 日本特黄久久久高潮| 亚洲福利国产精品| 国产伦精品一区二区三区免费迷 | 免费久久精品视频| 成人一级片网址| 欧洲人成人精品| 日本高清不卡aⅴ免费网站| 99视频有精品| 日韩精品专区在线影院观看| 欧美一区二区三区影视| 久久久综合九色合综国产精品| 欧美大片免费久久精品三p| 中文字幕制服丝袜成人av| 天涯成人国产亚洲精品一区av| 成人综合婷婷国产精品久久| 欧美一区二区福利在线| 亚洲欧美韩国综合色| 国产一区 二区| 欧美一区二区三区在线看| 亚洲免费观看高清完整版在线 | 午夜av一区二区| 成人一区二区视频| 欧美大片国产精品| 日韩综合小视频| 91免费版在线看| 欧美国产在线观看| 九色综合狠狠综合久久| 久久99日本精品| 成人伦理片在线| 精品电影一区二区| 久久精品国产77777蜜臀| 欧美色视频在线观看| 日韩视频永久免费| 亚洲一本大道在线| 在线看国产一区| 国产精品国产精品国产专区不蜜| 国产一区二区精品久久99| 欧美成人一区二区三区在线观看| 天天免费综合色| 欧美在线999| 亚洲网友自拍偷拍| 欧美精品777| 日韩激情在线观看| 欧美在线播放高清精品| 亚洲午夜一二三区视频| 欧美吞精做爰啪啪高潮| 亚洲一区二区视频| 欧美日韩国产片| 日韩中文字幕麻豆| 欧美一区二区视频免费观看| 久久99精品国产麻豆婷婷洗澡| 欧美一区二区三区免费在线看| 偷拍一区二区三区四区| 欧美丰满少妇xxxxx高潮对白 | 777久久久精品| 国产精品乱子久久久久| 成人av影院在线| 精品国产乱子伦一区| 国产一区二区三区四区在线观看| 亚洲精品一区二区三区四区高清| 国产乱对白刺激视频不卡| 欧美片网站yy| 麻豆成人av在线| 制服丝袜亚洲网站| 国产一区二区在线观看免费| 国产精品拍天天在线| 色天天综合久久久久综合片| 国产精品视频第一区| av在线综合网| 奇米影视一区二区三区小说| 久久日一线二线三线suv| thepron国产精品| 午夜在线成人av| 久久久国产一区二区三区四区小说 | 亚洲国产欧美在线人成| 欧美一区二区精美| 成人午夜免费视频| 午夜精品一区二区三区电影天堂 | 成人黄色777网| 午夜欧美电影在线观看| 久久精品免视看| 国产精品自拍毛片| 一区二区三区四区国产精品| 日韩视频一区二区三区 | 国产精品久久久久永久免费观看 | 国产精品69毛片高清亚洲| 国产精品的网站| 欧美一区二区免费观在线| av日韩在线网站| 黄色日韩网站视频| 亚洲一卡二卡三卡四卡| 国产日本欧洲亚洲| 国产盗摄女厕一区二区三区| 亚洲国产精品ⅴa在线观看| 欧美色国产精品| 丁香五精品蜜臀久久久久99网站 | 欧美成人午夜电影| 色综合久久久久| 国产成人精品一区二区三区网站观看| 亚洲国产日产av| 亚洲黄色录像片| 中文字幕 久热精品 视频在线| 这里只有精品99re| 欧美性色黄大片手机版| 成人免费电影视频| 国产成人精品免费网站| 精品中文av资源站在线观看| 亚洲国产综合人成综合网站| 亚洲私人影院在线观看| 欧美老女人在线| 色屁屁一区二区| 91小视频在线| 成人高清免费在线播放| 高清在线观看日韩| 国产二区国产一区在线观看| 国产精品资源在线| 国产一区亚洲一区| 国产美女av一区二区三区| 看电影不卡的网站| 久久99精品久久久| 韩国三级中文字幕hd久久精品| 麻豆成人在线观看| 日韩国产在线一| 日本不卡123| 日本不卡视频在线| 另类人妖一区二区av| 久久99久久久欧美国产| 久久精品久久精品| 国产一区亚洲一区| 福利电影一区二区| 97se亚洲国产综合自在线不卡| 91在线视频观看| 欧美三级韩国三级日本三斤| 欧亚一区二区三区| 51午夜精品国产| 日韩精品综合一本久道在线视频| 日韩精品一区二区三区中文不卡 | 亚洲动漫第一页| 天堂午夜影视日韩欧美一区二区| 婷婷开心久久网| 激情另类小说区图片区视频区| 国产成人av电影在线播放| www.欧美色图| 制服丝袜亚洲网站| 精品久久一二三区| 中文字幕一区二区三| 欧美成人精品3d动漫h| 久久久久久**毛片大全| 亚洲精品成a人| 久久精品国产一区二区三| 国产成人午夜精品影院观看视频 | 91精品国产高清一区二区三区蜜臀| 91精品国产一区二区三区香蕉 | 国产99久久久国产精品免费看| 99久久国产综合精品色伊| 欧美裸体一区二区三区| 国产亚洲综合av| 艳妇臀荡乳欲伦亚洲一区| 久久91精品国产91久久小草| 色综合网色综合| 色婷婷综合久久| 日韩欧美中文一区二区| 亚洲欧美日韩国产一区二区三区| 视频一区在线播放|