📄 csl_msgethwsetup.c
字号:
/* ============================================================================ * Copyright (c) Texas Instruments Inc 2002, 2003, 2004, 2005 * * Use of this software is controlled by the terms and conditions found in the * license agreement under which this software has been supplied. * =========================================================================== *//** @file csl_msGetHwSetup.c * * @brief File for functional layer of CSL API @a CSL_msGetHwSetup() * * Path: \\(CSLPATH)\\ipmodules\\memstick\\src * * Description * - The @a CSL_msGetHwSetup() function definition & it's associated * functions * * Date 7th June, 2004 * Author Santosh Narayanan * *//* ============================================================================= * Revision History * ================ * 14-Dec-2004 kpn Updated the file according to CSL Upgradation guidelines. * ============================================================================= */#include <csl_ms.h>/** ============================================================================ * @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 hwSetupRead Pointer to the hardware 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 * ============================================================================= */#pragma CODE_SECTION (CSL_msGetHwSetup, ".text:csl_section:ms");CSL_Status CSL_msGetHwSetup ( CSL_MsHandle hMs, CSL_MsHwSetup *hwSetupRead){ CSL_Status status = CSL_SOK; if (hMs == NULL) { return CSL_ESYS_BADHANDLE; } if (hwSetupRead == NULL) { return CSL_ESYS_INVPARAMS; } hwSetupRead->reset = CSL_FEXT (hMs->regs->MSSYST, MS_MSSYST_RST); hwSetupRead->mode = CSL_FEXT (hMs->regs->MSSYST, MS_MSSYST_SRAC); hwSetupRead->crc = CSL_FEXT (hMs->regs->MSSYST, MS_MSSYST_NOCRC); hwSetupRead->intClear = CSL_FEXT (hMs->regs->MSSYST, MS_MSSYST_INTCLR); hwSetupRead->intHost = CSL_FEXT (hMs->regs->MSSYST, MS_MSSYST_INTEN); hwSetupRead->intDevice = CSL_FEXT (hMs->regs->MSSYST, MS_MSSYST_MSIEN); hwSetupRead->fifoClear = CSL_FEXT (hMs->regs->MSSYST, MS_MSSYST_FCLR); hwSetupRead->fifoDir = CSL_FEXT (hMs->regs->MSSYST, MS_MSSYST_FDIR); hwSetupRead->dmaMode = CSL_FEXT (hMs->regs->MSSYST, MS_MSSYST_DAM); hwSetupRead->drm = CSL_FEXT (hMs->regs->MSSYST, MS_MSSYST_DRM); hwSetupRead->drqInt = CSL_FEXT (hMs->regs->MSSYST, MS_MSSYST_DRQSL); hwSetupRead->rei = CSL_FEXT (hMs->regs->MSSYST, MS_MSSYST_REI); hwSetupRead->reo = CSL_FEXT (hMs->regs->MSSYST, MS_MSSYST_REO); hwSetupRead->bsyCount = CSL_FEXT (hMs->regs->MSSYST, MS_MSSYST_BSY); hwSetupRead->byteSwap = (CSL_MsByteSwapSel) CSL_FEXT (hMs->regs->MSMCR, MS_MSMCR_BS); hwSetupRead->clockDivider= (CSL_MsClkDivRatio) CSL_FEXT (hMs->regs->MSMCR, MS_MSMCR_CD); return status;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -