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

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

?? jflash.cpp

?? ARM 10 KEYPAD DESIGN
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
		EraseBlocks(base_address, fsize);		program_flash(max_write_buffer, base_address, fsize);				Write_Rom(0, F_READ_ARRAY);				// put back into read mode		access_rom(READ, base_address, 0x0L, IGNORE_PORT); //extra read to get the pipeline going		time(&start);		gpio_lock_flash();		verify_flash(base_address, fsize);	}	else if(option == 'I') // just used for identifying the chips without programming anything	{		printf("Program successful completion.\n");		printf("Processor and Flash Memory Identified.\n");		printf("No programming operation performed.\n");	}	else if(option == 'N') // Program only with no verify cycle	{		EraseBlocks(base_address, fsize);		program_flash(max_write_buffer, base_address, fsize);				Write_Rom(0, F_READ_ARRAY);				// put back into read mode		access_rom(READ, base_address, 0x0L, IGNORE_PORT); //extra read to get the pipeline going		time(&start);		gpio_lock_flash();	}	else if(option == 'V')	{		Write_Rom(0, F_READ_ARRAY);				// put back into read mode		access_rom(READ, base_address, 0x0L, IGNORE_PORT); //extra read to get the pipeline going		time(&start);		gpio_lock_flash();		verify_flash(base_address, fsize);	}	else if(option == 'S')	{		Integrity_Check();	}	else if(option == 'T') // test the flash by attempting to write to all sectors	{		if(AskQuestions)		{			printf("About to test the entire flash memory..... \n");			printf("Is this what you want to do? (Y or N)\n");			if(toupper(_getche()) == 'Y')			{			i = 0;			do			{				test_logic_reset();				gpio_unlock_flash();				base_address = BLOCK_ADDRESS[i];				EraseBlocks(base_address, fsize);				program_flash(max_write_buffer, base_address, fsize);//    			Write_Rom(0, F_READ_ARRAY);				// put back into read mode//		  		access_rom(READ, base_address, 0x0L, IGNORE_PORT); //extra read to get the pipeline going//				gpio_lock_flash();//				verify_flash(base_address, fsize);				i++;			} while (BLOCK_ADDRESS[i] != 0);			i = 0;			do			{				test_logic_reset();				gpio_unlock_flash();				base_address = BLOCK_ADDRESS[i];//				EraseBlocks(base_address, fsize);//				program_flash(max_write_buffer, base_address, fsize);    			Write_Rom(0, F_READ_ARRAY);				// put back into read mode		  		access_rom(READ, base_address, 0x0L, IGNORE_PORT); //extra read to get the pipeline going				gpio_lock_flash();				verify_flash(base_address, fsize);				i++;			} while (BLOCK_ADDRESS[i] != 0);				printf("Successfully Completed a write to all sectors\n");			}			else			{				error_out("Cancelling the test....\n");			}		}		else		{			i = 0;			do			{				test_logic_reset();				gpio_unlock_flash();				base_address = BLOCK_ADDRESS[i];				EraseBlocks(base_address, fsize);				program_flash(max_write_buffer, base_address, fsize);//    			Write_Rom(0, F_READ_ARRAY);				// put back into read mode//		  		access_rom(READ, base_address, 0x0L, IGNORE_PORT); //extra read to get the pipeline going//				gpio_lock_flash();//				verify_flash(base_address, fsize);				i++;			} while (BLOCK_ADDRESS[i] != 0);			i = 0;			do			{				test_logic_reset();				gpio_unlock_flash();				base_address = BLOCK_ADDRESS[i];//				EraseBlocks(base_address, fsize);//				program_flash(max_write_buffer, base_address, fsize);    			Write_Rom(0, F_READ_ARRAY);				// put back into read mode		  		access_rom(READ, base_address, 0x0L, IGNORE_PORT); //extra read to get the pipeline going				gpio_lock_flash();				verify_flash(base_address, fsize);				i++;			} while (BLOCK_ADDRESS[i] != 0);			printf("Successfully Completed a write to all sectors\n");		}	}	else if(option == 'R')	{		Write_Rom(0, F_READ_ARRAY);				// put back into read mode		access_rom(READ, base_address, 0x0L, IGNORE_PORT); //extra read to get the pipeline going		if((intercom_file_pointer = fopen("VB2JFLASH_READ_DATA.BIN", "w")) == NULL)		{			printf("Cannot open output file: %s\n", "VB2JFLASH_READ_DATA.BIN");			exit(1);		}		else		{ 			 sprintf(buf, "%lX", Read_Rom(base_address)); 			 fputs(buf,intercom_file_pointer);			 fclose (intercom_file_pointer); 						//printf("%X\n",Read_Rom(base_address));		}	}		else if(option == 'E')	{		if(AskQuestions)		{			printf("About to erase the entire flash memory..... \n");			printf("Is this what you want to do? (Y or N)\n");			if(toupper(_getche()) == 'Y')			{				fsize = dsize - 1;				EraseBlocks(0, fsize);			}			else			{				error_out("Cancelling the erase....\n");			}		}		else		{			fsize = dsize - 1;			EraseBlocks(0, fsize);		}	}	else	{		printf("error specifying programming option. \n\n");		printf("Commands: \n");		printf("P = Program and verify\n");		printf("V = Verify only\n");		printf("T = Test flash. Program and verify same binary at every block.\n");		printf("I = Identify processor and flash type. No programming performed.\n");		printf("R = Read a location and write to file. RESERVED OPERATION\n");		printf("N = Program only with no verify\n");		printf("E = Erase entire flash memory\n");//		printf("S = Stuck bit search. Uses platform_integrity.dat file.\n");	}	fclose(in_file);	test_logic_reset();	return 0;}#endif/********************************************************************************** FUNCTION:         Set_Platform_Global_Variables** DESCRIPTION:    Evaluates some global variables based on the selected platform             *                   ** INPUT PARAMETERS: none					* RETURNS:          None** GLOBAL EFFECTS:   sets the global varibales in Global_Variables.h*********************************************************************************/void Set_Platform_Global_Variables(){		// Evaluate the following variables based on the selected platform	ChipSelect0		= convert_to_dword(&WORDARRAY[p_cs0][0]); 	// Global variable for chip select 0	ChipSelect1		= convert_to_dword(&WORDARRAY[p_cs1][0]); 	// Global variable for chip select 1	ChipSelect2		= convert_to_dword(&WORDARRAY[p_cs2][0]);	// Global variable for chip select 2	ChipSelect3		= convert_to_dword(&WORDARRAY[p_cs3][0]);	// Global variable for chip select 3	ChipSelect4		= convert_to_dword(&WORDARRAY[p_cs4][0]);	// Global variable for chip select 4	ChipSelect5		= convert_to_dword(&WORDARRAY[p_cs5][0]);	// Global variable for chip select 5	OutputEnable	= convert_to_dword(&WORDARRAY[p_nOE_OUT][0]);	// Global variable for output enable	WriteEnable		= convert_to_dword(&WORDARRAY[p_nWE_OUT][0]);	// Global variable for write enable	MdUpperControl	= convert_to_dword(&WORDARRAY[p_mdupper_ctrl][0]);	// Global variable for MD upper control	MdLowerControl	= convert_to_dword(&WORDARRAY[p_mdlower_ctrl][0]);	// Global variable for MD lower control	ReadWriteMode	= convert_to_dword(&WORDARRAY[p_RD_nWR_OUT][0]);	// Global variable for Read Write access mode	IR_Idcode		= convert_to_dword(&WORDARRAY[p_idcode][0]);	// Global variable for the IDCODE instruction of the IR	IR_Bypass		= convert_to_dword(&WORDARRAY[p_bypass][0]);	// Global variable for the BYPASS instruction of the IR	IR_Extest		= convert_to_dword(&WORDARRAY[p_extest][0]);  	// Global variable for the EXTEST instruction of the IR	ChainLength		= convert_to_dword(&WORDARRAY[p_blength][0]);  	// Global variable for the chain length of the selected platform	IrLength		= convert_to_dword(&WORDARRAY[p_irlength][0]);  	// Global variable for setting the correct IR length	if(!strcmp("16", &WORDARRAY[p_datawidth][0] ))		PlatformIs16bit = true;	else		PlatformIs16bit = false;	// set 16 and 32 bit command and query values	if (PlatformIs16bit)	{	     F_READ_ARRAY = 		0x00FFL;	     F_READ_IDCODES =   	0x0090L;	     F_READ_QUERY =     	0x0098L;	     F_READ_STATUS =    	0x0070L;	     F_CLEAR_STATUS =   	0x0050L;	     F_WRITE_BUFFER =   	0x00E8L;	     F_WORDBYTE_PROG =  	0x0040L;	     F_BLOCK_ERASE =    	0x0020L;	     F_BLOCK_ERASE_2ND =	0x00D0L; 	     F_BLK_ERASE_PS =       0x00B0L;	     F_BLK_ERASE_PR =       0x00D0L;	     F_CONFIGURATION =      0x00B8L;	     F_SET_READ_CFG_REG =   0x0060L;	     F_SET_READ_CFG_REG_2ND = 0x0003L;	     F_SET_BLOCK_LOCK =      0x0060L;	     F_SET_BLOCK_LOCK_2ND =  0x0001L;	     F_CLEAR_BLOCK_LOCK =    0x0060L;	     F_CLEAR_BLOCK_LOCK_2ND =0x00D0L;	     F_PROTECTION =          0x00C0L;	     F_ATTR_Q =              0x0051L;	     F_ATTR_R =              0x0052L;	     F_ATTR_Y =              0x0059L;	     F_BLOCK_LOCKED =        0x0001L;	     F_STATUS_READY =        0x0080L;	}	else	{ 	     F_READ_ARRAY = 		0x00FF00FFL;	     F_READ_IDCODES =   	0x00900090L;	     F_READ_QUERY =     	0x00980098L;	     F_READ_STATUS =    	0x00700070L;	     F_CLEAR_STATUS =   	0x00500050L;	     F_WRITE_BUFFER =   	0x00E800E8L;	     F_WORDBYTE_PROG =  	0x00400040L;	     F_BLOCK_ERASE =    	0x00200020L;	     F_BLOCK_ERASE_2ND =	0x00D000D0L; 	     F_BLK_ERASE_PS =       0x00B000B0L;	     F_BLK_ERASE_PR =       0x00D000D0L;	     F_CONFIGURATION =      0x00B800B8L;	     F_SET_READ_CFG_REG =   0x00600060L;	     F_SET_READ_CFG_REG_2ND = 0x00030003L;	     F_SET_BLOCK_LOCK =      0x00600060L;	     F_SET_BLOCK_LOCK_2ND =  0x00010001L;	     F_CLEAR_BLOCK_LOCK =    0x00600060L;	     F_CLEAR_BLOCK_LOCK_2ND =0x00D000D0L;	     F_PROTECTION =          0x00C000C0L;	     F_ATTR_Q =              0x00510051L;	     F_ATTR_R =              0x00520052L;	     F_ATTR_Y =              0x00590059L;	     F_BLOCK_LOCKED =        0x00010001L;	     F_STATUS_READY =        0x00800080L;	}	if (PlatformIs16bit)	{		ADDR_MULT = 2;	}	else	{		ADDR_MULT = 4;	}}/********************************************************************************** FUNCTION:         get_rom_info** DESCRIPTION:      get the flash information such as max erase time, flash size, *                   max write buffer, block number               *                   ** INPUT PARAMETERS: DWORD *max_erase_time	: max erase time, number of seconds*					DWORD *dsize			: each flash size, number of 16-bit word*					DWORD *max_write_buffer : each flash max write buffer, number of 16-bit word					DWORD *block_size		: each block size, number of 16-bit word*					DWORD *nblocks			: number of erase blocks in each Flash*					* RETURNS:          None** GLOBAL EFFECTS:   None*********************************************************************************/void check_rom_info(DWORD *max_erase_time, DWORD * dsize, DWORD * max_write_buffer){		DWORD FlashId;	DWORD FlashIdHigh;	DWORD FlashIdLow;	char constructed_string[50];	char FlashIdString[5];	bool IDFound = false;	int IDAttempts = 5;	do // Check for a recognized Flash ID a few times. Some devices are harder to read	{		Write_Rom(0x0, F_READ_ARRAY);			Write_Rom(0x0, F_READ_IDCODES);		   		    if(PlatformIs16bit)	    {	  			  	FlashIdLow = (Read_Rom(0x1) & 0xFFFF);		  	FlashIdLow = (Read_Rom(0x1) & 0xFFFF); // second read to handle misreads			FlashId = FlashIdLow;		}		else		{		  	FlashIdLow = (Read_Rom(0x1) & 0xFFFF);		  	FlashIdLow = (Read_Rom(0x1) & 0xFFFF);		    FlashIdHigh = (Read_Rom(0x1) & 0xFFFF0000) >> 16;		    FlashIdHigh = (Read_Rom(0x1) & 0xFFFF0000) >> 16;		    if (FlashIdHigh != FlashIdLow) 		    {				printf("Upper and Lower flash memory ID does not match.\n");				printf("You may have a damaged flash memory.\n");				printf("Upper half reads: %lX\n", FlashIdHigh);				printf("Lower half reads: %lX\n", FlashIdLow);			//	error_out("");		    }		    FlashId = FlashIdLow;		    		    // determine if the flash is a K3 family and apply the stability fix		    if ((FlashId == 0x8801) ||		        (FlashId == 0x8802) ||		        (FlashId == 0x8803)		       ) 		       {		        K3_STABILITY_FIX_ENABLE = true;		        if(Debug_Mode) printf("K3 Stability Fix Enabled\n"); 		       }		}		// open the data file for the flash device. If there is no file, then		// either the flash is not supported, not released, or there was an error		// reading the Device ID.		// construct the filename		sprintf(FlashIdString, "%lx", FlashId);		strcpy(constructed_string, "");		// construct the processor ID		strcat(constructed_string, "Flash_");		strcat(constructed_string, FlashIdString);		strcat(constructed_string, "_");		strcat(constructed_string, &WORDARRAY[p_fdevsacross][0]); 		strcat(constructed_string, "_");		strcat(constructed_string, &WORDARRAY[p_datawidth][0]);		strcat(constructed_string, ".dat");#if defined __linux		do {			int res;			char buff[MAX_IN_LENGTH], *s;			struct stat fs;			s = buff;									// fine in data directory			s += sprintf(s, "%s", DATADIR);			if (lastchar(s) != '/')				s += sprintf(s, "/");			s += sprintf(s, "%s", constructed_string);			res = stat(buff, &fs);			if (!res){ strcpy(flash_data_filename, buff); break; }			strcpy(flash_data_filename, constructed_string);		} while (0);#else		strcpy(flash_data_filename, constructed_string);  // set the filename#endif				// See if the file exists. If not then try again to confirm the flash ID		if((flash_file_pointer = fopen(flash_data_filename, "rb")) == NULL)		{			printf("Failed to read the Flash ID. Retrying %d more times...\n", IDAttempts -1);			IDAttempts--;			if (IDAttempts == 0)			{				printf("Cannot open input file: %s\n\n", flash_data_filename);				printf("This program supports flash devices defined by DAT files\n");				printf("contained in the same directory as the executable program. \n\n");				printf("If the file cannot be opened, there are four possibilities:\n\n");				printf(" 1 - The flash device installed is not supported.\n");				printf(" 2 - The flash device is a licensed product.\n");				printf(" 3 - The device ID could not be read, resulting in a poorly\n");				printf("     constructed filename. The first numeric value in the\n");				printf("     filename is the device ID. Verify this value with the\n");				printf("     component specification.\n");				printf(" 4 - The memory bus is not functional. Check all CPLD and FPGA\n");				printf("     devices. Make sure that you are using the correct \n");				printf("     platform data file. \n"); 				error_out("");			}			else			{				// hit the system with a JTAG reset and try again				test_logic_reset();				// try putting the flash into read mode again

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久国产精品麻豆 | 欧洲精品在线观看| 国产精品资源站在线| 青草国产精品久久久久久| 日韩黄色免费电影| 精品中文av资源站在线观看| 麻豆精品视频在线观看视频| 国产一区二区三区在线观看精品 | www.成人在线| 91麻豆免费在线观看| 色成人在线视频| 欧美日韩激情在线| 日韩视频在线永久播放| 亚洲精品一区二区三区香蕉| 久久精子c满五个校花| 中文字幕精品—区二区四季| 亚洲人xxxx| 天堂久久久久va久久久久| 蜜乳av一区二区| 国产精品主播直播| 色综合久久久久网| 日韩一区二区免费高清| 久久精子c满五个校花| 亚洲人123区| 老司机一区二区| 色综合网站在线| 日韩一区二区高清| 中文字幕日韩一区| 日韩成人精品在线| 粉嫩一区二区三区性色av| 欧美影视一区在线| 久久久777精品电影网影网| |精品福利一区二区三区| 日本不卡一区二区| 成人av电影在线观看| 91.麻豆视频| 亚洲丝袜美腿综合| 美女视频黄 久久| 色网综合在线观看| 久久久噜噜噜久久中文字幕色伊伊| 亚洲精品国产精华液| 激情综合色播激情啊| 欧美亚洲尤物久久| 亚洲国产成人在线| 理论电影国产精品| 欧美精品久久99| 一区二区三区丝袜| 大白屁股一区二区视频| 日韩欧美国产高清| 亚洲午夜精品久久久久久久久| 成人自拍视频在线| 欧美精品一区二| 亚洲a一区二区| 欧美午夜电影网| 亚洲日本电影在线| 波多野结衣精品在线| 久久尤物电影视频在线观看| 午夜激情一区二区| 精品视频全国免费看| 一区二区三区在线不卡| 成人污视频在线观看| 久久精品视频免费观看| 激情综合色播五月| 日韩一卡二卡三卡四卡| 青青草97国产精品免费观看 | 日韩成人dvd| 欧美日韩久久一区| 亚洲综合激情网| 欧美优质美女网站| 亚洲一区二区三区中文字幕| 色狠狠色狠狠综合| 亚洲午夜一二三区视频| 日本韩国视频一区二区| 一区二区三国产精华液| 在线欧美日韩国产| 午夜精品一区在线观看| 8x福利精品第一导航| 日本成人在线电影网| 欧美一区二区三区公司| 精久久久久久久久久久| 久久先锋资源网| 成人av午夜电影| 亚洲视频 欧洲视频| 欧美亚洲图片小说| 香蕉久久夜色精品国产使用方法| 欧美三级在线播放| 日韩国产精品91| 久久久综合九色合综国产精品| 国产成人aaaa| 亚洲最大色网站| 91麻豆精品国产91| 国产传媒一区在线| 国产精品福利影院| 欧美日韩第一区日日骚| 久久精品国内一区二区三区| 久久久一区二区| 91蝌蚪porny| 日韩av电影天堂| 国产女人aaa级久久久级| 91久久线看在观草草青青| 视频一区视频二区中文| 26uuu国产电影一区二区| 99久久免费精品| 日韩精品欧美成人高清一区二区| 日韩免费高清av| 91亚洲男人天堂| 蜜桃视频第一区免费观看| 欧美国产日韩精品免费观看| 在线视频一区二区免费| 国产一区二区三区久久久| 亚洲天堂av一区| 2023国产一二三区日本精品2022| 91网站在线播放| 国产精品影音先锋| 亚洲成av人片一区二区| 国产欧美日韩久久| 欧美肥大bbwbbw高潮| 99亚偷拍自图区亚洲| 美女国产一区二区三区| 亚洲激情欧美激情| 中文幕一区二区三区久久蜜桃| 欧美精品1区2区3区| 91麻豆国产在线观看| 国产一区二区h| 日韩国产欧美三级| 亚洲在线中文字幕| 国产精品美女久久久久aⅴ国产馆| 欧美日韩国产不卡| 色综合中文综合网| 精品一区二区三区久久| 亚洲五码中文字幕| 亚洲人成在线播放网站岛国| 久久在线观看免费| 欧美变态凌虐bdsm| 欧美三级电影精品| 在线观看亚洲精品视频| 91啪在线观看| 成人福利视频网站| 国产 欧美在线| 国产在线不卡一区| 九九**精品视频免费播放| 日韩一区精品视频| 亚洲国产视频在线| 亚洲制服丝袜一区| 亚洲国产另类av| 亚洲123区在线观看| 五月婷婷综合在线| 午夜精品福利在线| 亚洲超碰97人人做人人爱| 亚洲人成精品久久久久| 亚洲欧美另类小说| 一级精品视频在线观看宜春院| 亚洲天堂成人网| 亚洲伊人伊色伊影伊综合网| 亚洲综合无码一区二区| 亚洲综合清纯丝袜自拍| 性做久久久久久久免费看| 婷婷夜色潮精品综合在线| 五月天激情综合网| 玖玖九九国产精品| 国产风韵犹存在线视精品| 成人av综合一区| 色网站国产精品| 91精品婷婷国产综合久久性色| 日韩欧美国产电影| 国产日韩欧美亚洲| 国产精品进线69影院| 亚洲精品乱码久久久久久久久| 一区二区三国产精华液| 理论电影国产精品| 成人深夜视频在线观看| 在线观看免费亚洲| 日韩写真欧美这视频| 久久久国际精品| 一区二区三区视频在线看| 麻豆国产精品官网| www.亚洲在线| 在线不卡欧美精品一区二区三区| 欧美成人a∨高清免费观看| 亚洲国产精品av| 亚洲成人www| 国产福利一区二区三区视频| 91麻豆精东视频| 2024国产精品| 亚洲大尺度视频在线观看| 黄网站免费久久| 在线视频你懂得一区二区三区| 精品国产91洋老外米糕| 亚洲男人天堂av网| 激情综合色综合久久综合| 一本大道av一区二区在线播放| 日韩视频一区在线观看| 国产精品毛片久久久久久久| 日本欧美久久久久免费播放网| 成人免费毛片高清视频| 欧美一区二区三区在线| 亚洲婷婷在线视频| 国产乱码精品一区二区三区av| 在线观看日韩一区| 国产精品久久久久久亚洲伦 |