📄 csl_msgethwstatus.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_msGetHwStatus.c * * @brief File for functional layer of CSL API \a CSL_msGetHwStatus() * * Path: \\(CSLPATH)\\ipmodules\\memstick\\src * * Date 7th June, 2004 * Author Santosh Narayanan * *//* ============================================================================= * Revision History * ================ * 14-Dec-2004 kpn Updated the file according to CSL Upgradation guidelines. * Added query commands for Byte Swap & Clock divider Values * according to csl_ms.h * ============================================================================= */#include <csl_ms.h>#include <csl_msAux.h>/** ============================================================================ * @n@b CSL_msGetHwStatus * * @b Description * @n Gets the status of the different operations of MS * * @b Arguments * @verbatim hMs Handle to the MS instance query The query to this API of MS 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 * @li CSL_ESYS_INVQUERY - Invalid query command * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_MsHandle hMs; CSL_MsHwStatusQuery query; void reponse; ... status = CSL_msGetHwStatus (hMs, query, &response); @endverbatim * ============================================================================= */#pragma CODE_SECTION (CSL_msGetHwStatus, ".text:csl_section:ms");CSL_Status CSL_msGetHwStatus ( CSL_MsHandle hMs, CSL_MsHwStatusQuery query, void *response){ CSL_Status status = CSL_SOK; if (hMs == NULL) { return CSL_ESYS_BADHANDLE; } if (response == NULL) { return CSL_ESYS_INVPARAMS; } switch (query) { case CSL_MS_QUERY_DRQ_STATUS: /* Get the Data Request Interrupt Status flag */ CSL_msGetDrqStatus (hMs, response); break; case CSL_MS_QUERY_MSINT_STATUS: /* Get the MS interface interrupt status */ CSL_msGetMsintStatus (hMs, response); break; case CSL_MS_QUERY_RDY: /* Get the Command receive status information */ CSL_msGetRdy (hMs, response); break; case CSL_MS_QUERY_CRC_STATUS: /* Get the CRC status */ CSL_msGetCrcStatus (hMs, response); break; case CSL_MS_QUERY_TOE_STATUS: /* Get the Time-out error status */ CSL_msGetToeStatus (hMs, response); break; case CSL_MS_QUERY_FIFO_EMPTY: /* Get info regarding the FIFO empty state */ CSL_msGetFifoEmpty (hMs, response); break; case CSL_MS_QUERY_FIFO_FULL: /* Get info regarding the FIFO full state */ CSL_msGetFifoFull (hMs, response); break; case CSL_MS_QUERY_CED_STATUS: /* Get the Command end status */ CSL_msGetCedStatus (hMs, response); break; case CSL_MS_QUERY_ERR_STATUS: /* Get info regarding the error status */ CSL_msGetErrStatus (hMs, response); break; case CSL_MS_QUERY_BRQ_STATUS: /* Get info regarding the BRQ status */ CSL_msGetBrqStatus (hMs, response); break; case CSL_MS_QUERY_ACK_STATUS: /* Get info regarding the ACK status */ CSL_msGetAckStatus (hMs, response); break; case CSL_MS_QUERY_DSL: /* Get info regarding the other endpoint of data * transfer to/from MS */ CSL_msGetDsl (hMs, response); break; case CSL_MS_QUERY_DSIZE: /* Get the transmit/receive data length */ CSL_msGetDsize (hMs, response); break; case CSL_MS_QUERY_BS: /* Get the Byte Swap Selection value */ *(CSL_MsByteSwapSel*)response = CSL_msGetByteSwapSel (hMs); break; case CSL_MS_QUERY_CD: /* Get the Clock Divider Ratio */ *(CSL_MsClkDivRatio*)response = CSL_msGetClkDivSel (hMs); break; default: status = CSL_ESYS_INVQUERY; break; } return(status);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -