📄 csl_msaux.h
字号:
/* ============================================================================ * 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_msAux.h * * @brief API Auxilary header file for MEMORY STICK CSL. * * Path: \\(CSLPATH)\\ipmodules\\memstick\\src * *//* ============================================================================= * Revision History * ================ * 14-Dec-2004 kpn File Created from CSL_msHwControl.c & CSL_msGetHwStatus.c. * Added functions CSL_msGetByteSwapSel & CSL_msGetClkDivSel * for query commands CSL_MS_QUERY_BS & CSL_MS_QUERY_CD resp. * Added functions CSL_msByteSwapSet & CSL_msClkDivSet for * control commands CSL_MS_CMD_BS_SET & CSL_MS_CMD_CD_SET resp. * ============================================================================= */#ifndef _CSL_MSAUX_H_#define _CSL_MSAUX_H_#include <csl_ms.h>#ifdef __cplusplusextern "C" {#endif/* * Status Query Functions of ms. *//** ============================================================================ * @n@b CSL_msGetDrqStatus * * @b Description * @n This function gives the DRQ status. * * @b Arguments * @verbatim hMs Handle to MS instance response Placeholder to return status. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_msGetDrqStatus (hMs, response); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msGetDrqStatus ( CSL_MsHandle hMs, void *response){ *(Uint16*) response = CSL_FEXT (hMs->regs->MSSTAT, MS_MSSTAT_DRQ);}/** ============================================================================ * @n@b CSL_msGetMsintStatus * * @b Description * @n This function gives the interrupt status * * @b Arguments * @verbatim hMs Handle to MS instance response Placeholder to return status. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_msGetMsintStatus (hMs, response); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msGetMsintStatus ( CSL_MsHandle hMs, void *response){ *(Uint16*) response = CSL_FEXT (hMs->regs->MSSTAT, MS_MSSTAT_MSINT);}/** ============================================================================ * @n@b CSL_msGetRdy * * @b Description * @n This function gives the ready status * * @b Arguments * @verbatim hMs Handle to MS instance response Placeholder to return status. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_msGetRdy (hMs, response); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msGetRdy ( CSL_MsHandle hMs, void *response){ *(Uint16*) response = CSL_FEXT (hMs->regs->MSSTAT, MS_MSSTAT_RDY);}/** ============================================================================ * @n@b CSL_msGetCrcStatus * * @b Description * @n This function gives the CRC status * * @b Arguments * @verbatim hMs Handle to MS instance response Placeholder to return status. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_msGetCrcStatus (hMs, response); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msGetCrcStatus ( CSL_MsHandle hMs, void *response){ *(Uint16*) response = CSL_FEXT (hMs->regs->MSSTAT, MS_MSSTAT_CRC);}/** ============================================================================ * @n@b CSL_msGetToeStatus * * @b Description * @n This function gives the timeout error status * * @b Arguments * @verbatim hMs Handle to MS instance response Placeholder to return status. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_msGetToeStatus (hMs, response); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msGetToeStatus ( CSL_MsHandle hMs, void *response){ *(Uint16*) response = CSL_FEXT (hMs->regs->MSSTAT, MS_MSSTAT_TOE);}/** ============================================================================ * @n@b CSL_msGetFifoEmpty * * @b Description * @n This function gives the FIFO empty status * * @b Arguments * @verbatim hMs Handle to MS instance response Placeholder to return status. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_msGetFifoEmpty (hMs, response); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msGetFifoEmpty ( CSL_MsHandle hMs, void *response){ *(Uint16*) response = CSL_FEXT (hMs->regs->MSSTAT, MS_MSSTAT_EMP);}/** ============================================================================ * @n@b CSL_msGetFifoFull * * @b Description * @n This function gives the FIFO full status * * @b Arguments * @verbatim hMs Handle to MS instance response Placeholder to return status. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_msGetFifoFull (hMs, response); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msGetFifoFull ( CSL_MsHandle hMs, void *response){ *(Uint16*) response = CSL_FEXT (hMs->regs->MSSTAT, MS_MSSTAT_FUL);}/** ============================================================================ * @n@b CSL_msGetCedStatus * * @b Description * @n This function gives the Command End status * * @b Arguments * @verbatim hMs Handle to MS instance response Placeholder to return status. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_msGetCedStatus (hMs, response); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msGetCedStatus ( CSL_MsHandle hMs, void *response){ *(Uint16*) response = CSL_FEXT (hMs->regs->MSSTAT, MS_MSSTAT_CED);}/** ============================================================================ * @n@b CSL_msGetErrStatus * * @b Description * @n This function gives the MS Error status * * @b Arguments * @verbatim hMs Handle to MS instance response Placeholder to return status. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_msGetErrStatus (hMs, response); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msGetErrStatus ( CSL_MsHandle hMs, void *response){ *(Uint16*) response = CSL_FEXT (hMs->regs->MSSTAT, MS_MSSTAT_ERR);}/** ============================================================================ * @n@b CSL_msGetBrqStatus * * @b Description * @n This function gives the BRQ status * * @b Arguments * @verbatim hMs Handle to MS instance response Placeholder to return status. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_msGetBrqStatus (hMs, response); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msGetBrqStatus ( CSL_MsHandle hMs, void *response){ *(Uint16*) response = CSL_FEXT (hMs->regs->MSSTAT, MS_MSSTAT_BRQ);}/** ============================================================================ * @n@b CSL_msGetAckStatus * * @b Description * @n This function gives the ACK status * * @b Arguments * @verbatim hMs Handle to MS instance response Placeholder to return status. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_msGetAckStatus (hMs, response); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msGetAckStatus ( CSL_MsHandle hMs, void *response){ *(Uint16*) response = CSL_FEXT (hMs->regs->MSSTAT, MS_MSSTAT_CNK);}/** ============================================================================ * @n@b CSL_msGetDsl * * @b Description * @n This function gives the Data Select status * * @b Arguments * @verbatim hMs Handle to MS instance response Placeholder to return status. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_msGetDsl (hMs, response); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msGetDsl ( CSL_MsHandle hMs, void *response){ *(Uint16*) response = CSL_FEXT (hMs->regs->MSCMD, MS_MSCMD_DSL);}/** ============================================================================ * @n@b CSL_msGetDsize * * @b Description * @n This function gives the transfer data size * * @b Arguments * @verbatim hMs Handle to MS instance response Placeholder to return status. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_msGetDsize (hMs, response); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msGetDsize ( CSL_MsHandle hMs, void *response){ *(Uint16*) response = CSL_FEXT (hMs->regs->MSCMD, MS_MSCMD_DSZ);}/** ============================================================================ * @n@b CSL_msGetByteSwapSel * * @b Description * @n This function gives the Byte Swap Selection Value * * @b Arguments * @verbatim hMs Handle to MS instance @endverbatim * * <b> Return Value </b> * @n CSL_MsByteSwapSel - Byte Swap Selection Value * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -