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

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

?? main.c.bak.bak

?? 這個是嵌入式arm系列的一個bootloader程序。對需要編寫bootloader的很有參考價值
?? BAK
?? 第 1 頁 / 共 4 頁
字號:

void WINAPIV NKDbgPrintfW(LPCWSTR lpszFmt, ...)  
{

}

int StoreEBootCFG(EBOOTCFG *EBootCFG)
{
	volatile DWORD * pdwFlash;
	DWORD *pCFG;
	int i,j,k;
		
	EdbgOutputDebugString("StoreEBootCFG.\r\n");
	j = sizeof(EBOOTCFG)/4;
	pdwFlash	= (volatile DWORD *)(FLASH_CFG_START); 

	// Erase the EBootCFG block
	FlashErase((DWORD)pdwFlash, 128*1024);  

	pCFG = (DWORD *)EBootCFG;

	// Program the contents of EBOOTCFG one DWORD at a time.
	for(i = 0; i < j; i++)
	{

		*pdwFlash = 0x00400040;
		*pdwFlash = *(DWORD *)(pCFG+i);
		k = 0;
		while((k & 0x00800080) != 0x00800080)
		{
			k = (*pdwFlash);
		}
		if (k & 0x00000008)
			EdbgOutputDebugString("Voltage Range Error ... \r\n");

		if (k & 0x00000002)
			EdbgOutputDebugString("Device Protect Error ... \r\n");

		if (k & 0x00000010)
			EdbgOutputDebugString("Programming Error ... \r\n");
		
		pdwFlash++;

	}
	// Put flash back into read mode.
	*pdwFlash = 0x00FF00FF;
	return 0;
}

int LoadEBootCFG(EBOOTCFG *EBootCFG)
{
	volatile DWORD * pdwFlash;
	DWORD *pCFG;
	DWORD i,j;
	
	j = sizeof(EBOOTCFG)/4;
	pdwFlash	= (volatile DWORD *)(FLASH_CFG_START);
	pCFG = (DWORD *)EBootCFG;

	// Read the contents of Flash into EBOOTCFG one DWORD at a time.
	*pdwFlash = 0x00FF00FF;
	for(i = 0; i < j; i++)
	{
		*(DWORD *)(pCFG+i) = *(pdwFlash+i);
	}

	// Is the CFG data valid?  Check for the magic number that was written the last time
	// the CFG block was updated.  If Eboot has never been run, there will be no configuration
	// information, so the magic number will likely not be found.  In this case, setup the 
	// factory defaults and store them into Flash.
	if (EBootCFG->ConfigMagicNumber != EbootCFGMagicNumber)
	{
		ResetFactoryDefaultCFG(EBootCFG);
	}

	return 0;
}

void ResetFactoryDefaultCFG(EBOOTCFG *pEbootCFG)
{
	EdbgOutputDebugString("\r\nResetting factory default configuration ... \r\n");
	pEbootCFG->autoDownloadImage = TRUE;
	pEbootCFG->IP = inet_addr("10.1.15.240"); 
	pEbootCFG->subnetMask = inet_addr("255.255.254.0"); 
	pEbootCFG->numBootMe = 25;
	pEbootCFG->delay = 5;
	pEbootCFG->DHCPEnable = FALSE;
	//======= Daric 2002/08/23 ========//
	pEbootCFG->dwLaunchAddr = 0x98381000; //change by houjg 2007.05.10
	//pEbootCFG->dwLaunchAddr = 0x800c1000;
	//================================//
	pEbootCFG->bootDeviceOrder = 0;
	pEbootCFG->ConfigMagicNumber = EbootCFGMagicNumber;
}

void SetIP(EBOOTCFG *pEbootCFG)
{
	char szDottedD[16];	// The string used to collect the dotted decimal IP address
	WORD cwNumChars = 0;
	UINT16 InChar = 0;

	EdbgOutputDebugString ( "\r\nEnter new IP address: ");

	while(!((InChar == 0x0d) || (InChar == 0x0a)))
	{
		InChar = OEMReadDebugByte();
		if (InChar != OEM_DEBUG_COM_ERROR && InChar != OEM_DEBUG_READ_NODATA) 
		{
			// If it's a number or a period, add it to the string
			if (InChar == '.' || (InChar >= '0' && InChar <= '9')) 
			{
				if (cwNumChars < 16) 
				{
					szDottedD[cwNumChars++] = (char)InChar;
					OEMWriteDebugByte((BYTE)InChar);
				}
			}
			// If it's a backspace, back up
			else if (InChar == 8) 
			{
				if (cwNumChars > 0) 
				{
					cwNumChars--;
					OEMWriteDebugByte((BYTE)InChar);
				}
			}
		}
	}

	// If it's a carriage return with an empty string, don't change anything.
	if (cwNumChars) 
	{
		szDottedD[cwNumChars] = '\0';
		pEbootCFG->IP = inet_addr( szDottedD );
	}
	ClearPromiscuousIP();                
}

void SetMask(EBOOTCFG *pEbootCFG)
{
	char szDottedD[16];	// The string used to collect the dotted masks
	WORD cwNumChars = 0;
	UINT16 InChar = 0;

	EdbgOutputDebugString ( "\r\nEnter new subnet mask: ");

	while(!((InChar == 0x0d) || (InChar == 0x0a)))
	{
		InChar = OEMReadDebugByte();
		if (InChar != OEM_DEBUG_COM_ERROR && InChar != OEM_DEBUG_READ_NODATA) 
		{
			// If it's a number or a period, add it to the string
			if (InChar == '.' || (InChar >= '0' && InChar <= '9')) 
			{
				if (cwNumChars < 16) 
				{
					szDottedD[cwNumChars++] = (char)InChar;
					OEMWriteDebugByte((BYTE)InChar);
				}
			}
			// If it's a backspace, back up
			else if (InChar == 8) 
			{
				if (cwNumChars > 0) 
				{
					cwNumChars--;
					OEMWriteDebugByte((BYTE)InChar);
				}
			}
		}
	}

	// If it's a carriage return with an empty string, don't change anything.
	if (cwNumChars) 
	{
		szDottedD[cwNumChars] = '\0';
		pEbootCFG->subnetMask = inet_addr( szDottedD );
	}
}
void SetBootMe(EBOOTCFG *pEbootCFG)
{
	char szCount[16];
	WORD cwNumChars = 0;
	UINT16 InChar = 0;

	EdbgOutputDebugString ( "\r\nUse 0 for continuous boot me packets. \r\n");
	EdbgOutputDebugString ( "Enter maximum number of boot me packets to send [0-255]: ");

	while(!((InChar == 0x0d) || (InChar == 0x0a)))
	{
		InChar = OEMReadDebugByte();
		if (InChar != OEM_DEBUG_COM_ERROR && InChar != OEM_DEBUG_READ_NODATA) 
		{
			// If it's a number or a period, add it to the string
			if ((InChar >= '0' && InChar <= '9')) 
			{
				if (cwNumChars < 16) 
				{
					szCount[cwNumChars++] = (char)InChar;
					OEMWriteDebugByte((BYTE)InChar);
				}
			}
			// If it's a backspace, back up
			else if (InChar == 8) 
			{
				if (cwNumChars > 0) 
				{
					cwNumChars--;
					OEMWriteDebugByte((BYTE)InChar);
				}
			}
		}
	}

	// If it's a carriage return with an empty string, don't change anything.
	if (cwNumChars) 
	{
		szCount[cwNumChars] = '\0';
		pEbootCFG->numBootMe = atoi(szCount);
		if (pEbootCFG->numBootMe > 255)
		{
			pEbootCFG->numBootMe = 255;
		} 
		else if (pEbootCFG->numBootMe < 0)
		{
			pEbootCFG->numBootMe = 1;
		}
	}
}

void SetDelay(EBOOTCFG *pEbootCFG)
{
	char szCount[16];
	WORD cwNumChars = 0;
	UINT16 InChar = 0;

	EdbgOutputDebugString ( "\r\nEnter maximum number of seconds to delay [1-255]: ");

	while(!((InChar == 0x0d) || (InChar == 0x0a)))
	{
		InChar = OEMReadDebugByte();
		if (InChar != OEM_DEBUG_COM_ERROR && InChar != OEM_DEBUG_READ_NODATA) 
		{
			// If it's a number or a period, add it to the string
			if ((InChar >= '0' && InChar <= '9')) 
			{
				if (cwNumChars < 16) 
				{
					szCount[cwNumChars++] = (char)InChar;
					OEMWriteDebugByte((BYTE)InChar);
				}
			}
			// If it's a backspace, back up
			else if (InChar == 8) 
			{
				if (cwNumChars > 0) 
				{
					cwNumChars--;
					OEMWriteDebugByte((BYTE)InChar);
				}
			}
		}
	}

	// If it's a carriage return with an empty string, don't change anything.
	if (cwNumChars) 
	{
		szCount[cwNumChars] = '\0';
		pEbootCFG->delay = atoi(szCount);
		if (pEbootCFG->delay > 255)
		{
			pEbootCFG->delay = 255;
		} 
		else if (pEbootCFG->delay < 1)
		{
			pEbootCFG->delay = 1;
		}
	}
}
#if defined ( PLAT_LUBBOCK )
void SetSMSCMACAddress()
{
	char szDottedD[24];	// The string used to collect the dotted masks
	WORD cwNumChars = 0;
	UINT16 InChar = 0;
	USHORT MacAddr[3];
	USHORT MacAddrTemp[3];

#if defined ( PLAT_LUBBOCK )
    //volatile BLR_REGS *BLR = (BLR_REGS *)FPGA_REGS_BASE_U_VIRTUAL;
#endif
	
    EdbgOutputDebugString("Checking for SMC 91C96 Ethernet controller...\r\n");

    // Enable the oscillator on the Neponset board.  Lubbock's oscillator is always running.
    #if defined ( PLAT_SANDGATE )
        #if defined ( USING_SA1111 )
			pBDRegister->ncr[0] |= ncrBits_enet_osc_en_mask;
       #endif
    #endif

    // Enable 16 bit access to the SMC device for the Lubbock platform, only.
    #if defined ( PLAT_LUBBOCK )
		//BLR->misc_wr &= ~ENET_nEN16;
		*((volatile PBYTE) SMC_ETHERNET_ATTRIB_BASE_U_VIRTUAL+0x20008) = 0;  // Enable 16 bit mode
		*((volatile PBYTE) SMC_ETHERNET_ATTRIB_BASE_U_VIRTUAL+0x20000) = 1;  // Enable Ethernet controller
    #endif
    // Enable 8 bit access to the SMC device for the Sandgate/Neponset platform, only.
    #if defined ( PLAT_SANDGATE )
        #if defined ( USING_SA1111 )
            *((volatile PBYTE) SMC_ETHERNET_ATTRIB_BASE_U_VIRTUAL+0x20008) =0x20;  // Enable 8 bit mode
			*((volatile PBYTE) SMC_ETHERNET_ATTRIB_BASE_U_VIRTUAL+0x20000) = 1;    // Enable Ethernet controller
        #endif
    #endif

	if (SMCInit( (BYTE*)(SMC_ETHERNET_IO_BASE_U_VIRTUAL), 4, MacAddr))
	{
	    EdbgOutputDebugString("SMC 91C96 Ethernet controller initialized.\r\n");
		EdbgOutputDebugString ( "\r\nEnter new MAC address (nnn.nnn.nnn.nnn.nnn.nnn): ");

		while(!((InChar == 0x0d) || (InChar == 0x0a)))
		{
			InChar = OEMReadDebugByte();
			if (InChar != OEM_DEBUG_COM_ERROR && InChar != OEM_DEBUG_READ_NODATA) 
			{
				// If it's a number or a period, add it to the string
				if (InChar == '.' || (InChar >= '0' && InChar <= '9')) 
				{
					if (cwNumChars < 23) 
					{
						szDottedD[cwNumChars++] = (char)InChar;
						OEMWriteDebugByte((BYTE)InChar);
					}
				}
				// If it's a backspace, back up
				else if (InChar == 8) 
				{
					if (cwNumChars > 0) 
					{
						cwNumChars--;
						OEMWriteDebugByte((BYTE)InChar);
					}
				}
			}
		}

		// If it's a carriage return with an empty string, don't change anything.
		if (cwNumChars) 
		{
			szDottedD[cwNumChars] = '\0';
			CvtMAC(MacAddr, szDottedD );
			EdbgOutputDebugString ( "\r\n");
			SMCSetMACAddress(MacAddr);
			SMCGetMACAddress(MacAddrTemp);
			if ( (MacAddr[0] != MacAddrTemp[0]) &&
				 (MacAddr[1] != MacAddrTemp[1]) &&
				 (MacAddr[2] != MacAddrTemp[2]) )
			{
				EdbgOutputDebugString ( "\r\nMAC address programming failure!\r\n");
			    EdbgOutputDebugString("Requested address: %B:%B:%B:%B:%B:%B\r\n",
                          MacAddr[0] & 0x00FF, MacAddr[0] >> 8,
                          MacAddr[1] & 0x00FF, MacAddr[1] >> 8,
                          MacAddr[2] & 0x00FF, MacAddr[2] >> 8);
			    EdbgOutputDebugString("SMSC controller returned: %B:%B:%B:%B:%B:%B\r\n",
                          MacAddr[0] & 0x00FF, MacAddr[0] >> 8,
                          MacAddr[1] & 0x00FF, MacAddr[1] >> 8,
                          MacAddr[2] & 0x00FF, MacAddr[2] >> 8);
			} else
			{
				EdbgOutputDebugString ( "\r\nMAC address programming complete.\r\n");
			}
		}
	} else 
	{
		EdbgOutputDebugString("SMC 91C96 Ethernet controller failed to initialize.\n");
		EdbgOutputDebugString("Unable to program MAC address.\n");
	}
}

// This routine will convert a dotted decimal MAC address into a binary version
void CvtMAC(USHORT MacAddr[3], char *pszDottedD ) 
{
    DWORD cBytes;
    char *pszLastNum;
    int atoi (const char *s);
	int i=0;    
	BYTE *p = (BYTE *)MacAddr;

    // Replace the dots with NULL terminators
    pszLastNum = pszDottedD;
    for( cBytes = 0; cBytes < 6; cBytes++ ) {
        while(*pszDottedD != '.' && *pszDottedD != '\0')
            pszDottedD++;
        if (pszDottedD == '\0' && cBytes != 5)
		{
			// zero out the rest of MAC address
			while(i++ < 6)
			{
				*p++ = 0;
			}
			break;
		}
        *pszDottedD = '\0';
        *p++ = (atoi(pszLastNum) & 0xFF);
		i++;
        pszLastNum = ++pszDottedD;
    }
}
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品一区男女天堂| 欧美一区中文字幕| 国产剧情在线观看一区二区| 亚洲高清在线视频| 亚洲精品成人a在线观看| 18涩涩午夜精品.www| 精品国产伦一区二区三区观看方式 | 首页国产欧美日韩丝袜| 亚洲激情一二三区| 亚洲免费观看高清在线观看| 国产精品久久久久久亚洲毛片| 欧美mv日韩mv国产| 久久久久99精品一区| 日本一区二区三区高清不卡| 国产免费久久精品| 国产精品日产欧美久久久久| 国产精品理伦片| 亚洲精品五月天| 亚洲mv在线观看| 青草av.久久免费一区| 日韩福利电影在线| 国产在线乱码一区二区三区| 成人一区二区三区视频在线观看| 国产一区 二区 三区一级| 国产一区二区三区av电影| 国产一区二区三区日韩| 波多野结衣欧美| 欧美中文字幕一区二区三区亚洲 | 日韩在线一区二区| 久久www免费人成看片高清| 国产精品一区三区| 色悠悠久久综合| 欧美一区二区久久久| 久久久久久亚洲综合影院红桃| 国产精品久久久久久久久久免费看 | 欧美日韩精品一区二区天天拍小说 | 色婷婷狠狠综合| 成人av电影观看| 婷婷成人综合网| 91精品国产综合久久福利| 亚洲国产色一区| 欧美视频中文一区二区三区在线观看| 中文字幕视频一区二区三区久| 国产精品99久久不卡二区| 久久青草国产手机看片福利盒子| 理论电影国产精品| www国产精品av| 国产一区二区三区精品视频| 久久亚区不卡日本| 国产夫妻精品视频| 中文成人av在线| 色88888久久久久久影院野外| 亚洲欧美另类久久久精品| 91久久精品一区二区| 亚洲第一久久影院| 欧美一级理论片| 国产美女一区二区三区| 中文字幕高清不卡| 在线精品视频免费播放| 亚洲mv在线观看| 精品国产污网站| 国产成人精品免费网站| 自拍视频在线观看一区二区| 欧美亚洲国产怡红院影院| 五月婷婷综合网| 久久久精品人体av艺术| av电影在线不卡| 香蕉加勒比综合久久 | av电影在线观看一区| 亚洲电影在线免费观看| 久久综合一区二区| 色香蕉成人二区免费| 日本人妖一区二区| 国产女同性恋一区二区| 在线观看www91| 国产一区 二区 三区一级| 亚洲三级视频在线观看| 日韩一级片在线观看| 成人app网站| 麻豆精品在线播放| 亚洲黄色av一区| 2023国产精品自拍| 欧美午夜精品久久久久久超碰 | www国产成人| 欧美三级在线看| av中文字幕不卡| 青青草伊人久久| 亚洲精品你懂的| 国产日韩在线不卡| 91精品国产91热久久久做人人| 成人精品小蝌蚪| 男人的天堂亚洲一区| 亚洲精品国产成人久久av盗摄 | 在线观看亚洲成人| 成人丝袜18视频在线观看| 免费在线看一区| 一区二区成人在线| 亚洲第一狼人社区| 国产精品丝袜91| 精品国产网站在线观看| 777亚洲妇女| 一本大道久久a久久精二百 | 日本亚洲免费观看| 亚洲伦理在线免费看| 国产日韩精品一区二区三区| 91精品国产91久久综合桃花| 欧美性猛交一区二区三区精品| 国产精品亚洲午夜一区二区三区 | 日韩理论片一区二区| 久久女同精品一区二区| 日韩欧美亚洲国产精品字幕久久久 | 在线不卡的av| 色久优优欧美色久优优| 91亚洲精品久久久蜜桃网站| 国产不卡视频在线观看| 九色|91porny| 免费在线观看一区| 日韩国产一二三区| 青青草国产成人av片免费| 石原莉奈在线亚洲二区| 日精品一区二区三区| 亚洲国产视频网站| 亚洲国产成人av| 日韩激情一区二区| 久久99精品国产麻豆婷婷| 精品一区二区三区的国产在线播放| 免费成人在线影院| 国产精品一级黄| 成人av影视在线观看| av亚洲精华国产精华精华| 成人av电影免费在线播放| 91在线一区二区三区| 在线视频中文字幕一区二区| 欧美色精品天天在线观看视频| 欧美精品第1页| 日韩欧美视频在线| 26uuu精品一区二区在线观看| 久久一留热品黄| 国产精品免费免费| 一区二区三区四区国产精品| 亚洲动漫第一页| 国内精品自线一区二区三区视频| 粉嫩aⅴ一区二区三区四区| 91丨九色丨蝌蚪丨老版| 欧美视频一区二| 精品久久久久久久一区二区蜜臀| 久久久久久免费网| 亚洲免费观看在线视频| 免费欧美在线视频| 成人国产免费视频| 欧美日韩黄视频| 国产婷婷精品av在线| 一区二区三区**美女毛片| 免费成人结看片| a美女胸又www黄视频久久| 欧美日韩综合一区| 国产亚洲综合色| 尤物视频一区二区| 极品少妇xxxx精品少妇偷拍| 不卡电影一区二区三区| 欧美精品久久99久久在免费线| 国产视频一区不卡| 亚洲国产日韩在线一区模特 | 亚洲一区在线观看视频| 国产综合色精品一区二区三区| 色偷偷成人一区二区三区91 | 免费欧美日韩国产三级电影| 成人动漫精品一区二区| 日韩视频免费直播| 亚洲欧洲一区二区三区| 精品一区二区三区免费视频| 色视频成人在线观看免| 久久一二三国产| 成人福利视频网站| 欧美日韩视频在线第一区| 国产色婷婷亚洲99精品小说| 亚洲sss视频在线视频| 91亚洲精品久久久蜜桃| 久久精品欧美一区二区三区麻豆| 一区二区三区成人| 成人avav影音| 久久久久久毛片| 麻豆成人av在线| 欧美精品亚洲一区二区在线播放| 国产精品三级视频| 久久精工是国产品牌吗| 在线成人免费观看| 亚洲高清不卡在线观看| 91麻豆视频网站| 国产精品久久久久一区二区三区共| 另类小说一区二区三区| 91精品国产91久久久久久最新毛片| 亚洲精品欧美专区| 色老汉一区二区三区| 亚洲欧洲日产国码二区| 国产精品亚洲一区二区三区妖精| 日韩一区二区中文字幕| 欧美aaaaaa午夜精品| 91精品国产综合久久久久久漫画 | 欧美一区二区久久久|