📄 csl_emif.h
字号:
@endverbatim
*
* <b> Return Value </b> CSL_EmifHandle
* @li Valid EMIF handle will be returned if
* status value is equal to CSL_SOK.
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n 1. The status is returned in the status variable. If status
* returned is
* @li CSL_OK - Open call is successful
* @li CSL_ESYS_FAIL - Module instance is invalid.
*
* 2. EMIF object structure is populated
*
* @b Modifies
* @n 1. The status variable
*
* 2. EMIF object structure
*
*
* @b Example
* @verbatim
CSL_EmifObj hemifObj;
CSL_EmifHandle hEmif;
CSL_EmifHwSetup hwSetup;
CSL_Status status;
CSL_EmifSdramSelfRefresh sdramSelfRefreshEn;
CSL_EmifSdramPageSize sdramPageSize;
CSL_EmifNarrowMode
sdramDataBusSizeNarrowMode;
CSL_EmifSdramInternalBankSetUp
sdramInternalBankSetUp;
CSL_EMIFSdramPowerDownEn sdramPowerDownEn;
CSL_EMIFSdramCasLaten sdramCasLaten;
CSL_EMIFSdramDriveStrength sdramDriveStrength;
..
hEmif = CSL_emifOpen (&emifObj, CSL_EMIF, NULL, &status);
..
@endverbatim
* =============================================================================
*/
extern CSL_EmifHandle CSL_emifOpen (
/** Pointer to the object that holds reference to the
* instance of EMIF requested after the call
*/
CSL_EmifObj *hEmifObj,
/** Instance of EMIF to which a handle is requested
*/
CSL_InstNum emifNum,
/** Module specific parameters;
* Currently there are none; the user should pass 'NULL'
*/
CSL_EmifParam *pEmifParam,
/** This returns the status (success/errors) of the call.
* Could be 'NULL' if the user does not want status information.
*/
CSL_Status *pStatus
);
/** ============================================================================
* @n@b CSL_emifClose
*
* @b Description
* @n This function marks that CSL for the EMIF instance is closed. CSL for
* the EMIF instance need to be reopened before using any EMIF CSL API
* again.
*
* @b Arguments
* @verbatim
hEmif Handle to EMIF
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - EMIF is closed Successfully
* @li CSL_ESYS_BADHANDLE - The handle passed is invalid
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @li 1. CSL for the EMIF instance is closed
*
* @b Modifies
* @n System data object
*
*
* @b Example
* @verbatim
..
hEmif = CSL_emifOpen (&emifObj, CSL_EMIF, NULL, &status);
..
@endverbatim
* =============================================================================
*/
extern CSL_Status CSL_emifClose(
/** Pointer to the object that holds reference to the
instance of EMIF requested after the call
*/
CSL_EmifHandle hEmif
);
/** ============================================================================
* @n@b CSL_emifHwSetup
*
* @b Description
* @n It configures the EMIF registers as per the values passed in the
* hardware setup structure
*
* @b Arguments
* @verbatim
hPllc Handle to the EMIF
hwSetup Pointer to harware setup structure
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Hardware setup successful
* @li CSL_ESYS_BADHANDLE - Invalid CSL handle
* @li CSL_ESYS_INVPARAMS - Hardware structure is not
properly initialized
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n EMIF controller registers are configured according
* to the hardware setup parameters
*
* @b Modifies
* @n EMIF controller registers
*
* @b Example
* @verbatim
CSL_EmifHandle hEmif;
CSL_EmifObj emifObj;
CSL_EmifHwSetup hwSetup;
CSL_status status;
hEmif = CSL_emifOpen (&emifObj, CSL_EMIF, NULL, &status);
. .
status = CSL_emifHwSetup(hEmif, &hwSetup);
. .
@endverbatim
* ===========================================================================
*/
CSL_Status CSL_emifHwSetup(
/** Pointer to the object that holds reference to the
* instance of EMIF requested after the call
*/
CSL_EmifHandle hEmif,
/** Pointer to setup structure which contains the
* information to program EMIF to a useful state
*/
CSL_EmifHwSetup *setup
);
/** ============================================================================
* @n@b CSL_emifHwSetupRaw
*
* @b Description
* @n This function initializes the device registers with the register-values
* provided through the Config Data structure.
*
* @b Arguments
* @verbatim
hPllc Handle to the EMIF instance
config Pointer to EMIF config structure
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Configuration successful
* @li CSL_ESYS_BADHANDLE - Invalid handle
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n The registers of the specified EMIF instance will be setup
* according to input configuration structure values.
*
* @b Modifies
* @n Hardware registers of the specified EMIF instance.
*
* @b Example
* @verbatim
CSL_EmifHandle hEmif;
CSL_EmifConfig config = CSL_EMIF_CONFIG_DEFAULTS;
CSL_Status status;
. .
status = CSL_emifHwSetupRaw (hEmif, &config);
. .
@endverbatim
* =============================================================================
*/
CSL_Status CSL_emifHwSetupRaw(
CSL_EmifHandle hEmif,
CSL_EmifConfig * setup
);
/** ============================================================================
* @n@b CSL_emifGetHwSetup
*
* @b Description
* @n It retrives the hardware setup parameters of the pllc
* specified by the given handle.
*
* @b Arguments
* @verbatim
hEmif Handle to the emif
hwSetup Pointer to the harware setup structure
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Retrieving the hardware setup
* parameters is successful
* @li CSL_ESYS_BADHANDLE - The handle is passed is
* invalid
* @li CSL_ESYS_INVPARAMS - Invalid parameter
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n The hardware setup structure is populated with the hardware setup
* parameters
*
* @b Modifies
* @n hwSetup variable
*
* @b Example
* @verbatim
CSL_EmifHandle hEmif;
CSL_EmifHwSetup hwSetup;
...
status = CSL_emifGetHwSetup(hEmif, &hwSetup);
...
@endverbatim
* ===========================================================================
*/
extern CSL_Status CSL_emifGetHwSetup(
/** pointer to the object that holds reference to the
* instance of EMIF requested after the call */
CSL_EmifHandle hEmif,
/** the query to this API which indicates the status/setup
* to be returned */
CSL_EmifHwSetup *setup
);
/** ============================================================================
* @n@b CSL_emifHwControl
*
* @b Description
* @n This function performs various control operations on the EMIF, based
* on the command passed
*
* @b Arguments
* @verbatim
hEmif The handle to EMIF module
cmd Operation to be performed on EMIF
cmdArg Argument specific to the command
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Successful completion of the query
* @li CSL_ESYS_INVCMD - Command not supported
* @li CSL_ESYS_BADHANDLE - Invalid handle
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n EMIF registers are configured according to the command and command
* arguments. The command determines which registers are modified.
*
* @b Modifies
* @n EMIF registers determined by the command.
*
* @b Example
* @verbatim
...
status = CSL_EmifHwControl(hEmif,
CSL_EMIF_CMD_SELF_REFRESH_ENABLE, &emifCount);
...
@endverbatim
* ===========================================================================
*/
extern CSL_Status CSL_emifHwControl(
/** Pointer to the object that holds reference to the
* instance of EMIF requested after the call
*/
CSL_EmifHandle hEmif,
/** The command to this API, which indicates the action to be taken
*/
CSL_EmifHwControlCmd cmd,
/** An optional argument @a void* casted
*/
void *voidPtr
);
/** ============================================================================
* @n@b CSL_emifGetHwStatus
*
* @b Description
* @n The function is used to get data about various parameters of the EMIF
* block. The data returned depends on the query passed.
*
* @b Arguments
* @verbatim
hEmif Handle to EMIF
query Type of data query to perform
response Pointer to buffer to return the data requested by the query passed
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Successful completion of the query
* @li CSL_ESYS_INVQUERY - Query command not supported
* @li CSL_ESYS_BADHANDLE - Invalid handle
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n The input argument response.
*
* @b Example
* @verbatim
Uint16 count = 0;
CSL_Status status;
. .
status = CSL_emifGetHwStatus(hEmif, CSL_EMIF_QUERY_DLL_STATUS,
&count);
. .
@endverbatim
* ===========================================================================
*/
extern CSL_Status CSL_emifGetHwStatus(
/** Pointer to the object that holds reference to the
* instance of EMIF requested after the call
*/
CSL_EmifHandle hEmif,
/** The query to this API, which indicates the status
* to be returned
*/
CSL_EmifHwStatusQuery query,
/** Placeholder to return the status; @a void* casted
*/
void *voidPtr
);
/** ============================================================================
* @n@b CSL_emifGetBaseAddress
*
* @b Description
* @n This function to get the base address of the EMIF instance.
*
* @b Arguments
* @verbatim
emifNum Instance number of the EMIF
emifParam Module specific parameters.
pBaseAddress Pointer to base address structure
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Successfully retrieved base address.
* @li CSL_ESYS_FAIL - Failed to get the base address
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n Gets the base address of EMIF
*
* @b Modifies
* @n The base address is populated in the base address structure
*
* @b Example
* @verbatim
CSL_status status;
CSL_EmifParam emifParam;
CSL_EmifBaseAddress baseAddress;
. .
status = CSL_emifGetBaseAddress (emifNum, &emifParam, &baseAddress);
. .
@endverbatim
* ===========================================================================
*/
extern CSL_Status CSL_emifGetBaseAddress(
/** Instance number
*/
CSL_InstNum emifNum,
/** Module specific parameters
*/
CSL_EmifParam * pEmifParam,
/** Base address details
*/
CSL_EmifBaseAddress * pBaseAddress
);
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -