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

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

?? template.c

?? 嵌入式單片機(jī)下可做對(duì)Intel flash編程的代碼
?? C
?? 第 1 頁 / 共 4 頁
字號(hào):
/*************************************************************************
 *** Intel Confidential                                      
 *** Copyright (C) Intel Corporation 2000                 
 *** All Rights Reserved.                                    
 *** --------------------------------------------------------------------
 ***
 *** Project Name: Flash Templates
 ***
 *** Module Name: Template
 ***
 *** File: Template.C - Common template C source file
 ***
 *** File Revision: $Revision: 6 $, $JustDate:  3/24/00 $, $Author: Kalowry $
 ***
 *** Purpose:
 ***
 ***    The purpose of this file is to implement the common application 
 ***    programmers interface for flash template software.  This module
 ***    implements all flash template subroutines that do not have
 ***    a device specific implementation in the device.c module for
 ***    the supported device.  Macros are used to determine if
 ***    the template.c common implementation or the device.c specific
 ***    implementation is used by the template for each subroutine.
 ***
 ***    Note that some common template functions implemented in this
 ***    module will return STATUS_UNSUPPORTED since no common
 ***    implementation is possible due to the differences between 
 ***    supported devices for those functions.  The device.c module
 ***    must contain implementations for these particular functions
 ***    when the function is in fact supported for that device.
 ***
 *** $NoKeywords: $
 *************************************************************************/

/*
***************************************************************
* INTEL OEM SOFTWARE LICENSE AGREEMENT
* BETWEEN INTEL CORPORATION AND OEM/Licensee ("You")
*  (Rev 10/04/99)
*
* BY USING THIS SOFTWARE, YOU ("You" or "Licensee") ARE AGREEING 
* TO BE BOUND BY THE TERMS OF THIS AGREEMENT.  DO NOT USE THE 
* SOFTWARE UNTIL YOU HAVE CAREFULLY READ AND AGREED TO THE 
* FOLLOWING TERMS AND CONDITIONS.  IF YOU DO NOT AGREE TO THE 
* TERMS OF THIS AGREEMENT, PROMPTLY RETURN THE SOFTWARE AND ANY 
* ACCOMPANYING ITEMS. LICENSEE MUST BE AN ORIGINAL EQUIPMENT 
* MANUFACTURER ("OEM") SYSTEM DEVELOPER TO ACQUIRE ANY RIGHTS 
* IN THE SOFTWARE UNDER THIS LICENSE AGREEMENT.
*
* LICENSE: Intel Corporation ("Intel") grants the Licensee the 
* non-exclusive right to use the software program ("Software") 
* in source and / or object code form on the terms set forth 
* below.  Licensee will not use, copy, modify, rent, sell or 
* transfer the Software or any portion thereof, except as 
* provided in this Agreement.  
*
* USE RESTRICTION:
* THIS ROYALTY FREE LICENSE ALLOWS LICENSEE TO USE THE SOFTWARE 
* WITH INTEL FLASH PRODUCTS ONLY. USE OF THE SOFTWARE WITH ANY 
* OTHER FLASH PRODUCTS IS EXPRESSLY PROHIBITED UNLESS AND UNTIL 
* LICENSEE APPLIES FOR, AND IS GRANTED, IN INTEL'S SOLE DISCRETION.
* A SEPARATE WRITTEN SOFTWARE LICENSE AGREEMENT BETWEEN LICENSEE 
* AND INTEL IS NECESSARY BEFORE ANY SUCH USE.
*
* LICENSEE MAY:
* 1. Copy the Software for support, backup or archival purposes;
* 2. Install or distribute the Software in object code form only;
* 3. Install, use, modify, distribute, and/or make or have made 
* Derivatives based on the Software subject to the terms and 
* conditions in this Agreement;
* 4. Modify and/or use Software source code that Intel provides to
* the Licensee, provided that Licensee does not remove or modify 
* the "Compatibility" module, if any, in the Software or in any 
* Derivatives and subject to the other restrictions contained 
* herein;
* 5. Allow authorized contractors ("Subcontractors") engaged by 
* the Licensee for the sole purpose of product development work to
* have access to the Software solely for that purpose. 
* Subcontractors do NOT acquire any of the Licensee rights to the 
* Software provided in this Agreement.
*
* RESTRICTIONS:  
* LICENSEE IS NOT ALLOWED TO: 
* 1.  Copy, disclose or distribute the Software, in whole or in 
* part, except as provided for in this Agreement;
* 2.  Remove or modify the "Compatibility" module, if any, in 
* the Software or in any Derivatives;
* 3.  Decompile or reverse engineer any Software delivered in 
* object code form.
*
* LICENSEE MUST:
* Execute the "Compatibility" module if provided with the 
* Software.
*
* TRANSFER:  Except as provided above, Licensee may not 
* transfer or disclose the Software to any other party.
*
* OWNERSHIP AND COPYRIGHT OF SOFTWARE: Title to the Software 
* and all copies thereof remain with Intel.  The Software is 
* copyrighted and is protected by United States and 
* international copyright laws.  Licensee will not remove 
* the copyright notice from the Software.  Licensee agrees 
* to prevent the unauthorized copying of the Software.
*
* DERIVATIVES: "Derivatives" are any work that is based upon the 
* Software, such as a revision, modification, translation, or 
* compilation in which the Software is recast, transformed or 
* adapted; any adaptation, subset, addition, improvement or 
* combination of or including the Software; and any new material, 
* information or data derived from the Software, including new 
* material which may be protectable by copyright, patent or other
* proprietary rights.  Licensee is not required to provide Intel 
* with a copy of the source or object code for any Derivatives 
* created by Licensee. Licensee may use, market, sell, and/or 
* distribute Derivatives in object code form only at Licensee's own
* risk and expense.  Licensee may use, but may not market, sell or 
* distribute, source code for any Derivatives, subject to the Use 
* Restriction and other restrictions contained in this Agreement. 
* Title to Derivatives, other than the portion(s) of the 
* Derivatives consisting of any portion of the Software, shall 
* remain with Licensee.
*
* CONFIDENTIALITY: Licensee will maintain the confidentiality of 
* the source code for the Software with at least the same degree 
* of care that Licensee uses to protect Licensee's own confidential 
* and proprietary information, but with no less than a reasonable 
* degree under the circumstances. Disclosure of source code will 
* only be made to Licensee's employees on a need-to-know basis. 
* Subject to the licenses granted hereunder, Licensee shall 
* maintain the Software source code and all other proprietary 
* information relating to the Software in confidence and shall 
* not disclose to others any such source code or other Intel 
* proprietary information relating to the Software. Any 
* Subcontractors to whom Licensee discloses the source code for 
* the Software must sign a written confidentiality agreement 
* which contains terms regarding the Software no less restrictive 
* than those set forth in this Agreement.
*
* WARRANTY:  The Software is provided "AS IS". Intel warrants 
* that the media on which the Software is furnished will be free 
* from defects in material and workmanship for a period of one 
* year upon receipt. 
*
* THE ABOVE WARRANTIES ARE THE ONLY WARRANTIES OF ANY KIND GIVEN 
* BY INTEL UNDER THIS AGREEMENT. INTEL SPECIFICALLY DISCLAIMS ANY 
* OTHER WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF 
* MERCHANTABILITY, NONINFRINGEMENT OR FITNESS FOR ANY PARTICULAR 
* PURPOSE.
*
* LIMITATION OF LIABILITY: NEITHER INTEL NOR ITS VENDORS OR AGENTS 
* SHALL BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF USE, LOSS OF 
* DATA, INTERRUPTION OF BUSINESS, NOR FOR INDIRECT, SPECIAL, 
* INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER 
* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY 
* OF SUCH DAMAGES.
*
* TERMINATION OF THIS LICENSE: Intel reserves the right to conduct 
* or have conducted audits to verify Licensee's compliance with 
* this Agreement.  Intel may terminate this Agreement at any 
* time if Licensee is in breach of any of its terms and conditions.
* Upon termination, Licensee will immediately destroy, and certify 
* in writing the destruction of, the Software and return all copies 
* of the Software and documentation to Intel.
*
* U.S. GOVERNMENT RESTRICTED RIGHTS: The Software and documentation
* were developed at private expense and are provided with 
* "RESTRICTED RIGHTS".  Use, duplication or disclosure by the 
* Government is subject to restrictions as set forth in 
* FAR52.227-14 and DFAR252.227-7013 et seq. or its successor.
*
* EXPORT LAWS: The distribution and export/re-export of the 
* Software shall be in compliance with the laws, regulations, 
* orders or other restrictions of the U.S. Export Administration 
* Regulations.
*
* APPLICABLE LAW: This Agreement is governed by the laws of the 
* State of Delaware and the United States, including patent and
* copyright laws.  Any claim arising out of this Agreement will be 
* brought in Delaware.  
*
* Intel reserves the right to use and/or include Licensee's name
* in public relations activities and marketing material after the 
* product is publicly announced.
*****************************************************************
*/
/* Page Break  */


/* Include Files */
#include "template.h"

/*
 * Global Functions
 */ 

#if !DEVICE_CLEAR_STATUS /* if there is no device.c implementation */
/****************************************************************************
 *
 * TMPL_ClearStatus
 *
 * Description:   
 *    This procedure is called to clear the status register on the flash
 *    device.  See the flash device datasheet for specific details on 
 *    this command.
 *
 * Parameters:
 *    NONE
 *
 * Returns:   
 *    NONE
 *
 * Assumptions:
 *    NONE
 *
 ***************************************************************************/
void TMPL_ClearStatus     ( void )
{

   TMPL_WriteF( TMPL_BASE_FLASH_ADDRESS,  TMPL_CLEAR_STATUS_REGISTER );

}
#endif /* !DEVICE_CLEAR_STATUS */


#if !DEVICE_ERASE_BLOCK /* if there is no device.c implementation */
/****************************************************************************
 *
 * TMPL_EraseBlock
 *
 * Description:   
 *
 *    This procedure is called to erase a data block on the flash 
 *    device.  See the flash device datasheet for specific details on
 *    this command.
 *
 * Parameters:
 *
 *    IN      blocknum - the block number on the device.
 *
 *    IN      returnSR - flag to indicate whether the device status register
 *                       value should be returned by this function.
 *
 * Returns:   
 *
 *    TMPL_Status - includes function return status defined by enum
 *                  TMPL_CommandStat and optionally the flash device
 *                  status register value.  
 *
 * Assumptions:
 *
 *    NONE
 *
 ***************************************************************************/
TMPL_Status TMPL_EraseBlock   ( UINT16 blocknum,
                                UINT8 returnSR )
{

   TMPL_Status   stat;
   UINT32 blockadd;
  
   stat = TMPL_GetBlockAddress( blocknum, &blockadd );

   if ( stat.Result != StatCompleted )
   {
	  return( stat );
   }

   if ( returnSR )
   {
      TMPL_ClearStatus();
   }

   TMPL_WriteF(blockadd, TMPL_BLOCK_ERASE);

   TMPL_WriteF(blockadd, TMPL_CONFIRM );

   if ( !TMPL_WaitUntilReady( TMPL_ERASE_TIMEOUT ) )
   {
      stat.Result = StatTimeout;
   }
   else
   {
      stat.Result = StatCompleted;
   }

   if ( returnSR )
   {
      stat.SR = TMPL_ReadStatus();
   }

   /* return device to read array mode */
   TMPL_WriteF(TMPL_BASE_FLASH_ADDRESS, TMPL_READ_ARRAY );

   return( stat );

}
#endif /* !DEVICE_ERASE_BLOCK */


#if !DEVICE_ERASE_ALL_BLOCKS /* if there is no device.c implementation */
/****************************************************************************
 *
 * TMPL_EraseAllBlocks
 *
 * Description:   
 *
 *    This procedure is called to erase all data blocks on the flash 
 *    device.  See the flash device datasheet for specific details on
 *    the block erase command.
 *
 * Parameters:
 *
 *    IN      returnSR - flag to indicate whether the device status register
 *                       value should be returned by this function.
 *
 * Returns:   
 *
 *    TMPL_Status - includes function return status defined by enum
 *                  TMPL_CommandStat and optionally the flash device
 *                  status register value.
 *
 * Assumptions:
 *
 *    NONE
 *
 ***************************************************************************/
TMPL_Status TMPL_EraseAllBlocks ( UINT8 returnSR )
{

   TMPL_Status stat;

   stat.Result = StatUnsupported;

   return( stat );
}
#endif /* !DEVICE_ERASE_ALL_BLOCKS */


#if !DEVICE_ERASE_SUSPEND /* if there is no device.c implementation */
/****************************************************************************
 *
 * TMPL_EraseSuspend
 *
 * Description:   
 *
 *    This procedure is called to issue the erase suspend command to
 *    the flash device.  See the flash device datasheet for specific details 
 *    on this command.
 *
 * Parameters:
 *
 *    IN      blocknum - the block number on the device.
 *
 *    IN      returnSR - flag to indicate whether the device status register
 *                       value should be returned by this function.
 *
 * Returns:   
 *
 *    TMPL_Status - includes function return status defined by enum
 *                  TMPL_CommandStat and optionally the flash device
 *                  status register value.
 *
 * Assumptions:
 *
 *    When this function is called the device is currently in the erase 
 *    mode for the block identified.
 *
 ***************************************************************************/
TMPL_Status TMPL_EraseSuspend ( UINT16 blocknum,
                                UINT8  returnSR )
{

   TMPL_Status stat;

   stat.Result = StatUnsupported;

   return( stat );
}
#endif /* !DEVICE_ERASE_SUSPEND */


#if !DEVICE_EXTENDED_QUERY
/****************************************************************************
 *
 * TMPL_ExtendedQuery
 *
 * Description:   
 *
 *    This procedure is called to retrieve the extended query
 *    data from the flash device.  See the flash device datasheet for
 *    specific details on this command.
 *
 * Parameters:
 *
 *    OUT      *extquery - pointer to extended query structure
 *
 * Returns:   
 *
 *    TMPL_Status - includes function return status defined by enum
 *                  TMPL_CommandStat.
 *
 * Assumptions:
 *
 *    NONE
 ***************************************************************************/
TMPL_Status TMPL_ExtendedQuery( struct TMPL_ExtQueryData *extquery )
{

   TMPL_Status stat;

   stat.Result = StatUnsupported;

   return( stat );

}
#endif /* !DEVICE_EXTENDED_QUERY */


#if !DEVICE_GET_BLOCK_ADDRESS /* if there is no device.c implementation */
/****************************************************************************
 *
 * TMPL_GetBlockAddress
 *
 * Description:   
 *
 *    This procedure is called to get the flash starting address for the
 *    specified block number.
 *
 * Parameters:
 *
 *    IN      blocknum - the block number on the device.
 *
 *    OUT     address  - the starting flash address for the specified
 *                       block.
 *
 * Returns:   
 *
 *    TMPL_Status - includes function return status defined by enum
 *                  TMPL_CommandStat.
 *
 * Assumptions:
 *
 *    NONE
 *
 ***************************************************************************/
TMPL_Status TMPL_GetBlockAddress ( UINT16     blocknum, 
                                   UINT32_PTR address )
{

   TMPL_Status stat;

   stat.Result = StatUnsupported;

   return( stat );
}
#endif /* !DEVICE_GET_BLOCK_ADDRESS */


#if !CLIENT_GET_FPTR /* if there is no client provided implementation */
/****************************************************************************
 *
 * TMPL_GetFptr
 *
 * Description:   
 *
 *    This procedure is called to return a flash ptr given a 
 *    specified device address.  This routine will likely need to be
 *    provided externally by the template client in order to properly
 *    deal with addressing details that are specific to the HW platform.
 *
 * Parameters:
 *
 *    IN      address  - the flash address 
 *
 * Returns:   
 *
 *    TMPL_FDATA_PTR  - address returned in ptr form
 *
 * Assumptions:
 *
 *    NONE
 *
 ***************************************************************************/
TMPL_FDATA_PTR  GetFptr( UINT32 address )
{
   return( (TMPL_FDATA_PTR)address );
}
#endif /* !CLIENT_GET_FPTR */


#if !DEVICE_GET_QUERY_ADDRESS /* if there is no device.c implementation */
/****************************************************************************
 *
 * TMPL_GetQueryAddress
 *
 * Description:   
 *
 *    This procedure is called to get the flash address for a given
 *    query offset.
 *
 *   Parameters:
 *
 *    IN      offset   - query offset location
 *
 *    OUT     address  - the flash address for the specified query
 *                       offset.
 *
 * Returns:   
 *
 *    TMPL_Status - includes function return status defined by enum
 *                  TMPL_CommandStat.
 *
 * Assumptions:
 *
 *    NONE
 *
 ***************************************************************************/
TMPL_Status TMPL_GetQueryAddress ( UINT32 offset, UINT32_PTR address )
{
   TMPL_Status stat;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久国产剧场电影| 国产一区二区福利视频| 91精品国产综合久久香蕉的特点 | 色偷偷一区二区三区| 日韩中文字幕麻豆| 亚洲视频免费看| xf在线a精品一区二区视频网站| 久久久影视传媒| 日本精品裸体写真集在线观看 | 在线综合亚洲欧美在线视频| 成人久久久精品乱码一区二区三区| 樱花影视一区二区| 久久婷婷色综合| 欧美一区二区三区不卡| 成人免费福利片| 狠狠色狠狠色合久久伊人| 亚洲国产综合色| 亚洲日本青草视频在线怡红院| 欧美α欧美αv大片| 欧美日韩国产美女| 91蜜桃传媒精品久久久一区二区| 国产制服丝袜一区| 蜜臀va亚洲va欧美va天堂| 一区二区三区日韩精品视频| 国产精品色婷婷| 欧美精品一区二区三区在线播放 | 欧美一区二区人人喊爽| 91丨porny丨在线| 成人深夜在线观看| 国产专区欧美精品| 蜜臀久久99精品久久久画质超高清 | 成人久久久精品乱码一区二区三区 | 宅男在线国产精品| 欧美日韩成人一区二区| 在线视频欧美区| 日本高清不卡视频| 色综合天天综合网国产成人综合天 | 午夜精品福利一区二区蜜股av| 亚洲欧美aⅴ...| 亚洲视频香蕉人妖| 亚洲精品乱码久久久久久日本蜜臀| 国产亚洲美州欧州综合国| 亚洲精品一区二区三区在线观看| 欧美一区二区日韩| 精品国产伦一区二区三区观看方式 | 一区二区三区四区不卡在线| 亚洲少妇最新在线视频| 亚洲欧美一区二区久久| 亚洲人精品一区| 一级女性全黄久久生活片免费| 亚洲欧洲综合另类| 亚洲一区二区黄色| 亚洲444eee在线观看| 天天色综合成人网| 日本aⅴ免费视频一区二区三区| 日本成人在线一区| 黄网站免费久久| 风间由美一区二区三区在线观看| 国产成人av一区| 成人黄色国产精品网站大全在线免费观看 | 亚洲人成小说网站色在线| 亚洲美女视频一区| 97久久精品人人做人人爽| 成人黄色777网| 色综合久久中文综合久久牛| 欧美色倩网站大全免费| 7777精品伊人久久久大香线蕉完整版 | 成人欧美一区二区三区在线播放| 亚洲人成影院在线观看| 午夜精品123| 国产一区亚洲一区| 91在线视频观看| 欧美人与性动xxxx| 久久婷婷国产综合精品青草| 最新国产の精品合集bt伙计| 亚洲国产综合人成综合网站| 卡一卡二国产精品| 成人av片在线观看| 欧美日韩一区二区三区高清| 精品国产免费人成在线观看| 日韩一区在线看| 免费人成精品欧美精品| 成人一区在线观看| 欧美视频在线播放| 久久久亚洲高清| 一区二区三区丝袜| 国产一区二区毛片| 欧洲另类一二三四区| 欧美精品一区二区三区久久久| 日韩理论片中文av| 精品一区二区成人精品| 色婷婷亚洲精品| 亚洲精品一区二区三区四区高清| 亚洲另类春色校园小说| 九九精品一区二区| 色偷偷一区二区三区| 久久综合色一综合色88| 夜夜精品视频一区二区| 国产一区二区三区免费| 欧美综合欧美视频| 欧美国产禁国产网站cc| 日韩成人精品在线| 色综合中文字幕国产| 日韩午夜在线观看| 北条麻妃一区二区三区| 在线不卡的av| 亚洲激情自拍偷拍| 岛国av在线一区| 日韩欧美亚洲国产精品字幕久久久| 亚洲人成电影网站色mp4| 国产在线一区观看| 538prom精品视频线放| 亚洲欧美日韩综合aⅴ视频| 狠狠色丁香婷综合久久| 555www色欧美视频| 亚洲第一狼人社区| 91麻豆精品一区二区三区| 国产婷婷精品av在线| 久久精品国产亚洲高清剧情介绍| 欧美制服丝袜第一页| 亚洲天堂精品在线观看| 国产99一区视频免费| 久久五月婷婷丁香社区| 久久精品国产99| 欧美一卡二卡在线观看| 无码av免费一区二区三区试看| 91社区在线播放| 亚洲色图在线播放| 99精品国产99久久久久久白柏| 久久精品在这里| 国产麻豆一精品一av一免费 | 中文字幕一区二区三区四区 | www.亚洲在线| 国产欧美1区2区3区| 国产九九视频一区二区三区| 日韩美女在线视频| 精品一区二区三区免费毛片爱 | 国产精品成人免费在线| 成人性视频免费网站| 欧美激情在线一区二区| 国产成人无遮挡在线视频| 久久嫩草精品久久久精品| 国产一区二区0| 国产日韩欧美a| 国产不卡视频在线播放| 亚洲国产精品99久久久久久久久| 日韩欧美你懂的| 免费人成精品欧美精品| 日韩精品一区二区在线| 激情深爱一区二区| 国产亚洲欧洲一区高清在线观看| 国产传媒一区在线| 国产精品每日更新在线播放网址| 国产成人免费高清| 国产精品美女久久久久高潮| 91在线观看地址| 亚洲自拍偷拍九九九| 91精品在线免费观看| 国产一区二区三区在线观看免费| 国产午夜亚洲精品理论片色戒| 成人免费高清视频在线观看| 亚洲视频资源在线| 717成人午夜免费福利电影| 男人的天堂久久精品| 欧美激情综合在线| 色婷婷综合久色| 人人狠狠综合久久亚洲| 国产日本欧洲亚洲| 91福利视频网站| 免费在线一区观看| 国产精品美女久久久久高潮| 欧美怡红院视频| 久久精品国产第一区二区三区| 国产精品污网站| 欧美少妇一区二区| 激情综合网最新| 中文字幕一区二区三区不卡 | 亚洲国产综合视频在线观看| 欧美一级夜夜爽| 成人精品视频网站| 日日嗨av一区二区三区四区| 国产欧美一区二区三区在线老狼| 色综合视频一区二区三区高清| 日韩成人免费看| 1000精品久久久久久久久| 欧美二区三区的天堂| 国产成人超碰人人澡人人澡| 亚洲一区在线电影| 久久精品视频免费观看| 欧美性猛片xxxx免费看久爱| 加勒比av一区二区| 亚洲高清不卡在线| 国产欧美日韩综合精品一区二区| 欧美午夜一区二区三区| 国产精品夜夜嗨| 三级久久三级久久| 亚洲特黄一级片| 欧美精品一区在线观看| 欧美综合欧美视频| 成人h精品动漫一区二区三区|