⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 template.h

📁 此源码包为intel J3系列NorFlash的驱动程序,支持8位,16位总线宽度
💻 H
📖 第 1 页 / 共 3 页
字号:
 *    NONE
 ***************************************************************************/
TMPL_Status TMPL_ExtendedQuery( struct TMPL_ExtQueryData *extquery );


/****************************************************************************
 *
 * 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_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 TMPL_GetFptr( UINT32 address );


/****************************************************************************
 *
 * 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_LockBlock
 *
 * Description:   
 *
 *    This procedure is called to lock the specified 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_LockBlock ( UINT16 blocknum,
                             UINT8  returnSR );


/****************************************************************************
 *
 * TMPL_LockDownBlock
 *
 * Description:   
 *
 *    This procedure is called to lockdown the specified 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_LockDownBlock ( UINT16 blocknum,
                                 UINT8  returnSR );


/****************************************************************************
 *
 * TMPL_LockProtection
 *
 * Description:   
 *
 *    This procedure is called to program the protection register user lock
 *    bit on the flash device.  See the flash device datasheet for specific
 *    details on this 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_LockProtection ( UINT8 returnSR );


/****************************************************************************
 *
 * TMPL_PageMode 
 *
 * Description:   
 *
 *    This procedure is called to enable or disable page mode read to
 *    the device.
 *
 * Parameters:
 *
 *    IN    enable - flag "1" to indicate the page mode is anable and 
 *                   flag "0" to indicate the page mode is disable to 
 *                   the device.
 *
 * 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_PageMode ( UINT16 enable );


/****************************************************************************
 *
 * TMPL_ProgramFlash
 *
 * Description:   
 *
 *    This procedure is called to program the flash device at the specified 
 *    address with the single specified data value.  See the flash device 
 *    datasheet for specific details on this command.
 *
 * Parameters:
 *
 *    IN      address  - the flash address to be programmed.
 *
 *    IN      item     - the data value to be programmed.
 *
 *    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_ProgramFlash ( UINT32 address, 
                                UINT8  item,
                                UINT8  returnSR );


/****************************************************************************
 *
 * TMPL_ProgramFlashBuffered
 *
 * Description:   
 *
 *    This procedure is called to program the flash device at the specified 
 *    starting address contiguously with the specified buffer data.  See
 *    the flash device datasheet for specific details on the program
 *    command.
 *
 * Parameters:
 *
 *    IN      address  - the flash address to be programmed.
 *
 *    IN      buffer   - the buffer containing data to be programmed.
 *
 *    IN      numitems - the number of data items contained in the buffer.
 *
 *    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_ProgramFlashBuffered ( UINT32    address, 
                                        UINT8_PTR buffer, 
                                        UINT32    numbytes,
                                        UINT8     returnSR );


/****************************************************************************
 *
 * TMPL_ProgramProtection
 *
 * Description:   
 *
 *    This procedure is called to program the protection register on
 *    the flash device at the specified location with the specified data
 *    value.  See the flash device datasheet for specific details on this
 *    command.
 *
 * Parameters:
 *
 *    IN      location - the protection register location on the flash
 *                       device to be programmed.
 *
 *    IN      value    - the data item to be programmed.
 *
 *    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_ProgramProtection ( UINT32     location, 
                                     TMPL_FDATA value,
                                     UINT8      returnSR );



/****************************************************************************
 *
 * TMPL_ProgramSuspend
 *
 * Description:   
 *
 *    This procedure is called to issue the program 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 program
 *    mode for the block identified.
 *
 ***************************************************************************/
TMPL_Status TMPL_ProgramSuspend ( UINT16 blocknum,
                                  UINT8  returnSR );


/****************************************************************************
 *
 * TMPL_Query
 *
 * Description:   
 *
 *    This procedure is called to issue the query command to
 *    the flash device.  See the flash device datasheet for specific details 
 *    on this command.
 *
 * Parameters:
 *
 *    OUT      *query - pointer to query structure
 *
 * Returns:   
 *
 *    TMPL_Status - includes function return status defined by enum
 *                  TMPL_CommandStat
 *
 * Assumptions:
 *

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -