📄 csl_ssw.h
字号:
* SSW device. The device can be re-opened anytime after it has been normally * closed if so required. The handle returned by this call is input as an * essential argument for rest of the APIs described for this module. * * <b> Usage Constraints: </b> * SSW must be successfully initialized via @a CSL_sswInit() before calling * this function. Memory for the @a CSL_sswObj must be allocated outside * this call. This object must be retained while usage of this peripheral. * * @b Example: * @verbatim CSL_SswObj sswObj; CSL_Status status; ... hSsw = CSL_sswOpen(&sswObj, CSL_SSW_1, NULL, &status); @endverbatim * * @return returns a handle @a CSL_SswHandle to the requested instance of * SSW if the call is successful, otherwise, a @a NULL is returned. * */CSL_SswHandle CSL_sswOpen ( /** Pointer to the object that holds reference to the * instance of SSW requested after the call */ CSL_SswObj* pSswObj, /** Instance of SSW to which a handle is requested */ CSL_InstNum sswNum, /** Module specific parameters; * Currently there are none; the user should pass 'NULL' */ CSL_SswParam *pSswParam, /** This returns the status (success/errors) of the call. * Could be 'NULL' if the user does not want status information. */ CSL_Status *pStatus );/* * ====================================================== * @func CSL_sswClose * @desc Close (Invalidate) a SSW module (passed as handle). * The SSW module cannot be accessed any more. * * @arg hSsw * Handle to SSW module * @ret CSL_Status * * ======================================================*/ CSL_Status CSL_sswClose( CSL_SswHandle hSsw);/* * ====================================================== * @func CSL_sswHwSetup * @desc * Configures a SSW module using the different config structures. * * @arg hSsw * Handle to the SSW module * @arg setup * h/w setup structure for the SSW module * @ret CSL_Status * The function will return an error if cannot complete the request * * ======================================================*/ CSL_Status CSL_sswHwSetup( CSL_SswHandle hSsw, CSL_SswHwSetup *setup);/** This function initializes the device registers with the register-values * provided through the Config Data structure. For information passed through * the Config Data structure refer to @a CSL_SswConfig. * * <b> Usage Constraints: </b> * The user has to allocate space for & fill in the main setup structure * appropriately before calling this function. * * @b Example: * @verbatim CSL_SswHandle hSsw; CSL_SswConfig config; config.UART1_CFGREG = 1; config.I2C_CFGREG = 0; .... .... .... CSL_sswHwSetupRaw(hSsw, &config); @endverbatim * * @return Returns the status of the setup operation * */ CSL_Status CSL_sswHwSetupRaw( CSL_SswHandle hSsw, CSL_SswConfig * setup);/* * ====================================================== * @func CSL_sswHwControl * @desc Controls the parameters of SSW module (passed as handle) * There are various parameters such as * 1) TODO * 2) TODO * ......... * Usage Constraints: * SSW should have been opened before with a valid handle * * The are various Operations that can be done here are: * 1) TODO * 2) TODO * 3) TODO * 4) TODO * ......... * * The function will return an error if cannot complete the request * * @arg hSsw * Handle to the SSW module * @arg cmd * The operation to be performed. * @arg cmdArg * This is a void pointer, and will be cast to the required type. * @ret CSL_Status * * ======================================================*/ CSL_Status CSL_sswHwControl( CSL_SswHandle hSsw, CSL_SswHwControlCmd cmd, void *cmdArg);/** @brief Peripheral specific initialization function. * * This is the peripheral specific intialization function. This function is * idempotent in that calling it many times is same as calling it once. * This function initializes the CSL data structures, and doesn't touches * the hardware. * * <b> Usage Constraints: </b> * This function should be called before using any of the CSL APIs in the SSW * module. * * Note: As SSW doesn't have any context based information, currently, the function * just returns CSL_SOK. User is expected to pass NULL in the function call. * * @b Example: * @verbatim ... if (CSL_SOK != CSL_sswInit(NULL)) { return; } @endverbatim * * @return returns the status of the operation * */CSL_Status CSL_sswInit( /** SSW specific context information */ CSL_SswContext * pContext );/* * ====================================================== * @func CSL_sswGetHwStatus * @desc * Traces the various parameters of SSW module(passed as handle) * * Usage Constraints: * SSW module should have been opened before with a valid handle * * The are various Operations that can be done here are: * 1) TODO * 2) TODO * ....... * * @arg hSsw * Handle to the SSW module * @arg query * The Values to be traced back * @arg response * This is a void pointer, and will be cast to the required type. * @ret CSL_Status * The function will return an error if cannot complete the request * * ======================================================*/ CSL_Status CSL_sswGetHwStatus( CSL_SswHandle hSsw, CSL_SswHwStatusQuery query, void* response);/** @brief 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_sswOpen() * function call. * * Note: 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. Please refer the documentation for * more details. * * @b Example: * @verbatim CSL_Status status; CSL_SswBaseAddress baseAddress; ... status = CSL_sswGetBaseAddress(CSL_SSW_1, NULL, &baseAddress); @endverbatim * * @return Returns the status of the operation (see @a CSL_Status) * */CSL_Status CSL_sswGetBaseAddress( /** Instance number */ CSL_InstNum sswNum, /** Module specific parameters */ CSL_SswParam * pSswParam, /** Base address details */ CSL_SswBaseAddress * pBaseAddress);#ifdef __cplusplus}#endif#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -