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

📄 csl_atahwsetup.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_ataHwSetup.c * *  @brief    File for functional layer of CSL API @a CSL_ataHwSetup() * *  Description *    - The @a CSL_ataHwSetup() function definition & it's associated *      functions * *  Path: \\(CSLPATH)\\ipmodules\\ata\\src * *  Modification 1 *    - modified on: 2004/03/08 *    - reason: created the sources * *  Date 2004/03/08 *  Author RG Kiran *//* ============================================================================= *  Revision History *  =============== *  11-Oct-2004 kpn  Updated according to review comments *  24-Sep-2004 kpn  Updated according to CSL Upgradation guidelines *  ============================================================================ */#include <csl_ata.h>#include <csl_ataAux.h>/** ============================================================================ *   @n@b CSL_ataHwSetup * *   @b Description *   @n It configures the ata registers as per the values passed *      in the hardware setup structure. * *   @b Arguments *   @verbatim            hAta            Handle to the ATA instance            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 Modifies *   @n The hardware registers of ATA. * *   @b Example *   @verbatim        CSL_AtaHandle    hAta;        CSL_AtaObj       ataObj;        CSL_AtaHwSetup   hwSetup;        CSL_status       status;        ...        hAta = CSL_ataOpen (&ataObj, CSL_ATA_PRIMARY, NULL, &status);        status = CSL_ataHwSetup(hAta, &hwSetup); *   @endverbatim *  ============================================================================ */#pragma CODE_SECTION (CSL_ataHwSetup, ".text:csl_section:ata");CSL_Status  CSL_ataHwSetup (    CSL_AtaHandle             hAta,    CSL_AtaHwSetup           *setup){    if (hAta == NULL) {        return CSL_ESYS_BADHANDLE;    }    if (setup == NULL) {        return CSL_ESYS_INVPARAMS;    }    if (setup->control != NULL) {        CSL_ataHwSetupControl(hAta, setup->control);    }    if (setup->characteristics != NULL) {        CSL_ataHwSetupCharacteristics(hAta, setup->characteristics);    }    if (setup->override != NULL) {        CSL_ataHwSetupOverride(hAta, setup->override);    }    if (setup->resetControl != NULL) {        CSL_ataHwSetupResetControl(hAta, setup->resetControl);    }    if (setup->dma != NULL) {        CSL_ataHwSetupDma(hAta, setup->dma);    }    if (setup->misc != NULL) {        CSL_ataHwSetupMisc(hAta, setup->misc);    }    return CSL_SOK;}

⌨️ 快捷键说明

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