⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 csl_mshwsetupraw.c

📁 TI达芬奇dm644x各硬件模块测试代码
💻 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_msHwSetupRaw.c * *  @brief  File for functional layer of CSL API @a CSL_msHwSetupRaw() * *  Path: \\(CSLPATH)\\ipmodules\\memstick\\src * *//* ============================================================================= *  Revision History *  ================ *  14-Dec-2004 kpn File Created. *                  Added code for register MSMCR. * ============================================================================= */#include <csl_ms.h>/** ============================================================================ *   @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 * ============================================================================= */#pragma CODE_SECTION (CSL_msHwSetupRaw, ".text:csl_section:ms");CSL_Status CSL_msHwSetupRaw (    CSL_MsHandle               hMs,    CSL_MsConfig              *config){    if (hMs == NULL) {        return CSL_ESYS_BADHANDLE;    }    if (config == NULL) {        return CSL_ESYS_INVPARAMS;    }    hMs->regs->MSCMD  = config->MSCMD;    hMs->regs->MSDAT  = config->MSDAT;    hMs->regs->MSSYST = config->MSSYST;    hMs->regs->MSMCR  = config->MSMCR;    return CSL_SOK;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -