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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? stxetxtest.c

?? ATMEL的AVR單片機(jī)庫文件
?? C
字號:
//*****************************************************************************
// File Name	: stxetxtest.c
// Title		: Example usage of STX/ETX packet protocol and library code
// Revision		: 0.1
// Notes		: 
// Target MCU	: Atmel AVR series
// Editor Tabs	: 4
// 
// Revision History:
// When			Who			Description of change
// -----------	-----------	-----------------------
// 20-Nov-2002	pstang		Created the program
//*****************************************************************************

//----- Include Files ---------------------------------------------------------
#include <avr/io.h>		// include I/O definitions (port names, pin names, etc)
#include <avr/signal.h>	// include "signal" names (interrupt names)
#include <avr/interrupt.h>	// include interrupt support
#include <avr/pgmspace.h>

#include "global.h"		// include our global settings
#include "uart.h"		// include uart function library
#include "rprintf.h"	// include printf function library
#include "timer.h"		// include timer function library
#include "lcd.h"		// include LCD support
#include "stxetx.h"		// include STX/ETX packet support


// make a transmitting packet buffer area in memory
// where we can assemble the data we wish to transmit
// using stx/etx
unsigned char TxPacket[20];

// function prototypes
void receiveStxEtx(void);
void transmitStxEtx(void);
u08 getSw(void);

// main code
int main(void)
{
	// initialize the AVRlib libraries
	timerInit(); 				// initialize the timer system
	uartInit(); 				// initialize the UART (serial port)
	lcdInit();
	rprintfInit(lcdDataWrite);	// init rprintf

	// we will be using the AVR UART to communicate the
	// STX/ETX protocol to another AVR board or to a PC
	
	// initialize stxetx to use the UART for sending data
	stxetxInit(uartSendByte);

	// set baud rate to 4800 (less than 5000) if communicating using
	// the Linx LC radio modules
	uartSetBaudRate(4800);

	// choose to either transmit or receive
	transmitStxEtx();
	//receiveStxEtx();

	return 0;
}

void transmitStxEtx(void)
{
	u16 packetNum=0;

	lcdClear();

	while(1)
	{
		// assemble the data I wish to send inside a STX/ETX packet
		// send the string "ALOHA"
		TxPacket[0] = 'A';
		TxPacket[1] = 'L';
		TxPacket[2] = 'O';
		TxPacket[3] = 'H';
		TxPacket[4] = 'A';
		// send the packet number
		TxPacket[5] = packetNum>>8;		// high byte
		TxPacket[6] = packetNum;		// low byte
		// send the current state of PORTA
		TxPacket[7] = inb(PINA);

		// send the packet with:
		// packet status = 0
		// packet type = 0x55
		// (the packet type and status may be, and mean, anything the user wishes)
		// 8-bytes of user data
		stxetxSend(0, 0x55, 8, TxPacket);

		// output our packet data to the LCD
		lcdGotoXY(0,0);		rprintf("Sending..."); 
		lcdGotoXY(20,0);	rprintf("PORTA: "); rprintfu08(inb(PINA));
		lcdGotoXY(0,1);		rprintf("String: ALOHA");
		lcdGotoXY(20,1);	rprintf("PacketNum: "); rprintfu16(packetNum);

		// increment our packet number
		packetNum++;
		// pause for a moment
		timerPause(10);
	}
}

void receiveStxEtx(void)
{
	u16 packetNum=0;
	u08* dataPtr;

	lcdClear();

	while(1)
	{
		lcdGotoXY(0,0);		rprintf("Receiving..."); 

		// here we get the UART's receive buffer and give it to the STX/ETX
		// packet processing function.  If the packet processor finds a valid
		// packet in the buffer, it will return true.
		if(stxetxProcess(uartGetRxBuffer()))
		{
			// sxtetxProcess has reported that it found a packet
			// let's get the data...

			// (NOTE: although I discard the status, type, and datalength
			// below, it would be important if I were sending more than one
			// kind of packet)

			// get the packet's status
			stxetxGetRxPacketStatus();
			// get the packet's type
			stxetxGetRxPacketType();
			// get the packet's datalength
			stxetxGetRxPacketDatalength();
			// get a pointer to the place where the received data is stored
			dataPtr = stxetxGetRxPacketData();

			// decode packet number
			packetNum = (dataPtr[5]<<8) | dataPtr[6];

			// output our packet data to the LCD
			lcdGotoXY(20,0);	rprintf("PORTA: "); rprintfu08( dataPtr[7] );
			lcdGotoXY(0,1);		rprintf("String: ");
			// print out the string
			rprintfChar( dataPtr[0] );
			rprintfChar( dataPtr[1] );
			rprintfChar( dataPtr[2] );
			rprintfChar( dataPtr[3] );
			rprintfChar( dataPtr[4] );
			lcdGotoXY(20,1);	rprintf("PacketNum: "); rprintfu16(packetNum);
		}
	}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区成人6969| 91高清视频在线| 国产精品原创巨作av| 欧美三级欧美一级| 亚洲国产高清aⅴ视频| 日本伊人精品一区二区三区观看方式| 国产精品一级在线| 日韩欧美不卡在线观看视频| 亚洲蜜臀av乱码久久精品蜜桃| 国产在线播放一区三区四| 在线免费观看视频一区| 欧美在线观看视频在线| 亚洲视频小说图片| 国模无码大尺度一区二区三区| 国产精品66部| 91精品久久久久久久91蜜桃| 亚洲欧美激情小说另类| 色香蕉成人二区免费| 亚洲欧美偷拍卡通变态| 91福利在线免费观看| 午夜精品在线看| 久久久国产精华| 一本久久精品一区二区| 中文字幕亚洲区| 国产一区二区精品久久91| 国产拍欧美日韩视频二区| 国产成人av影院| 中文字幕精品一区二区精品绿巨人| 一本大道综合伊人精品热热| 夜夜嗨av一区二区三区中文字幕 | 91视频免费观看| 亚洲18色成人| 欧美国产日产图区| 欧美绝品在线观看成人午夜影视| 精品一区二区在线免费观看| 亚洲欧美色综合| 69堂成人精品免费视频| 国产一区二区三区在线观看精品| 国产精品久久久久桃色tv| 51精品视频一区二区三区| 成人午夜激情在线| 蜜臀国产一区二区三区在线播放 | 在线观看亚洲一区| 亚洲高清不卡在线观看| 欧美电视剧免费观看| 欧美日韩一卡二卡| 91成人国产精品| a在线欧美一区| 国产剧情在线观看一区二区| 日韩**一区毛片| 日韩黄色免费网站| 午夜av一区二区| 亚洲午夜久久久久| 亚洲成人免费在线观看| 亚洲自拍偷拍综合| 亚洲综合视频网| 午夜精品福利在线| 亚洲五月六月丁香激情| 亚洲国产一区二区视频| 亚洲成av人片| 麻豆精品久久久| 国产一区高清在线| www.欧美.com| 欧美在线视频不卡| 欧美成人一级视频| 久久精品一区二区三区av| 国产精品免费丝袜| 中文字幕精品一区二区精品绿巨人 | 午夜亚洲国产au精品一区二区| 蜜臀av亚洲一区中文字幕| 成人av电影在线| 日韩精品一区二区三区视频播放| 中文字幕av资源一区| 首页综合国产亚洲丝袜| 成人精品电影在线观看| 欧美一区三区二区| 国产精品久久久久久福利一牛影视 | 国产很黄免费观看久久| 欧美日韩精品欧美日韩精品一| 久久美女艺术照精彩视频福利播放 | 一区精品在线播放| 国内精品嫩模私拍在线| 欧美视频在线一区二区三区| 国产日韩欧美激情| 人人精品人人爱| 欧美日韩激情一区二区| 亚洲视频在线一区| 国产**成人网毛片九色| 日韩欧美激情一区| 日本成人在线看| 69堂精品视频| 美腿丝袜亚洲综合| 亚洲影院免费观看| 色噜噜狠狠色综合中国| 国产精品二三区| 99精品偷自拍| 一区二区三区日韩欧美精品 | 国产一区美女在线| 久久综合色婷婷| 国产福利一区在线观看| 国产日韩欧美精品一区| 99热精品国产| 视频一区视频二区中文| 日韩欧美一区中文| 国产精品一区免费视频| 亚洲国产岛国毛片在线| 在线观看av一区二区| 日韩激情视频在线观看| 2021中文字幕一区亚洲| 床上的激情91.| 亚洲国产日韩在线一区模特| 日韩欧美视频一区| 国产v日产∨综合v精品视频| 自拍偷拍国产精品| 欧美精品aⅴ在线视频| 国产精品1024| 五月天网站亚洲| 中文字幕欧美激情| 7777精品伊人久久久大香线蕉| 高清成人在线观看| 亚洲成人激情综合网| 国产欧美一区二区精品久导航| 欧美在线免费观看视频| 国产精品一区一区| 午夜精品免费在线观看| 国产精品美女久久久久aⅴ国产馆| 91国偷自产一区二区三区观看| 精品亚洲国内自在自线福利| 综合激情网...| 久久久99久久| 精品剧情v国产在线观看在线| 欧美私模裸体表演在线观看| 豆国产96在线|亚洲| 精品亚洲porn| 蜜桃在线一区二区三区| 日精品一区二区三区| 亚洲国产视频在线| 亚洲综合无码一区二区| 亚洲精品视频在线| 国产精品麻豆久久久| 国产精品国产馆在线真实露脸| 久久久久99精品国产片| 久久亚洲精品国产精品紫薇| 日韩欧美亚洲国产另类| 日韩欧美一区二区久久婷婷| 欧美sm极限捆绑bd| 日韩亚洲国产中文字幕欧美| 日韩一区二区三区视频| 日韩午夜激情免费电影| 精品久久五月天| 日韩一区二区在线观看视频| 欧美va日韩va| 国产欧美日韩在线| 亚洲欧美另类小说视频| 亚洲综合网站在线观看| 免费一级欧美片在线观看| 国产美女精品在线| 丰满少妇久久久久久久| 91麻豆蜜桃一区二区三区| 在线综合视频播放| 国产欧美视频在线观看| 中文字幕制服丝袜一区二区三区| 夜色激情一区二区| 蜜桃传媒麻豆第一区在线观看| 国产精品自拍三区| 色偷偷久久人人79超碰人人澡| 欧美日本韩国一区二区三区视频| 久久色在线观看| 国产米奇在线777精品观看| 欧美色视频在线观看| 久久久久久97三级| 天堂在线亚洲视频| 色网综合在线观看| 国产欧美日韩综合精品一区二区| 日本最新不卡在线| 一本色道久久综合亚洲91| 日韩精品一区二区三区视频在线观看 | 国产福利一区二区| 日韩视频在线一区二区| 一个色综合网站| av一区二区久久| 国产精品系列在线| 精品一区二区久久久| 欧美三区在线视频| 亚洲三级在线免费| 91在线视频免费观看| 日本一二三不卡| 国产乱子伦视频一区二区三区| 日韩一级在线观看| 午夜精品福利一区二区三区av| 91九色最新地址| 一区二区三区中文字幕电影| 色诱视频网站一区| 亚洲一线二线三线视频| 欧美性感一类影片在线播放| 亚洲欧美日韩国产综合在线| 国产综合色视频| 久久网站最新地址| 成人av综合在线| 亚洲国产精品自拍|