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

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

?? flashcode.c

?? Title: DK3200_RS232_IAP(upsd32XX) Project Name: DK3200_RS232_IAP Description: In-Application-Prog
?? C
?? 第 1 頁 / 共 2 頁
字號:
			done = TRUE;			// dat byte programmed into flash OK at the same
							// time timout error occured, indicate successful 
							// exit criteria

		*(FLASH_BOOT_X555) = 0xF0;  // reset the flash array (short reset instruction) 
		        // now delay 3 msec per dat sheet
		}

   	return(done);		// a successful flash write returns 1, timeout error returns 0
	}

#endif



/*
Module: flash_erase_sector
Erases the entire main Flash memory (all sectors).
You'll need to include the header files generated by PSDsoft
Express. Important: The address passed to this function should 
be independent of memory paging or else the PSD page 
register value should be set to the correct page prior to calling this 
function. 

Note: The address that is passed in this function can be an address that 
      resides in any Flash segment that has a chip select. For example, if 
      fs0 and fs5 are used in the design, passing an address in this function
      that resides in either fs0 or fs5 will invoke the bulk erase operation.
*/

#ifdef _F_E_B

unsigned char flash_erase_sector(
    volatile unsigned char xdata* flash_bulk_erase_address)
{
	unsigned char done;
 	unsigned char poll;
 	unsigned char error;
 	unsigned char err;

	done = FALSE;
   	err = FALSE;

	//  Note:  the following constants (FLASH_COMMON_XXXX)
	//     are declared type volatile in the header file 
	//	   so they are not optimized away by the compiler

	*(FLASH_COMMON_X555) = 0xAA;		// unlock main flash, write 0xAA to addess 0xX555
	*(FLASH_COMMON_XAAA) = 0x55;		// unlock main flash, write 0x55 to addess 0xXAAA
	*(FLASH_COMMON_X555) = 0x80;		// write 0x80 command to erase entire chip
	*(FLASH_COMMON_X555) = 0xAA;        	// continue unlock sequence
	*(FLASH_COMMON_XAAA) = 0x55;		// continue unlock sequence
	//*(FLASH_COMMON_X555) = 0x10;		// write 0x10 command to complete erase command
    *(flash_bulk_erase_address) = 0x30; // write 0x30 to sector address to erase

	do		  			// now use dat polling method to verify successful erase
    {  
		poll = *(flash_bulk_erase_address); 	// read flash status from any address
		                                // within the defined flash address space

		error = poll & NVM_ERROR;	// save timeout error bit at DQ5

		poll = poll & NVM_DATA_POLL;	// look at D7   

		if (poll == NVM_DATA_POLL)	// compare DQ7 

			done = TRUE;		// bulk erase OK,
						// indicate successful exit criteria

		else if (error == NVM_ERROR)	// check for timeout error   
			err = TRUE;		// indicate timeout error occurred

    } while((done == FALSE) && (err == FALSE)); 


	if (err == TRUE)			// make sure timeout error and dat poll didn't 
						// occur simultaneously
    {
		poll = *(flash_bulk_erase_address); 	// Read flash status again

		poll = poll & NVM_DATA_POLL;	// get DQ7 of poll byte read from flash  

		if (poll == NVM_DATA_POLL)	// compare DQ7 

			done = TRUE;		// the flash erased OK at the same
						// time timout error occured, indicate successful 
						// exit criteria

		*(FLASH_COMMON_X555) = 0xF0;  // reset the flash array (short reset instruction) 
		        // now delay 3 msec per dat sheet
    }

   	return(done);		// a successful flash erase returns 1, timeout error returns 0

}
#endif

#ifdef _F_B_E_B

unsigned char flash_boot_erase_sector(
    volatile unsigned char xdata* flash_bulk_erase_address)
{
	unsigned char done;
 	unsigned char poll;
 	unsigned char error;
 	unsigned char err;

	done = FALSE;
   	err = FALSE;

	//  Note:  the following constants (FLASH_COMMON_XXXX)
	//     are declared type volatile in the header file 
	//	   so they are not optimized away by the compiler

	*(FLASH_BOOT_X555) = 0xAA;		// unlock main flash, write 0xAA to addess 0xX555
	*(FLASH_BOOT_XAAA) = 0x55;		// unlock main flash, write 0x55 to addess 0xXAAA
	*(FLASH_BOOT_X555) = 0x80;		// write 0x80 command to erase entire chip
	*(FLASH_BOOT_X555) = 0xAA;        	// continue unlock sequence
	*(FLASH_BOOT_XAAA) = 0x55;		// continue unlock sequence
	// *(FLASH_BOOT_X555) = 0x10;		// write 0x10 command to complete erase command
    *(flash_bulk_erase_address) = 0x30; // write 0x30 to sector address to erase

	do		  			// now use dat polling method to verify successful erase
    {  
		poll = *(flash_bulk_erase_address); 	// read flash status from any address
		                                // within the defined flash address space

		error = poll & NVM_ERROR;	// save timeout error bit at DQ5

		poll = poll & NVM_DATA_POLL;	// look at D7   

		if (poll == NVM_DATA_POLL)	// compare DQ7 

			done = TRUE;		// bulk erase OK,
						// indicate successful exit criteria

		else if (error == NVM_ERROR)	// check for timeout error   
			err = TRUE;		// indicate timeout error occurred

    } while((done == FALSE) && (err == FALSE)); 


	if (err == TRUE)			// make sure timeout error and dat poll didn't 
						// occur simultaneously
    {
		poll = *(flash_bulk_erase_address); 	// Read flash status again

		poll = poll & NVM_DATA_POLL;	// get DQ7 of poll byte read from flash  

		if (poll == NVM_DATA_POLL)	// compare DQ7 

			done = TRUE;		// the flash erased OK at the same
						// time timout error occured, indicate successful 
						// exit criteria

		*(FLASH_BOOT_X555) = 0xF0;  // reset the flash array (short reset instruction) 
		        // now delay 3 msec per dat sheet
    }

   	return(done);		// a successful flash erase returns 1, timeout error returns 0

}

#endif


/*
Module: flash_reset
Resets the main Flash memory to Read Array mode.
After this reset, the Flash memory may be read like a ROM device. 
You'll need to include the header files generated by PSDsoft
Express.
*/

#ifdef _F_R

void flash_reset()	// reset flash, read array mode

	{

	//  Note:  the following constants (FLASH_COMMON_XXXX)
	//     are declared type volatile in the header file 
	//	   so they are not optimized away by the compiler

	*(FLASH_COMMON_X555) = 0xAA;		// unlock main flash, write 0xAA to addess 0xX555
	*(FLASH_COMMON_XAAA) = 0x55;		// unlock main flash, write 0x55 to addess 0xXAAA
	*(FLASH_COMMON_X555) = 0xF0;		// write 0xF0 command to reset 
						// Flash memory to Read Array Mode
                      // now delay 3 msec per dat sheet
	}

void flash_boot_reset()	// reset boot flash, read array mode

	{

	//  Note:  the following constants (FLASH_BOOT_XXXX)
	//     are declared type volatile in the header file 
	//	   so they are not optimized away by the compiler

	*(FLASH_BOOT_X555) = 0xAA;		// unlock main flash, write 0xAA to addess 0xX555
	*(FLASH_BOOT_XAAA) = 0x55;		// unlock main flash, write 0x55 to addess 0xXAAA
	*(FLASH_BOOT_X555) = 0xF0;		// write 0xF0 command to reset 
						// Flash memory to Read Array Mode
                      // now delay 3 msec per dat sheet
	}

#endif


/* 
Module: flash_read_id
Reads the Flash Identifier byte from main Flash memory. You'll need 
to include the header files generated by PSDsoft Express.
Important: The address passed to this function should be independent 
of memory paging or else the PSD page register value should be set to 
the correct page prior to calling this function.

Note: The flash memory in the boot area of a PSD813F2 or PSD813F4 does 
not provide an ID. Only the main Flash memory in all PSD813FX provides 
an ID.
*/

#ifdef _F_R_I

unsigned char flash_read_id(flash_id_address)	// read flash identifier
volatile unsigned char *flash_id_address;  

  	{
	unsigned char id;

	//  Note:  the following constants (FLASH_COMMON_XXXX)
	//     are declared type volatile in the header file 
	//	   so they are not optimized away by the compiler

	*(FLASH_COMMON_X555) = 0xAA;		// unlock main flash, write 0xAA to addess 0xX555
	*(FLASH_COMMON_XAAA) = 0x55;		// unlock main flash, write 0x55 to addess 0xXAAA
	*(FLASH_COMMON_X555) = 0x90;		// write 0x90 command to get ID

	id = *(flash_id_address);		// read flash status, address bit A6 = 0
						//				  A1 = 0
						//				  A0 = 1
	*(FLASH_COMMON_X555) = 0xF0;  // reset the flash array (short reset instruction) 
		        // now delay 3 msec per dat sheet

	return (id);				// return byte ID value
	}

#endif


/* 
Module: flash_read_sector_protect
Reads main Flash sector protection status.
An unsigned char byte value is returned that contains the status 
for all eight sectors of main Flash memory. This byte value can 
be decoded as follows:

BitD7   BitD6   BitD5   BitD4   BitD3   BitD2   BitD1   BitD0
 fs7	 fs6     fs5     fs4     fs3     fs2     fs1     fs0

  fsx >> 1 = Flash sector is write protected
  fsx >> 0 = Flash sector is not write protected

The protection bits may only be read by the microcontroller. They
can be set or cleared only through the JTAG channel or a device
programmer, not the microcontroller.


Note:  You'll need to include the header files generated by PSDsoft
Express. 
*/

#ifdef _F_R_S_P

extern xdata PSD_REGS PSD8xx_reg;// _at_ PSD_REG_ADDR;	// Define PSD registers at address "csiop" space

unsigned char flash_read_sector_protect()	

	{
 
 	return (PSD8xx_reg.MAINPROTECT);   //This is a register inside the PSD
					// For reference, see the header file 
					// upsd3200.h for the location of 
					// the PSD register, MAINPROTECT.
	}

#endif

/*
End of Group Main Flash Memory
*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品国产一区二区精华液 | 久久天天做天天爱综合色| 亚洲一区二区三区四区在线观看| 91在线porny国产在线看| 国产精品国产自产拍高清av | 99久久精品99国产精品| 国产精品久久看| 99视频国产精品| 亚洲综合色自拍一区| 欧美日韩极品在线观看一区| 日韩精品成人一区二区三区 | 欧美日韩精品一区二区在线播放| 亚洲一区二区精品视频| 91精品国产高清一区二区三区蜜臀| 青青青伊人色综合久久| 欧美一区二区人人喊爽| 久久国产生活片100| 国产视频不卡一区| 91日韩在线专区| 三级一区在线视频先锋| 久久亚洲精精品中文字幕早川悠里| 成人小视频在线| 亚洲mv在线观看| 久久你懂得1024| 欧美性生活大片视频| 日韩av一区二区三区| 国产性做久久久久久| 在线精品视频一区二区三四| 日韩黄色免费电影| 国产精品午夜在线观看| 欧美体内she精高潮| 国产美女av一区二区三区| 亚洲视频在线观看三级| 欧美一区二区视频免费观看| 成人精品小蝌蚪| 日韩国产一二三区| 中文字幕一区二区三区av| 欧美一区二区人人喊爽| www.日韩av| 久久66热re国产| 一区二区三区精品在线| 久久伊人蜜桃av一区二区| 欧美日韩一级二级三级| 国产91精品在线观看| 天天色综合天天| 亚洲欧美一区二区三区国产精品| 日韩欧美在线不卡| 在线亚洲人成电影网站色www| 精品一区二区三区影院在线午夜 | 成人激情动漫在线观看| 日韩电影在线免费观看| 综合久久一区二区三区| 国产亚洲欧美一级| 亚洲国产精品t66y| 成人精品一区二区三区四区| 成人av免费网站| 一区二区日韩电影| 精品99一区二区| 欧美顶级少妇做爰| 欧美伊人久久久久久久久影院 | 日本午夜一本久久久综合| 亚洲乱码日产精品bd| 国产精品素人一区二区| 久久久久久久久久久99999| 欧美挠脚心视频网站| 91久久一区二区| 94-欧美-setu| 91在线观看成人| 97精品久久久午夜一区二区三区| 国产精品18久久久久久vr| 美日韩一区二区三区| 日本美女一区二区三区视频| 亚洲特黄一级片| 亚洲乱码国产乱码精品精小说| 亚洲国产精品av| 国产精品久久毛片| 国产精品久久久久久久浪潮网站| 久久精品男人天堂av| 国产日韩v精品一区二区| 欧美精品一区二区三区高清aⅴ| 91精品国产福利| 日韩免费高清av| 久久青草国产手机看片福利盒子| 精品成人一区二区| 久久综合九色综合97婷婷女人| 91精品一区二区三区久久久久久 | 亚洲第一电影网| 亚洲成人av一区二区三区| 亚洲一区二区精品3399| 天涯成人国产亚洲精品一区av| 首页综合国产亚洲丝袜| 日韩av中文字幕一区二区三区| 蜜臀91精品一区二区三区| 国产原创一区二区三区| 国产69精品久久久久毛片 | 国内国产精品久久| 韩国三级电影一区二区| 成人在线视频首页| 色94色欧美sute亚洲线路二| 欧美三级资源在线| 精品日韩av一区二区| 欧美激情一区在线观看| 亚洲精品网站在线观看| 午夜国产不卡在线观看视频| 男女激情视频一区| 懂色av噜噜一区二区三区av| 99久久久久免费精品国产 | 91在线你懂得| 欧美美女视频在线观看| 精品奇米国产一区二区三区| 欧美国产日韩a欧美在线观看| 中文字幕佐山爱一区二区免费| 亚洲国产人成综合网站| 久久精品国产99国产精品| 久久久久国产免费免费| 东方aⅴ免费观看久久av| 亚洲视频在线一区二区| 9191成人精品久久| 中文字幕乱码亚洲精品一区| 亚洲大片精品永久免费| 国产精品资源在线观看| 在线观看中文字幕不卡| 久久久亚洲综合| 亚洲国产成人91porn| 国产成人精品一区二区三区四区| 91九色最新地址| 精品国产免费一区二区三区香蕉| 亚洲欧美韩国综合色| 国产精品资源站在线| 欧美日韩一区二区三区四区五区| 久久色.com| 三级精品在线观看| 99视频热这里只有精品免费| 日韩一级片在线播放| 亚洲人成影院在线观看| 韩国女主播一区二区三区| 欧美日韩国产美| 综合色天天鬼久久鬼色| 国产成人精品aa毛片| 日韩免费观看高清完整版| 亚洲成人一区在线| 色综合久久66| 日本一区二区三区免费乱视频| 免费欧美日韩国产三级电影| 日本韩国一区二区三区| 国产精品美女一区二区三区| 精品在线亚洲视频| 日韩一级在线观看| 日本91福利区| 欧美丰满少妇xxxxx高潮对白| 亚洲视频在线观看三级| www.亚洲激情.com| 国产精品色在线观看| 成人午夜电影网站| 国产午夜精品久久| 国产综合一区二区| 欧美一区二区女人| 视频在线在亚洲| 欧美日韩高清在线播放| 国产精品久久久久aaaa樱花| 成人小视频免费在线观看| 久久影音资源网| 久久激情综合网| 欧美日高清视频| 一级中文字幕一区二区| 波多野结衣在线一区| 欧日韩精品视频| 亚洲综合久久久| 欧洲av一区二区嗯嗯嗯啊| 中文字幕一区二区三区四区不卡 | 国产最新精品精品你懂的| 欧美日韩久久一区二区| 一区二区三区蜜桃网| 色诱视频网站一区| 亚洲欧洲综合另类在线| 99国产精品99久久久久久| xfplay精品久久| 国产一区二区免费看| 精品国产三级a在线观看| 亚洲欧美偷拍另类a∨色屁股| 色综合咪咪久久| 亚洲四区在线观看| 一本在线高清不卡dvd| 国产欧美一区视频| 97精品国产97久久久久久久久久久久| 国产人妖乱国产精品人妖| 国产麻豆视频精品| 精品久久久久久久久久久久久久久| 日日夜夜免费精品| 欧美电影在线免费观看| 日本不卡在线视频| 久久综合九色综合97_久久久| 激情都市一区二区| 国产欧美精品在线观看| 国产九色sp调教91| 国产精品国产a| 在线亚洲免费视频| 亚洲人成人一区二区在线观看 | 极品美女销魂一区二区三区 | 色综合中文综合网|