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

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

?? c2312.c

?? flash programer driver
?? C
?? 第 1 頁 / 共 5 頁
字號:
   FlashReset();
   return rRetVal;
} /* EndFunction FlashQuadProgram */


#if defined(USE_M29DW640F_8)  /* In 8 bit Mode */
/******************************************************************************* 
Function:     ReturnType FlashOctProgram( udword udAddrOff, uCPUBusType *pArray ) 
Arguments:    udAddrOff is the address to program.
              pArray is the pointer to the content to be programmed
Return Value: The function returns the following conditions:   
               Flash_Success       
               Flash_ProgramFailed 
   
Note:         
1)    This procedure is available only in 8-bit mode. For the 16-bit mode, see the 
      FlashDoubleProgram/FlashQuadProgram procedure
2)    This procedure automatically put the two least significati bits of udAddrOff 
      to zero, to align the address with an oct-bytes boundary.

Description: This function programs eight consecutive byte, starting from the 
             oct-byte boundary.

Pseudo Code: 
   Step 1: Align address to oct-bytes boundary
   Step 2: Program
   Step 3: Wait until the Program/Erase Controller has completed
   Step 4: Return to read Array mode
********************************************************************************/ 
ReturnType FlashOctProgram( udword udAddrOff, uCPUBusType *pArray  )
{
   ReturnType rRetVal = Flash_Success; /* Return value */
   /* Step 1: Align address to oct-BYTE boundary */
   udAddrOff = udAddrOff  & (0xFFFFFFF8);

   /* Step 2: Program  */
   /* Note: the command is expressed without ConvAddr, because it is possible 
   only in 8bit mode*/
   FlashWrite( 0x0AAA, CMD(0x008B) ); /* Oct Byte Command */
   FlashWrite( udAddrOff, 	*pArray++);
   FlashWrite( udAddrOff+1, *pArray++);
   FlashWrite( udAddrOff+2, *pArray++);
   FlashWrite( udAddrOff+3, *pArray++);
   FlashWrite( udAddrOff+4, *pArray++);
   FlashWrite( udAddrOff+5, *pArray++);
   FlashWrite( udAddrOff+6, *pArray++);
   FlashWrite( udAddrOff+7, *pArray++);

   /* Step 3: Wait until Program/Erase Controller has completed */
   if (FlashDataToggle(udAddrOff) != Flash_Success)
      rRetVal = Flash_ProgramFailed; 

   /* Step 4: Return to read Array mode */ 
   FlashReset();
   return rRetVal;

}/* End of  FlashOctProgram*/
#endif /*defined(USE_M29DW640F_8) */



/*******************************************************************************
Function:     uCPUBusType FlashRead( udword udAddrOff )
Arguments:    udAddrOff is the offset into the flash to read from.
Return Value: The uCPUBusType content at the address offset.
Description: This function is used to read a uCPUBusType from the flash.
   On many microprocessor systems a macro can be used instead, increasing the
   speed of the flash routines. For example:

   #define FlashRead( udAddrOff ) ( BASE_ADDR[udAddrOff] )

   A function is used here instead to allow the user to expand it if necessary.

Pseudo Code:
   Step 1: Return the value at double-word offset udAddrOff
*******************************************************************************/
uCPUBusType FlashRead( udword udAddrOff ) {
   /* Step 1 Return the value at double-word offset udAddrOff */
       return BASE_ADDR[udAddrOff];
} /* EndFunction FlashRead */





/*******************************************************************************
Function:     ReturnType FlashReadCfi( uword uwCfiFunc, uCPUBusType *ucpCfiValue )
Arguments:    uwCfiFunc is set to the offset of the CFI parameter to be read.
   The CFI value read from offset uwCfiFunc is passed back to the calling 
   function by *ucpCfiValue.

Return Value: The function returns the following conditions: 
   Flash_Success
   Flash_CfiFailed

Description: This function checks whether the flash CFI is present and operable, 
   then reads the CFI value at the specified offset. The CFI value requested is
   then passed back to the calling function.   

Pseudo Code:
   Step 1: Send the Read CFI Instruction  
   Step 2: Check that the CFI interface is operable     
   Step 3: If CFI is operable read the required CFI value
   Step 4: Return the flash to Read Array mode 
*******************************************************************************/
ReturnType FlashReadCfi( uword uwCfiFunc, uCPUBusType *ucpCfiValue ) {
   ReturnType rRetVal = Flash_Success; /* Holds the return value */
   udword udCfiAddr; /* Holds CFI address */

   /* Step 1: Send the Read CFI Instruction */
   FlashWrite( ConvAddr(0x55), (uCPUBusType)CMD(0x0098) ); 

   /* Step 2: Check that the CFI interface is operable */
   if( ((FlashRead( ShAddr(0x00000010) ) & CMD(0x00FF) ) != CMD(0x0051)) ||
       ((FlashRead( ShAddr(0x00000011) ) & CMD(0x00FF) ) != CMD(0x0052)) ||
       ((FlashRead( ShAddr(0x00000012) ) & CMD(0x00FF) ) != CMD(0x0059)) ) 
      rRetVal = Flash_CfiFailed;
   else {
      /* Step 3: Read the required CFI Info */
      udCfiAddr = (udword)uwCfiFunc;
      *ucpCfiValue = FlashRead( ShAddr((udCfiAddr & 0x000000FF)) );  
   } /* EndIf */
   
   FlashReset(); /* Step 4: Return to Read Array mode */
   return rRetVal;
} /* EndFunction FlashReadCfi */





/*******************************************************************************
Function:     ReturnType FlashReadDeviceId( uCPUBusType *ucpDeviceId )
Arguments:    - *ucpDeviceId = <return value> The function returns the Device Code.
   The device code for the part is:
   M29DW640F   0x227E

Note:         In case a common response of more flash chips is not identical the real
   read value will be given (Flash_ResponseUnclear)

Return Value: The function returns the following conditions:
   Flash_Success
   Flash_ResponseUnclear

Description: This function can be used to read the device code of the flash.

Pseudo Code:
   Step 1:  Send the Auto Select instruction
   Step 2:  Read the DeviceId
   Step 3:  Return the device to Read Array mode
   Step 4:  Check flash response (more flashes could give different results)
*******************************************************************************/
ReturnType FlashReadDeviceId( uCPUBusType *ucpDeviceId ) {

   /* Step 1: Send the AutoSelect command */
   FlashWrite( ConvAddr(0x00555), (uCPUBusType)CMD(0x00AA) ); /* 1st Cycle */
   FlashWrite( ConvAddr(0x002AA), (uCPUBusType)CMD(0x0055) ); /* 2nd Cycle */
   FlashWrite( ConvAddr(0x00555), (uCPUBusType)CMD(0x0090) ); /* 3rd Cycle */

   /* Step 2: Read the DeviceId */
   *ucpDeviceId = FlashRead(ShAddr(0x1)); /* A0 = 1, A1 = 0 */
   
   /* Step 3: Return to Read Array Mode */
   FlashReset();

   /* Step 4: Check flash response (more flashes could give different results) */
   return FlashResponseIntegrityCheck( ucpDeviceId );    

} /* EndFunction FlashReadDeviceId */





/*******************************************************************************
Function: ReturnType FlashReadExtendedBlockVerifyCode( uCPUBusType *ucpVerifyCode )
Arguments:    - *ucpVerifyCode = <return value>
                 The function returns the Extended Memory Block Verify Code.

   The Extended Memory Block Verify Code for the part are:

   M29DW640F   
   		0x80 (factory locked)
            0x00 (not factory locked)

Note:         In case a common response of more flash chips is not identical the real
   read value will be given (Flash_ResponseUnclear)

Return Value: The function returns the following conditions:
   Flash_Success
   Flash_ResponseUnclear

Description: This function can be used to read the Extended Memory Block Verify Code.
   The verify code is used to specify if the Extended Memory Block was locked/not locked
   by the manufacturer.

Pseudo Code:
   Step 1:  Send the Auto Select instruction
   Step 2:  Read the Extended Memory Block Verify Code
   Step 3:  Return the device to Read Array mode
   Step 4:  Check flash response (more flashes could give different results)
*******************************************************************************/
ReturnType FlashReadExtendedBlockVerifyCode( uCPUBusType *ucpVerifyCode ) {

   /* Step 1: Send the AutoSelect command */
   FlashWrite( ConvAddr(0x00555), (uCPUBusType)CMD(0x00AA) ); /* 1st Cycle */
   FlashWrite( ConvAddr(0x002AA), (uCPUBusType)CMD(0x0055) ); /* 2nd Cycle */
   FlashWrite( ConvAddr(0x00555), (uCPUBusType)CMD(0x0090) ); /* 3rd Cycle */

   /* Step 2: Read the Extended Memory Block Verify Code */
   *ucpVerifyCode = FlashRead(ShAddr(0x3)); /* A0 = 1, A1 = 1 */
   
   /* Step 3: Return to Read Array Mode */
   FlashReset();

   /* Step 4: Check flash response (more flashes could give different results) */
   return FlashResponseIntegrityCheck( ucpVerifyCode );    

} /* EndFunction FlashReadExtendedBlockVerifyCode */





/*******************************************************************************
Function:     ReturnType FlashReadManufacturerCode( uCPUBusType *ucpManufacturerCode )
Arguments:    - *ucpManufacturerCode = <return value> The function returns 
   the manufacture code (for ST = 0x0020). 
   In case a common response of more flash chips is not identical the real
   read value will be given (Flash_ResponseUnclear)

Return Value: The function returns the following conditions:
   Flash_Success
   Flash_ResponseUnclear

Description:   This function can be used to read the manufacture code of the flash.

Pseudo Code:
   Step 1:  Send the Auto Select instruction
   Step 2:  Read the Manufacturer Code
   Step 3:  Return the device to Read Array mode
   Step 4:  Check flash response (more flashes could give different results)
*******************************************************************************/
ReturnType FlashReadManufacturerCode( uCPUBusType *ucpManufacturerCode ) {

   /* Step 1: Send the AutoSelect command */
   FlashWrite( ConvAddr(0x00555), (uCPUBusType)CMD(0x00AA) ); /* 1st Cycle */
   FlashWrite( ConvAddr(0x002AA), (uCPUBusType)CMD(0x0055) ); /* 2nd Cycle */
   FlashWrite( ConvAddr(0x00555), (uCPUBusType)CMD(0x0090) ); /* 3rd Cycle */

   /* Step 2: Read the DeviceId */
   *ucpManufacturerCode = FlashRead( ShAddr(0x0) ); /* A0 = 0, A1 = 0 */
   
   /* Step 3: Return to Read Array Mode */
   FlashReset();

   /* Step 4: Check flash response (more flashes could give different results) */
   return FlashResponseIntegrityCheck( ucpManufacturerCode );    

} /* EndFunction FlashReadManufacturerCode */





/*******************************************************************************
Function:      void FlashReset( void )
Arguments:     none
Return Value:  Flash_Success
Description:   This function places the flash in the Read Array mode described
   in the Data Sheet. In this mode the flash can be read as normal memory.

   All of the other functions leave the flash in the Read Array mode so this is
   not strictly necessary. It is provided for completeness and in case of
   problems.

Pseudo Code:
   Step 1: write command sequence (see Instructions Table of the Data Sheet)
*******************************************************************************/
ReturnType FlashReset( void ) {

   /* Step 1: write command sequence */
   FlashWrite( ConvAddr(0x00555), (uCPUBusType)CMD(0x00AA) ); /* 1st Cycle */
   FlashWrite( ConvAddr(0x002AA), (uCPUBusType)CMD(0x0055) ); /* 2nd Cycle */
   FlashWrite( ANY_ADDR, (uCPUBusType)CMD(0x00F0) ); /* 3rd Cycle: write 0x00F0 to ANY address */
   return Flash_Success;

} /* EndFunction FlashReset */





/*******************************************************************************
Function:     ReturnType FlashResponseIntegrityCheck(uCPUBusType *ucpFlashResponse)
Arguments:    - ucpFlashResponse <parameter> + <return value> 
   The function returns a unique value in case one flash or an
   array of flashes return all the same value (Consistent Response = Flash_Success).
   In case an array of flashes returns different values the function returns the
   received response without any changes (Inconsistent Response = Flash_ResponseUnclear).

Return Value: The function returns the following conditions:
   Flash_Success
   Flash_ResponseUnclear
               
Description:   This function is used to create one response in multi flash
   environments, instead of giving multiple answers of the single flash
   devices. 

   For example: Using a 32bit CPU and two 16bit Flash devices, the device Id
   would be directly read: 00170017h, because each device gives an answer
   within the range of the databus. In order to give a simple response
   like 00000017h in all possible c

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精选一二三| 99久久婷婷国产综合精品| 亚洲国产一区二区视频| 亚洲欧美偷拍卡通变态| 国产精品欧美极品| 一区在线播放视频| 中文字幕中文字幕在线一区| 欧美国产欧美综合| 成人免费在线视频观看| 亚洲天堂免费看| 亚洲精品国产a| 亚洲国产三级在线| 午夜精品久久久久久久99樱桃| 亚洲国产sm捆绑调教视频| 亚洲第一会所有码转帖| 奇米色一区二区| 国产一区二区三区在线观看免费视频| 国产一区二区三区免费播放| 成人精品视频一区二区三区尤物| 成人av网址在线观看| 在线免费精品视频| 欧美三区在线观看| 日韩精品一区国产麻豆| 精品国产乱码久久久久久牛牛| 久久久一区二区三区| 中文字幕的久久| 亚洲狠狠丁香婷婷综合久久久| 亚洲影院理伦片| 免费成人美女在线观看.| 国产精品亚洲一区二区三区妖精| 成人av网站免费观看| 在线欧美一区二区| 精品国产一区二区在线观看| 日本一区二区三区国色天香| 亚洲综合一区在线| 久久国产精品免费| 91在线一区二区三区| 欧美军同video69gay| 久久影院午夜论| 樱花草国产18久久久久| 蜜桃一区二区三区四区| 成人福利视频在线看| 欧美撒尿777hd撒尿| 精品成人免费观看| 亚洲精品ww久久久久久p站| 日本成人中文字幕在线视频| 国产91精品一区二区麻豆网站| www.亚洲激情.com| 欧美一区午夜视频在线观看| 欧美韩国日本综合| 首页亚洲欧美制服丝腿| 国产99一区视频免费 | 欧美性猛交一区二区三区精品| 欧美日产在线观看| 中文av一区二区| 午夜av区久久| 成人免费精品视频| 日韩欧美国产一区二区在线播放| 中文字幕一区二区日韩精品绯色| 天天色综合天天| 国产91精品一区二区麻豆网站| 欧美天堂一区二区三区| 欧美经典一区二区| 日韩av一级片| 91久久久免费一区二区| 久久久91精品国产一区二区三区| 香蕉成人啪国产精品视频综合网 | 99精品欧美一区二区三区小说| 欧美电影一区二区| 国产精品每日更新| 久久99精品国产麻豆不卡| 色噜噜狠狠一区二区三区果冻| 2024国产精品| 日韩激情一二三区| 色天使色偷偷av一区二区| 国产亚洲综合av| 麻豆精品一区二区综合av| 欧美无乱码久久久免费午夜一区| 国产精品久久久久久久午夜片| 国产综合久久久久久久久久久久| 欧美高清一级片在线| 一区二区高清在线| 9i在线看片成人免费| 国产亚洲欧洲一区高清在线观看| 日本成人中文字幕在线视频| 欧美三日本三级三级在线播放| 国产精品久久精品日日| 国产精品99久久久久| 精品国产成人系列| 久久99精品国产| 欧美电影免费观看高清完整版在线 | 精品少妇一区二区三区免费观看| 亚洲高清免费视频| 91久久香蕉国产日韩欧美9色| 国产精品久久久久久妇女6080 | 日韩一区二区在线观看视频 | 在线观看精品一区| 亚洲欧美日韩国产综合| 91网站黄www| 亚洲品质自拍视频| 色综合天天狠狠| 曰韩精品一区二区| 欧美在线观看禁18| 亚洲国产人成综合网站| 欧美视频一区二区| 亚洲成人手机在线| 欧美二区三区91| 麻豆成人在线观看| 精品日韩一区二区| 国产精品资源在线看| 国产亚洲精品超碰| proumb性欧美在线观看| 国产精品久久久久久久第一福利| 白白色亚洲国产精品| 综合av第一页| 在线欧美日韩精品| 日韩在线a电影| 久久综合九色综合97婷婷女人 | 日本亚洲欧美天堂免费| 91精品国产日韩91久久久久久| 蜜臀av性久久久久av蜜臀妖精 | 一区二区视频在线| 欧美日韩一二三区| 美国十次综合导航| 国产人成一区二区三区影院| 成人99免费视频| 亚洲专区一二三| 欧美精品aⅴ在线视频| 极品少妇xxxx精品少妇偷拍| 中文字幕成人网| 在线亚洲高清视频| 奇米一区二区三区| 国产欧美日韩激情| 日本高清免费不卡视频| 热久久免费视频| 欧美国产成人精品| 欧美视频中文字幕| 老司机精品视频在线| 欧美高清在线视频| 欧美四级电影网| 国产乱码精品一品二品| 一区二区三区精品| 精品国产一区二区三区不卡 | 国产麻豆视频一区二区| 日韩码欧中文字| 日韩一区二区三区免费看| 懂色av噜噜一区二区三区av| 亚洲午夜精品久久久久久久久| 欧美大片免费久久精品三p| av一区二区三区四区| 五月激情六月综合| 国产精品日日摸夜夜摸av| 欧美美女一区二区| 成人美女视频在线看| 美女视频黄免费的久久| 国产精品不卡在线| 欧美成人r级一区二区三区| 99久久精品免费精品国产| 日韩 欧美一区二区三区| 亚洲天堂网中文字| 欧美刺激午夜性久久久久久久| 99re这里都是精品| 蜜桃视频第一区免费观看| 亚洲麻豆国产自偷在线| 久久久久国产免费免费| 欧美区一区二区三区| 成人黄色777网| 老司机午夜精品| 亚洲成年人影院| 成人欧美一区二区三区小说| 精品免费一区二区三区| 欧美日韩一区二区不卡| av成人老司机| 国产美女娇喘av呻吟久久| 强制捆绑调教一区二区| 亚洲尤物在线视频观看| 国产精品久久福利| 国产亚洲一区二区三区| 欧美一级片免费看| 欧美日韩情趣电影| 91啪亚洲精品| 国产不卡视频在线观看| 麻豆成人综合网| 日韩av电影免费观看高清完整版 | 日韩福利视频导航| 亚洲一区二区三区四区在线观看| 久久久久亚洲蜜桃| 精品久久久久一区| 91麻豆精品国产自产在线| 色999日韩国产欧美一区二区| 国产成人自拍网| 国产一区二区在线电影| 久久99久久精品| 日本女优在线视频一区二区| 亚洲r级在线视频| 亚洲一区二区综合| 亚洲自拍偷拍欧美| 亚洲成人久久影院| 亚洲午夜精品在线| 午夜精品视频一区|