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

📄 template.h

📁 intel p33 driver file
💻 H
📖 第 1 页 / 共 3 页
字号:
 *
 * 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_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      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 ( UINT8  returnSR );


/****************************************************************************
 *
 * 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_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_LockBlockDown
 *
 * Description:
 *
 *    This procedure is called to lock down 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_LockBlockDown ( 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      ProtectionRegister - Protection Register number to be locked
 *
 *    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:
 *
 *    Protection Register number to be locked is valid
 *
 ***************************************************************************/
TMPL_Status TMPL_LockProtection ( UINT32 ProtectionRegister, UINT8 returnSR );

/****************************************************************************
 *
 * TMPL_PageMode
 *
 * Description:
 *
 *    This procedure is called to enable or disable page mode read to
 *    the device.  If page mode is disabled, device is set to synchronous
 *    read mode.
 *
 *    Note:  If device is set to synchronous, use TMPL_SetConfiguration function
 *           to set burst sequence, burst length, clock edge, etc.) in the
 *           the Read Configuration Register.
 *
 * 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,
                                UINT16  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,
                                        UINT16_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      returnSR - flag to indicate whether the device status register
 *                       value should be returned by this function.

⌨️ 快捷键说明

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