📄 csl_atagethwstatus.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_ataGetHwStatus.c * * @brief File for functional layer of CSL API @a CSL_ataGetHwStatus() * * Description * - The @a CSL_ataGetHwStatus() 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 * =============== * 07-Nov-2004 kpn Added code in accordance with new specification * 08-Oct-2004 kpn Added code for checking for invalid parameter * 24-Sep-2004 kpn Updated according to CSL Upgradation guidelines * ============================================================================ */#include <csl_ata.h>#include <csl_ataAux.h>/** ============================================================================ * @n@b CSL_ataGetHwStatus * * @b Description * @n Gets the status of the different operations of ATA. * * @b Arguments * @verbatim hAta Handle to the ATA instance query The query to this API of ATA 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_AtaHandle hAta; CSL_AtaHwStatusQuery query; void reponse; status = CSL_ataGetHwStatus (hAta, query, &response); @endverbatim * ============================================================================ */#pragma CODE_SECTION (CSL_ataGetHwStatus, ".text:csl_section:ata");CSL_Status CSL_ataGetHwStatus ( CSL_AtaHandle hAta, CSL_AtaHwStatusQuery query, void *response){ CSL_Status status = CSL_SOK; if (response == NULL) { return CSL_ESYS_INVPARAMS; } if (hAta == NULL) { return CSL_ESYS_BADHANDLE; } switch (query) { case CSL_ATA_QUERY_IORDYTIMEOUT: *(Uint16 *) response = CSL_ataGetIORDYTimeoutStatus (hAta); break; case CSL_ATA_QUERY_INTSTATUS: *(Uint16 *) response = CSL_ataGetIDEInterruptStatus (hAta); break; case CSL_ATA_QUERY_DMAERROR: *(Uint16 *) response = CSL_ataGetDMAErrorStatus (hAta); break; case CSL_ATA_QUERY_IDEACTIVE: *(Uint16 *) response = CSL_ataGetIDEActiveStatus (hAta); break; case CSL_ATA_QUERY_RXCOUNT: *(Uint32 *) response = CSL_ataGetRxCount (hAta); break; case CSL_ATA_QUERY_TXCOUNT: *(Uint32 *) response = CSL_ataGetTxCount (hAta); break; case CSL_ATA_QUERY_DMARQ: *(Uint16 *) response = CSL_ataGetDMARQStatus (hAta); break; case CSL_ATA_QUERY_INTRQ: *(Uint16 *) response = CSL_ataGetINTRQStatus (hAta); break; case CSL_ATA_QUERY_DMACKN: *(Uint16 *) response = CSL_ataGetDMACKNStatus (hAta); break; case CSL_ATA_QUERY_TLEC: *(Uint16 *) response = CSL_ataGetTLECounter (hAta); break; case CSL_ATA_QUERY_MISR: *(CSL_AtaIodftMisr *) response = CSL_ataGetMISRResult (hAta); break; default: status = CSL_ESYS_INVQUERY; break; } return status;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -