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

📄 plat_api.h

📁 YLP270的Windows CE5.0 bsp源码。
💻 H
字号:
/****************************************************************************
***  Intel Confidential
***  Copyright (C) Intel Corporation 1994-2000
***  All Rights Reserved.
***  ------------------------------------------------------------------------
***
***
***  Project Name:   Persistent Storage Manager (PSM)
***
***  Module Name:    Platform Specific Library/Services (PLAT)
***
***  File:           PLAT_API.H - External function prototypes for this module
***
***  File Revision:  $Revision:: 1                                          $
***                      $Date:: 6/30/03 4:58p                              $
***                    $Author:: Ejvanals                                   $
***
***  Purpose:        Defines all external (API) function prototypes that are
***                  used to interface with the Platform Services module.
***
***  $NoKeywords: $
*****************************************************************************/

/*
*****************************************************************
* NOTICE OF LICENSE AGREEMENT
*
* This code is provided by Intel Corp., and the use is governed   
* under the terms of a license agreement. See license agreement   
* for complete terms of license. 
*
* YOU MAY ONLY USE THE SOFTWARE WITH INTEL FLASH PRODUCTS.  YOUR 
* USE OF THE SOFTWARE WITH ANY OTHER FLASH PRODUCTS IS EXPRESSLY  
* PROHIBITED UNLESS AND UNTIL YOU APPLY FOR, AND ARE GRANTED IN 
* INTEL'S SOLE DISCRETION, A SEPARATE WRITTEN SOFTWARE LICENSE  
* FROM INTEL LICENSING ANY SUCH USE.  
***************************************************************** 
*/

#if !defined (__PLAT_API_H)   /* Multiple-inclusion sentry - DO NOT REMOVE */
#define __PLAT_API_H

/*-------------------------- Start of PLAT_API.H --------------------------*/


/****************************************************************************
*
* Include Files:
*
* STANDTYP.H - Standard data type definitions
* PSM_EXT.H  - Definitions for the PSM_OEMInfo and PSM_FormatOptions types
*
****************************************************************************/

#include "STANDTYP.H"
#include "PSM_EXT.H"



/*------------------------- Constants and Defines -------------------------*/


/*----------------- Idle Reclaim-specific Compile Options -----------------*/
                                                                   
/****************************************************************************
*
*  This compile option is used to control whether any "extra" test code will be 
*  complied in to test the idle reclaim task.
* 
*  TRUE - Indicates the at the OEM will be creating and maintaining the idle 
*         reclaim semaphore.  The semaphore should be release only when the 
*         system is detemined idle.  The OEM will determine when the sytem is
*         "idle".  This also disables PSM from creating and control of a 
*         Idle reclaim semaphore.
*
*  FALSE - Indicates the OEM will not be managing an idle reclaim semaphore.  
*            
*
*****************************************************************************/

//#define     IDLE_RECLAIM_OEM_SEMAPHORE_ACTIVE     TRUE


/*---------------------- External Function Prototypes ---------------------*/


/****************************************************************************
*
* "PLAT_DefineArrayParameters"
*
* DESCRIPTION:
*    This function supplies platform-specific information to the PSM software
*    stack.  It is called by the PSM stack during initialization, to retrieve
*    information about the location of the flash array, as well as information
*    about the size and start offset of the data partition.
*
*    Normally, this function just copies the contents of the local OEMInfo
*    structure out to the caller's memory space.  This procedure is defined
*    as a function, to give OEMs the opportunity to analyze the current state
*    of their system, and adjust these values accordingly (if desired).
*
* PARAMETERS:
*    (OUT) oem_info_ptr - On input, this variable points to a PSM_OEMInfo
*                         structure.  This structure must be completely
*                         filled with valid information before this function
*                         returns.
* RETURNS:
*    This function returns FALSE (0) if no error occurs, otherwise a non value
*    indicates an error condition.
*
****************************************************************************/

UINT8 PLAT_DefineArrayParameters(PSM_OEMInfoPtr oem_info_ptr);


/****************************************************************************
*
* "PLAT_FormatRecovery"
*
* DESCRIPTION:
*    This function is called by the PSM software stack if its initialization
*    fails due to (what appears to be) a corrupted data partition.  The
*    purpose of this function is to allow the OEM to decide whether to
*    reformat the data partition, as a "last resort" form of recovery.  Note
*    that this may not be the best course of action, if the OEM suspects that
*    the initialization is failing due to a low-battery condition, rather than
*    because of a data corruption issue in flash.
*
* PARAMETERS:
*    (OUT) format_options_ptr - On input, this variable points to a
*                               PSM_FormatOptions structure.  This structure
*                               must be completely filled with valid
*                               information before this function returns, if
*                               this function returns TRUE.  If this function
*                               returns FALSE, the contents of this structure
*                               do not need to be set to any particular value.
*                               See below for more information about the
*                               meaning of the TRUE/FALSE return values.
*
* RETURNS:
*    The return value from this function indicates whether the PSM software
*    stack is authorized to format the data partition.  If the return value
*    is TRUE, the PSM software stack will reformat the data partition, using
*    the values supplied in the PSM_FormatOptions structure, after which
*    initialization should complete successfully.  If the return value from
*    this function is FALSE, the PSM software stack will fail out of its
*    initialization with an error, and the user will be unable to access the
*    data partition.
*
****************************************************************************/

UINT8 PLAT_FormatRecovery(PSM_FormatOptionsPtr format_options_ptr);


/****************************************************************************
*
* "PLAT_VPEN_ToggleInit"
*
* DESCRIPTION:
*    This function is called by the PSM software stack to to enable or disable
*    the toggling of the flash device Erase/Program/Block lock enable pin.  
*       
*
*    VPEN_VirtualReadRegAddress - A pointer containing an address which can be
*                                 used to read the current state I/O register
*                                 controlling the VPEN line of the flash 
*                                 device.  This information is required to 
*                                 properly change the VPEN I/O bit without 
*                                 changing the state of the other I/O bits that
*                                 may be controled by the register. This 
*                                 address MUST be a valid system address if 
*                                 VPEN_ReadModifyWrite is set to TRUE. 
*
*    VPEN_VirtualWriteRegAddress - A pointer containing an address which can be
*                                  used to write to the I/O register that
*                                  controls the VPEN line of the flash 
*                                  device.  This information is required to 
*                                  properly change the VPEN I/O bit.  This 
*                                  address MUST be a valid system address. 
*
*    VPEN_SetMask - Defines the bit mask needed to set the VPEN bit active.
*
*    VPEN_ClearMask - Defines the bit mask needed to set the VPEN bit inactive.
*
*    VPEN_ToggleEnabled - Set to TRUE if toggling of VPEN will be used.        
*
*    VPEN_ReadModifyWrite - This defines wether or not the register controlling
*                           the VPEN can be read from.  
*                           Set to FALSE if the register is a read only.  The 
*                           mask value will be store at the Virtual write 
*                           register address location.
*                           Set to TRUE - the current register value will be 
*                           read from the read register address.  Next the mask
*                           will be applied to this value.  (Note if negative 
*                           logic the mask value inverted first) The the value 
*                           is stored at the write register address.     
*
*    VPEN_PositiveLogic - This defines if the VPEN is controlled by positive or
*                         negative logic.
*                         Set False - Indicates negative logic.  The mask 
*                                     values to be set for 
*  
*                         Set TRUE - Indicates positive logic.  Masks will not
*                                    be changed during initialization.
*
****************************************************************************/

BOOL PLAT_VPEN_ToggleInit(PLAT_OEM_VPENToggleInfoPtr vpen_info_ptr);


/****************************************************************************
*
* "PLAT_IdleReclaim_SystemIdleSemaphore"
*
* DESCRIPTION:
*     This fuction is called by the PSM software stack to initialize its 
*     configuration for a system idle event.  The SystemIdleEventEnabled
*     should only be set to TRUE if a name event will be created with the exact 
*     name specified in the users guide and the signalling and unsignalling of
*     the event will be completely comtrolled by the OEM.  The OEM must determine  
*     when the  sytem is "idle" when signalling the event and unsignal the 
*     event when system is in use.  
*
****************************************************************************/

BOOL PLAT_DefineSystemIdleEventEnabled(void);

/****************************************************************************
*
* "PLAT_INTC_AddrInit"
*
* DESCRIPTION:
*   This function is called by the PSM software stack to determine the OEM
*   IRQ Pending Register Address(icip) & FIQ interuppt Pending Register Address
*   location (icfp, if applicable).  These Registers will be polled by PSM to
*   check the pending interrupts to be serviced.  OEM must set appropriate polling
*   flag (say if only IRQ is enabled by OEM or both IRQ and FIQ are enabled)

*    INTC_icipVirtualReadAddress:   This is the absolute virtual address location 
                                    where the OEM implemented the IRQ Pending Register
*    INTC_icfpVirtualReadAdderss:   This is the absolute virtual address location 
                                    where the OEM implemented the  FIQ Pending Register
****************************************************************************/
BOOL PLAT_INTC_AddrInit(PLAT_OEM_INTC_AddrInfoPtr intc_addr_info_ptr);

/*--------------------------- End of PLAT_API.H ---------------------------*/

#endif  /* For the "#if !defined (__PLAT_API_H)" multiple-inclusion sentry */

⌨️ 快捷键说明

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