📄 csl_emifa.h
字号:
* =============================================================================
*/
CSL_Status CSL_emifaGetBaseAddress (
CSL_InstNum emifaNum,
CSL_EmifaParam *pEmifaParam,
CSL_EmifaBaseAddress *pBaseAddress
);
/** ============================================================================
* @n@b CSL_emifaHwSetupRaw
*
* @b Description
* @n This function initializes the device registers with the register-values
* provided through the Config data structure.
*
* @b Arguments
* @verbatim
hEmifa Handle to the EMIFA external memory interface instance
config Pointer to the config structure containing the
device register values
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Configuration successful
* @li CSL_ESYS_BADHANDLE - Invalid handle
* @li CSL_ESYS_INVPARAMS - Configuration structure
* pointer is not properly
* initialized
*
* <b> Pre Condition </b>
* @n Both CSL_ emifaInit () and CSL_emifaOpen() must be called successfully
* in order before calling this function
*
* <b> Post Condition </b>
* @n The registers of the specified EMIFA instance will be
* setup according to the values passed through the Config structure
*
* @b Modifies
* @n Hardware registers of the EMIFA
*
* @b Example
* @verbatim
CSL_EmifaHandle hEmifa;
CSL_EmifaConfig config = CSL_EMIFA_CONFIG_DEFAULTS;
CSL_Status status;
..
status = CSL_emifaHwSetupRaw(hEmifa, &config);
...
@endverbatim
* =============================================================================
*/
CSL_Status CSL_emifaHwSetupRaw (
CSL_EmifaHandle hEmifa,
CSL_EmifaConfig *config
);
/** ============================================================================
* @n@b CSL_emifaHwSetup
*
* @b Description
* @n This function initializes the device registers with the appropriate values
* provided through the HwSetup data structure. For information passed through
* the HwSetup data structure refer @a CSL_EmifaHwSetup.
*
* @b Arguments
* @verbatim
hEmifa Pointer to the object that holds reference to the
instance of EMIFA requested after the call
setup Pointer to setup structure which contains the
information to program EMIFA to a useful state
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_OK - configuration successful
* @li CSL_ESYS_FAIL - The external memory interface
* instance is not available.
* @li CSL_ESYS_INVPARAMS - Parameters are not valid
* @li CSL_ESYS_BADHANDLE - Handle is not valid
*
* <b> Pre Condition </b>
* @n Both @a CSL_emifaInit() and @a CSL_emifaOpen() must be called
* successfully in order before calling this function. The user has to
* allocate space for & fill in the main setup structure appropriately
* before calling this function.
*
* <b> Post Condition </b>
* @n EMIFA registers are configured according to the hardware setup parameters
*
* @b Modifies
* @n EMIFA registers
*
* @b Example:
* @verbatim
CSL_EmifaHandle hEmifa;
CSL_EmifaAsync asyncMem = CSL_EMIFA_ASYNCCFG_DEFAULTS;
CSL_EmifaAsyncWait asyncWait = CSL_EMIFA_ASYNCWAIT_DEFAULTS;
CSL_EmifaMemType value;
CSL_EmifaHwSetup hwSetup ;
value.ssel = 0;
value.async = &asyncMem;
value.sync = NULL;
hwSetup.asyncWait = &asyncMem;
hwSetup.cefg [0] = &value;
hwSetup.ceCfg [1] = NULL;
hwSetup.ceCfg [2] = NULL;
hwSetup.ceCfg [3] = NULL;
CSL_emifaHwSetup(hEmifa, &hwSetup);
@endverbatim
*
* =============================================================================
*/
CSL_Status CSL_emifaHwSetup (
CSL_EmifaHandle hEmifa,
CSL_EmifaHwSetup *setup
);
/** ============================================================================
* @n@b CSL_emifaGetHwSetup
*
* @b Description
* @n This function gets the current setup of the EMIFA. The status is
* returned through @a CSL_EmifaHwSetup. The obtaining of status
* is the reverse operation of @a CSL_emifaHwSetup() function.
*
* @b Arguments
* @verbatim
hEmifa Pointer to the object that holds reference to the
instance of EMIFA requested after the call
setup Pointer to setup structure which contains the
information to program EMIFA to a useful state
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_OK - Hardware status call is
* successful
* @li CSL_ESYS_FAIL - The external memory interface
* instance is not available.
* @li CSL_ESYS_INVPARAMS - Parameters are not valid
* @li CSL_ESYS_BADHANDLE - Handle is not valid
*
* <b> Pre Condition </b>
* @n Both @a CSL_emifaInit() and @a CSL_emifaOpen() must be called
* successfully in order before calling @a CSL_emifaGetHwSetup().
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n Second parameter setup
*
* @b Example:
* @verbatim
CSL_EmifaHandle hEmifa;
CSL_Status status;
CSL_EmifaHwSetup hwSetup;
CSL_EmifaAsync asyncMem;
CSL_EmifaMemType value;
CSL_EmifaAsyncWait asyncWait;
value.ssel = 0;
value.async = &asyncMem;
value.sync = NULL;
hwSetup.asyncWait = &asyncWait;
hwSetup.ceCfg [0] = &value;
hwSetup.ceCfg [1] = NULL;
hwSetup.ceCfg [2] = NULL;
hwSetup.ceCfg [3] = NULL;
status = CSL_emifaGetHwSetup(hEmifa, &hwSetup);
@endverbatim
*
* =============================================================================
*/
CSL_Status CSL_emifaGetHwSetup (
CSL_EmifaHandle hEmifa,
CSL_EmifaHwSetup *setup
);
/** ============================================================================
* @n@b CSL_emifaHwControl
*
* @b Description
* @n Control operations for the EMIFA. For a particular control operation, the
* pointer to the corresponding data type needs to be passed as argument
* HwControl function Call. All the arguments (structure elements included)
* passed to the HwControl function are inputs. For the list of commands
* supported and argument type that can be @a void* casted & passed with a
* particular command refer to @a CSL_EmifaHwControlCmd.
*
* @b Arguments
* @verbatim
hEmifa Pointer to the object that holds reference to the
instance of EMIFA requested after the call
cmd The command to this API indicates the action to be
taken
arg An optional argument @a void* casted
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_OK - Hardware control call is
* successful
* @li CSL_ESYS_INVCMD - command is not valid
* @li CSL_ESYS_BADHANDLE - Handle is not valid
*
* <b> Pre Condition </b>
* @n Both @a CSL_emifaInit() and @a CSL_emifaOpen() must be called
* successfully in order before calling @a CSL_emifaHwControl().
* For the argument type that can be @a void* casted & passed with a
* particular command refer to @a CSL_EmifaHwControlCmd
*
* <b> Post Condition </b>
* @n EMIFA registers are configured according to the command passed
*
* @b Modifies
* @n EMIFA registers
*
* @b Example:
* @verbatim
CSL_EmifaHandle hEmifa;
CSL_Status status;
Uint8 * command;
...
status = CSL_emifaHwControl(hEmifa,
CSL_EMIFA_CMD_PRIO_RAISE,
&command);
@endverbatim
*
* =============================================================================
*/
CSL_Status CSL_emifaHwControl (
CSL_EmifaHandle hEmifa,
CSL_EmifaHwControlCmd cmd,
void *arg
);
/** ============================================================================
* @n@b CSL_emifaGetHwStatus
*
* @b Description
* @n This function is used to read the current device configuration, status
* flags and the value present associated registers. User should allocate
* memory for the said data type and pass its pointer as an unadorned void*
* argument to the status query call. For details about the various status
* queries supported & the associated data structure to record the response,
* refer to @a CSL_EmifaHwStatusQuery.
*
* @b Arguments
* @verbatim
hEmifa Pointer to the object that holds reference to the
instance of EMIFA requested after the call
query The query to this API which indicates the status
to be returned
response Placeholder to return the status. @a void* casted
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_OK - successful on getting hardware
* status
* @li CSL_ESYS_INVQUERY - Query is not valid
* @li CSL_ESYS_BADHANDLE - Handle is not valid
*
* <b> Pre Condition </b>
* @n Both @a CSL_emifaInit() and @a CSL_emifaOpen() must be called
* successfully in order before calling @a CSL_emifaGetHwStatus().
* For the argument type that can be @a void* casted & passed with a
* particular command refer to @a CSL_EmifaHwStatusQuery
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n Third parameter response vlaue
*
* @b Example:
* @verbatim
CSL_EmifaHandle hEmifa;
CSL_Status status;
Uint8 *response;
...
status = CSL_emifaGetHwStatus(hEmifa,
CSL_EMIFA_QUERY_ENDIAN,
&response);
@endverbatim
*
*
* =============================================================================
*/
CSL_Status CSL_emifaGetHwStatus (
CSL_EmifaHandle hEmifa,
CSL_EmifaHwStatusQuery query,
void *response
);
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -