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

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

?? vdbavr.inc

?? 無線傳感器網(wǎng)絡(luò)mica2平臺下的增加串口調(diào)試源程序
?? INC
字號:
/* VDB debugging utility   author: Lin Gu <lingu@cs.virginia.edu> *//* If the application does not use the GenericComm/GenericCommPromiscurious    component, and there is no handler for UART interrupts, the macro    NO_COMM must be defined so that the vdb handles the UART interrupt. Note    that, though any multiple modules can include "vdbavr.inc", only one    can have NO_COMM defined.    To define NO_COMM, just uncomment the line below. */// #define NO_COMM#include "vdbavr.h"#include <string.h>// #include "stdarg.h"//#include <avr/io.h>//#include <hw.h>//#include <stdio.h>//#include "stdio.inc"//#include <stdlib.h>//#include "commontknl.h"//#include "bl_flash.h"//extern int	vsprintf(char *__s, const char *__fmt, va_list ap);#define SYSCLK (14745600UL/2)#ifndef UCSRB#ifdef UCSR1A /* atmega 128 */#define UCSRA UCSR1A#define UCSRB UCSR1B#define UBRR UBRR1L#define UDR UDR1#endif#endifchar cFlag;/* UART running with mica2 convention:  115kbps, N-8-1 */int initUSART() {  outp(0,UBRR0H);   // 57.6 KBps  outp(15, UBRR0L);  outp((1<<U2X),UCSR0A);  // double speed  outp(((1 << UCSZ1) | (1 << UCSZ0)) , UCSR0C);  // 8 data-bits, 1 stop-bit  outp(((1 << RXCIE) | (1 << TXCIE) | (1 << RXEN) | (1 << TXEN)) ,UCSR0B);  // Enable recieve/transmit/interrupts  cFlag |= 1;  return 1;} // uartinit/*Not supported now to save code size.int vdbPrintf(char *pstrFormat, ...){  va_list args;  char strOutBuf[100];  uint8_t i;  if (!(cFlag & 1))    {      initUSART();      doze(10);      //vdbPrintf("vdbavr.vdbPrintf: USART initialized\n"); /////// this does not seem to be printed out    }  va_start(args, pstrFormat);  vsprintf(strOutBuf, pstrFormat, args);  va_end(args);  for (i=0; i<strlen(strOutBuf); i++)    {      // printf("%c", strOutBuf[i]);      doze(90);      outp(strOutBuf[i], UDR0);       sbi(UCSR0A, TXC);    }  doze(100);     outp(0x00, UCSR0A);    outp(0x00, UCSR0B);    outp(0x00, UCSR0C);  return 1;} // vdbPrintf*///#define PUT_WAIT 6500 /* was 110 */#define PUT_WAIT 1500void usartPut(uint8_t c){  doze(PUT_WAIT);      outp(c, UDR0);       sbi(UCSR0A, TXC);}#ifdef NO_COMM  TOSH_INTERRUPT(SIG_UART0_TRANS) {    return;    // signal UART.putDone();  }#endifvoid usartPutChipHex(uint8_t cChip){  if (cChip > 9)    {      usartPut('a'+cChip-10);    }  else    {      usartPut('0'+cChip);    }}void usartPutHex(uint8_t c){  usartPutChipHex(c>>4);  usartPutChipHex(c&0xf);}void usartPutLong(uint32_t l){  uint8_t *pcByte = ((char *)(&l)) + 3;  if (!l)    {      usartPut('0');      return;    }  usartPut('0');  usartPut('x');  usartPutHex(*pcByte);  pcByte--;  usartPutHex(*pcByte);  pcByte--;  usartPutHex(*pcByte);  pcByte--;  usartPutHex(*pcByte);}void usartPutInt(uint16_t l){  uint8_t *pcByte = ((char *)(&l)) + 1;  if (!l)    {      usartPut('.');      return;    }  usartPut('0');  usartPut('x');  usartPutHex(*pcByte);  pcByte--;  usartPutHex(*pcByte);}/*int vdbPrintf(char *format, ...){  return vdbPrint(format);}#ifndef TKNL_RESTRICTED_SIZEuint8_t vdbPrint(char *pstr){  uint8_t i;  if (!pstr) return 0;  if (!(cFlag & 1))    {      initUSART();      doze(10);    }  for (i=0; i<strlen(pstr); i++)    {      doze(90);      outp(pstr[i], UDR0);       sbi(UCSR0A, TXC);    }  doze(100);  return 1;}#endif*/void vdbPrintln4(char *pstr, uint32_t l1, uint32_t l2, uint32_t l3, uint32_t l4){  print(pstr, l1, l2, l3, l4);}uint8_t print(char *pstr, uint32_t l1, uint32_t l2, uint32_t l3, uint32_t l4){  uint8_t i;	//cli();	  if (!(cFlag & 1))    {      initUSART();      doze(10);    }  if (pstr)     {      for (i=0; i<strlen(pstr); i++)	{	  usartPut(pstr[i]);	}    } // if pstr  usartPut(' ');  usartPutLong(l1);  usartPut(' ');  usartPutLong(l2);  usartPut(' ');  usartPutLong(l3);  usartPut(' ');  usartPutLong(l4);  usartPut('\n');  doze(100);//	sei();  return 1;} // vdbPrintln4uint8_t vdbPrintln2Int(uint16_t l1, uint16_t l2){  if (!(cFlag & 1))    {      initUSART();      doze(10);    }  usartPut(' ');  usartPut('=');  usartPut(' ');  usartPutInt(l1);  usartPut(' ');  usartPutInt(l2);  usartPut('\n');  doze(100);  return 1;} // vdbPrintln2Intvoid blueScreen(uint8_t n) {  blueLong(n, 0, 0, 0);}void blueLong(uint8_t cErrNo, uint32_t l1, uint32_t l2, uint32_t l3){  for (;;)    {      print("t-k ctrl", cErrNo, l1, l2, l3);      l3 = 800;      while (l3)	doze(l3--);      //      longWait();    } // for}void doze(int nMicroSec) {    while (nMicroSec > 0) {      asm volatile  ("nop" ::);      asm volatile  ("nop" ::);      asm volatile  ("nop" ::);      asm volatile  ("nop" ::);      asm volatile  ("nop" ::);      asm volatile  ("nop" ::);      nMicroSec--;    }}/* print stack information, including the stack pointer and   the top elements in the stack. */inline void stackInfo(){  asm volatile (    "in r24, 0x3d" "\n\t"    "in r25, 0x3e" "\n\t"    "eor r26, r26" "\n\t"    "eor r27, r27" "\n\t"    "call vdbPrintln2Int" "\n\t"    :    :  );} // stackInfouint16_t getSP(){  uint16_t nSP; // asm ("r24");  nSP = 0;  asm volatile (    "in %A0, 0x3d" "\n\t"    "in %B0, 0x3e" "\n\t"    : "=r" (nSP)    :  );  return nSP;} // getSP#define isStackBelow(x) (!(isStackAbove(x)))char isStackAbove(uint16_t nLowerBoundary){  if (getSP() >= nLowerBoundary)	return 1;  else	return 0;} // isStackAbove/* write a byte to EEPROM */void _eepromWriteByte(uint8_t *addr, uint8_t val)  {/* addr = r25:r24, val = r22 */    asm volatile (	"push	r22"  "\n\t"	"push	r23"  "\n\t"	"push	r24"  "\n\t"	"push	r25"  "\n\t"	"push	r0"  "\n\t"	".global vdb_eeprom_write_byte" "\n\t"	"vdb_eeprom_write_byte:" "\n\t"	//"sbic	_SFR_IO_ADDR(EECR), EEWE" "\n\t"	"sbic 0x1c, 1" "\n\t"	"rjmp	vdb_eeprom_write_byte" "\n\t"	"out	0x1f, %B0"  "\n\t"	"out	0x1e, %A0" "\n\t"	"out	0x1d, %1" "\n\t"	"in	r0, 0x3f" "\n\t"	"cli"  "\n\t"	"sbi	0x1c, 2" "\n\t"	"sbi	0x1c, 1" "\n\t"	"out	0x3f, r0" "\n\t"	"pop r0" "\n\t"	"pop r25" "\n\t"	"pop r24" "\n\t"	"pop r23" "\n\t"	"pop r22" "\n\t"	:	: "d" (addr),	  "r" (val)	);    //#undef val    return;  }/* read one byte from EEPROM */uint8_t _eepromReadByte(const uint8_t *addr)  {/* addr = r25:r24, result = r25(=0):r24 */    register uint16_t r asm("r24");    asm volatile (		  //	"lds r24, eeprom_addr_l" "\n\t"		  //	"lds r25, eeprom_addr_h" "\n\t"	".global vdb_eeprom_read_byte"  "\n\t"	"vdb_eeprom_read_byte:"  "\n\t"	"sbic	0x1c, 1"  "\n\t"	"rjmp	vdb_eeprom_read_byte"  "\n\t"	/* make sure EEPROM is ready */	//#ifdef EEARH//	"ldi r22, 1" "\n\t"	"out	0x1f, %B0"  "\n\t"	//#endif//	"ldi r22, 0" "\n\t"	"out	0x1e, %A0"  "\n\t"	"sbi	0x1c, 0"  "\n\t"	"clr	r25"  "\n\t"		/* gcc wants result extended to "int"? */	"in	r24,0x1d"  "\n\t"	//	"sts r24, eeprom_data" "\n\t"	:	: "d" (addr)	);    return r;  } char logEepromByte(unsigned int addr, char this_data){//    eeprom_addr_h = 1;//    eeprom_addr_l = 0;//    eeprom_data = this_data;    _eepromWriteByte((uint8_t *)addr, this_data);    // print("written", 0,0,0,0);    return 1;  } char readEepromByte(unsigned int addr)    {      char c;	c = _eepromReadByte((uint8_t *)addr);//      print("reading", gnRead, pcRead, c, eeprom_data);      // gnRead++;      return c;  }void _showLed(char c){  asm volatile (		"push r24" "\n\t"		"sbi 0x1a, 2" "\n\t"		"sbi 0x1a, 1" "\n\t"		"sbi 0x1a, 0" "\n\t"		"sbi 0x1b, 0" "\n\t"		"sbi 0x1b, 1" "\n\t"		"sbi 0x1b, 2" "\n\t"		"mov r24, %0" "\n\t"		"sbrc r24, 0" "\n\t"		"cbi 0x1b, 0" "\n\t"		"sbrc r24, 1" "\n\t"		"cbi 0x1b, 1" "\n\t"		"sbrc r24, 2" "\n\t"		"cbi 0x1b, 2" "\n\t" 		"pop r24" "\n\t"		:		: "r" (c)		);}void assert(int n){  while (!n)    {      // cli();      asm volatile ("cli"::);      _showLed(7);      }}void assertNum(int n, char cLed){  while (!n)    {      // cli();      asm volatile ("cli"::);      _showLed(cLed);      }}#undef NO_COMM     /*									tab:4      *      *      * "Copyright (c) 2004-2005 The the University  of Virginia.        * All rights reserved.      *      * Permission to use, copy, modify, and distribute this software and its      * documentation for any purpose, without fee, and without written agreement is      * hereby granted, provided that the above copyright notice, the following      * two paragraphs and the author appear in all copies of this software.      *       * IN NO EVENT SHALL THE UNIVERSITY OF VIRGINIA BE LIABLE TO ANY PARTY FOR      * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT      * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF      * VIRGINIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.      *       * THE UNIVERSITY OF VIRGINIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,      * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY      * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS      * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF VIRGINIA HAS NO OBLIGATION TO      * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."      *      */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区三区免费看 | 精品久久国产字幕高潮| 亚洲国产欧美一区二区三区丁香婷| 97精品久久久久中文字幕| 中文字幕日韩一区二区| 91国在线观看| 日韩不卡一区二区| 久久夜色精品国产噜噜av| 国产精选一区二区三区| 中文字幕不卡的av| 欧美中文字幕一二三区视频| 亚洲成人综合网站| 日韩欧美一二三四区| 国产福利一区在线| 亚洲人成在线播放网站岛国| 欧美欧美欧美欧美首页| 麻豆一区二区99久久久久| 久久久久国产精品麻豆ai换脸| av在线不卡免费看| 五月开心婷婷久久| 国产亚洲精品资源在线26u| 91网站最新地址| 日韩电影免费在线看| 久久久国产精华| 在线精品视频免费观看| 另类小说色综合网站| 国产精品第四页| 制服丝袜日韩国产| 波多野结衣中文字幕一区| 午夜精品福利视频网站| 久久久久久麻豆| 欧美日本不卡视频| 成人黄色a**站在线观看| 天堂久久久久va久久久久| 26uuu国产电影一区二区| 91麻豆视频网站| 韩国中文字幕2020精品| 亚洲观看高清完整版在线观看| 国产视频一区二区在线观看| 欧美日韩一区在线观看| 成人三级伦理片| 日韩av中文在线观看| 亚洲老司机在线| 337p日本欧洲亚洲大胆色噜噜| 在线一区二区视频| 国产大陆精品国产| 青青草成人在线观看| 亚洲视频网在线直播| 久久久精品天堂| 91精品国产色综合久久ai换脸 | 成人91在线观看| 蜜桃av一区二区在线观看| 中文字幕一区二区三区在线不卡 | 96av麻豆蜜桃一区二区| 韩国成人福利片在线播放| 亚洲第一福利一区| 亚洲桃色在线一区| 久久久久88色偷偷免费| 精品人在线二区三区| 4hu四虎永久在线影院成人| 色婷婷激情综合| 成人午夜在线播放| 国产一区在线看| 久久成人免费网站| 日韩精品五月天| 天天色综合天天| 香蕉久久夜色精品国产使用方法| 一区二区三区91| 国产精品―色哟哟| 亚洲国产精品99久久久久久久久 | 99视频在线精品| 国产成人在线影院| 国产成人亚洲精品狼色在线 | 婷婷开心久久网| 亚洲一级片在线观看| 亚洲一区二区在线免费观看视频 | 中文字幕一区二区三| 国产精品激情偷乱一区二区∴| 久久一区二区三区四区| 久久一区二区三区国产精品| 精品粉嫩aⅴ一区二区三区四区| 日韩欧美国产一二三区| 日韩女优电影在线观看| 久久一日本道色综合| 国产日产欧美一区二区三区| 国产欧美日韩综合| 中文字幕五月欧美| 一区二区三区四区在线免费观看 | 91精品一区二区三区在线观看| 欧美日本不卡视频| 欧美videos中文字幕| 久久精品一区二区三区不卡| 国产精品视频一二三区| 亚洲欧洲日韩av| 亚洲一区二三区| 蜜桃视频第一区免费观看| 国产成人啪午夜精品网站男同| caoporn国产精品| 91论坛在线播放| 欧美日韩一区不卡| 欧美视频自拍偷拍| 日韩西西人体444www| 久久综合九色综合97婷婷| 国产精品人人做人人爽人人添| 综合亚洲深深色噜噜狠狠网站| 亚洲自拍偷拍麻豆| 免费观看成人av| 成人午夜精品在线| 欧美视频完全免费看| 日韩欧美国产一二三区| 中文字幕亚洲一区二区va在线| 亚洲国产日日夜夜| 极品美女销魂一区二区三区免费| 丁香桃色午夜亚洲一区二区三区| 色偷偷久久人人79超碰人人澡 | 欧美无人高清视频在线观看| 日韩欧美国产不卡| 国产精品久久777777| 日韩avvvv在线播放| 不卡的看片网站| 日韩欧美中文字幕制服| 国产精品嫩草久久久久| 五月激情综合婷婷| bt欧美亚洲午夜电影天堂| 欧美精品久久99| 欧美韩国日本一区| 午夜av电影一区| 成人国产精品免费网站| 日韩欧美亚洲一区二区| 亚洲精品中文在线| 国产一区二区在线视频| 欧美美女网站色| 国产精品国产三级国产三级人妇| 麻豆成人久久精品二区三区小说| 91麻豆精品在线观看| 国产夜色精品一区二区av| 日本欧美一区二区三区| 91麻豆swag| 国产精品久久久久桃色tv| 久久精品国产亚洲5555| 欧美少妇xxx| 国产精品高潮呻吟久久| 国产一区二区不卡| 91精品免费观看| 五月婷婷色综合| 欧美午夜理伦三级在线观看| 国产精品二区一区二区aⅴ污介绍| 精彩视频一区二区三区| 欧美一级电影网站| 偷窥少妇高潮呻吟av久久免费| 99re这里只有精品视频首页| 中文字幕欧美三区| 国产精品77777竹菊影视小说| 欧美xxxxxxxx| 日本欧美在线观看| 欧美丰满嫩嫩电影| 亚洲线精品一区二区三区八戒| 91麻豆蜜桃一区二区三区| 国产精品国产a| www.在线成人| 亚洲婷婷在线视频| 不卡的av电影| 亚洲三级视频在线观看| av动漫一区二区| 中文字幕在线一区免费| aaa欧美日韩| 一区在线播放视频| 91丨九色丨国产丨porny| 亚洲色图.com| www.亚洲精品| 亚洲影院免费观看| 91福利区一区二区三区| 亚洲一区二区三区小说| 欧美视频一区二区| 奇米色一区二区三区四区| 日韩女优毛片在线| 狠狠色综合播放一区二区| 国产亚洲欧美激情| 99re热视频精品| 亚洲欧美一区二区久久| 欧美天堂一区二区三区| 日本伊人色综合网| 日韩女优电影在线观看| 国产高清不卡一区| 亚洲女爱视频在线| 欧美片在线播放| 激情五月播播久久久精品| 欧美国产精品一区二区三区| 奇米色一区二区三区四区| 欧美福利电影网| 精彩视频一区二区三区| 国产精品久99| 欧美电影影音先锋| 国产乱子伦视频一区二区三区| 亚洲欧洲精品一区二区三区不卡| 欧美无砖专区一中文字| 激情伊人五月天久久综合| 中文欧美字幕免费| 欧美日韩精品专区| 国产v日产∨综合v精品视频|