📄 csl_ms.h
字号:
/** ============================================================================ * @n@b CSL_msClose * * @b Description * @n This function closes the specified instance of MS. * * @b Arguments * @verbatim hMs Handle to the MS instance @endverbatim * * <b> Return Value </b> CSL_Status * @li CSL_SOK - Close successful * @li CSL_ESYS_BADHANDLE - Invalid handle * * @b Example * @verbatim CSL_status status; CSL_MsObj msObj; CSL_MsHandle hMs; ... hMs = CSL_msOpen (&msObj, CSL_MS_PER_CNT, NULL, &status); ... status = CSL_msClose (hMs); @endverbatim * ============================================================================= */CSL_Status CSL_msClose ( CSL_MsHandle hMs);/** ============================================================================ * @n@b CSL_msHwSetup * * @b Description * @n It configures the memory stick registers as per the values passed * in the hardware setup structure. * * @b Arguments * @verbatim hMs Handle to the ms hwSetup Pointer to harware setup structure @endverbatim * * <b> Return Value </b> CSL_Status * @li CSL_SOK - Hardware setup successful * @li CSL_ESYS_BADHANDLE - Invalid handle * @li CSL_ESYS_INVPARAMS - Hardware structure is not properly initialized * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n MS registers are configured according to the hardware setup parameters * * @b Modifies * @n MS registers * * @b Example * @verbatim CSL_MsHandle hMs; CSL_MsObj msObj; CSL_MsHwSetup hwSetup; CSL_status status; ... hMs = CSL_msOpen(&msObj, CSL_MS, NULL, &status); status = CSL_amsHwSetup(hMs, &hwSetup); @endverbatim * ============================================================================= */CSL_Status CSL_msHwSetup ( CSL_MsHandle hMs, CSL_MsHwSetup *setup);/** ============================================================================ * @n@b CSL_msGetHwSetup * * @b Description * @n It retrives the hardware setup parameters of the memory stick * specified by the given handle. * * @b Arguments * @verbatim hMs Handle to the ms 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_MsHandle hMs; CSL_MsHwSetup hwSetup; ... status = CSL_msGetHwSetup(hMs, &hwSetup); @endverbatim * ============================================================================= */CSL_Status CSL_msGetHwSetup ( CSL_MsHandle hMs, CSL_MsHwSetup *setup);/** ============================================================================ * @n@b CSL_msHwSetupRaw * * @b Description * @n This function initializes the device registers with the register-values * provided through the Config Data structure. * * @b Arguments * @verbatim hMs Handle to the Ms instance config Pointer to config structure @endverbatim * * <b> Return Value </b> CSL_Status * @li CSL_SOK - Configuration successful * @li CSL_ESYS_BADHANDLE - Invalid handle * @li CSL_ESYS_INVPARAMS - Configuration is not properly initialized * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n The registers of the specified MS instance will be setup * according to value passed. * * @b Modifies * @n Hardware registers of the specified MS instance. * * @b Example * @verbatim CSL_MsHandle hMs; CSL_MsConfig config = CSL_MS_CONFIG_DEFAULTS; CSL_Status status; ... status = CSL_msHwSetupRaw (hMs, &config); @endverbatim * ============================================================================= */CSL_Status CSL_msHwSetupRaw ( CSL_MsHandle hMs, CSL_MsConfig *config);/** ============================================================================ * @n@b CSL_msHwControl * * @b Description * @n Takes a command of MS with an optional argument & implements it. * * @b Arguments * @verbatim hMs Handle to the MS instance cmd The command to this API indicates the action to be taken on MS. arg An optional argument. @endverbatim * * <b> Return Value </b> CSL_Status * @li CSL_SOK - Status info return successful. * @li CSL_ESYS_BADHANDLE - Invalid handle * @li CSL_ESYS_INVCMD - Invalid command * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n The MS is controlled according to input command and argument. * * @b Modifies * @n The hardware registers of MS. * * @b Example * @verbatim CSL_MsHandle hMs; CSL_MsHwControlCmd cmd; void arg; ... status = CSL_msHwControl (hMs, cmd, &arg); @endverbatim * ============================================================================= */CSL_Status CSL_msHwControl ( CSL_MsHandle hMs, CSL_MsHwControlCmd cmd, void *arg);/** ============================================================================ * @n@b CSL_msGetHwStatus * * @b Description * @n Gets the status of the different operations of MS * * @b Arguments * @verbatim hMs Handle to the MS instance query The query to this API of MS which indicates the status to be returned. response Placeholder to return the status. @endverbatim * * <b> Return Value </b> CSL_Status * @li CSL_SOK - Status info return successful * @li CSL_ESYS_BADHANDLE - Invalid handle * @li CSL_ESYS_INVPARAMS - Invalid parameter * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_MsHandle hMs; CSL_MsHwStatusQuery query; void reponse; ... status = CSL_msGetHwStatus (hMs, query, &response); @endverbatim * ============================================================================= */CSL_Status CSL_msGetHwStatus ( CSL_MsHandle hMs, CSL_MsHwStatusQuery query, void *response);/** ============================================================================ * @n@b CSL_msGetBaseAddress * * @b Description * @n Function to get the base address of the peripheral instance. * This function is used for getting the base address of the peripheral * instance. This function will be called inside the CSL_msOpen() * function call. This function is open for re-implementing if the user * wants to modify the base address of the peripheral object to point to * a different location and there by allow CSL initiated write/reads into * peripheral. MMR's go to an alternate location. * * @b Arguments * @verbatim msNum Specifies the instance of the MS to be opened. pMsParam Module specific parameters. pBaseAddress Pointer to baseaddress structure containing base address details. @endverbatim * * <b> Return Value </b> CSL_Status * @li CSL_OK - Open call is successful * @li CSL_ESYS_FAIL - The instance number is invalid * @li CSL_ESYS_INVPARAMS - Invalid parameter * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n Base Address structure is populated * * @b Modifies * @n 1. The status variable * @n 2. Base address structure is modified. * * @b Example * @verbatim CSL_Status status; CSL_MsBaseAddress baseAddress; ... status = CSL_msGetBaseAddress(CSL_MS_PER_CNT, NULL, &baseAddress); @endverbatim * ============================================================================= */CSL_Status CSL_msGetBaseAddress ( CSL_InstNum msNum, CSL_MsParam *pMsParam, CSL_MsBaseAddress *pBaseAddress);#ifdef __cplusplus}#endif#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -