📄 csl_msaux.h
字号:
* @n None * * @b Example * @verbatim CSL_msGetByteSwapSel (hMs); @endverbatim * ============================================================================= */CSL_IDEF_INLINECSL_MsByteSwapSel CSL_msGetByteSwapSel ( CSL_MsHandle hMs){ CSL_MsByteSwapSel response; response = (CSL_MsByteSwapSel) CSL_FEXT (hMs->regs->MSMCR, MS_MSMCR_BS); return response;}/** ============================================================================ * @n@b CSL_msGetClkDivSel * * @b Description * @n This function gives the Clock Divider Ratio * * @b Arguments * @verbatim hMs Handle to MS instance @endverbatim * * <b> Return Value </b> * @n CSL_MsClkDivRatio - Clock Divider Ratio * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_msGetClkDivSel (hMs); @endverbatim * ============================================================================= */CSL_IDEF_INLINECSL_MsClkDivRatio CSL_msGetClkDivSel ( CSL_MsHandle hMs){ CSL_MsClkDivRatio response; response = (CSL_MsClkDivRatio) CSL_FEXT (hMs->regs->MSMCR, MS_MSMCR_CD); return response;}/* * Control Functions of ms. *//** ============================================================================ * @n@b CSL_msTpcSet * * @b Description * @n This function sets the TPC. * * @b Arguments * @verbatim hMs Handle to MS instance arg this is the veriable of type Uint16. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n The Transfer Protocol Code is set * * @b Modifies * @n MSCMD register * * @b Example * @verbatim CSL_MsHandle hMs; Uint16 arg; ... CSL_msTpcSet (hMs, arg); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msTpcSet ( CSL_MsHandle hMs, Uint16 arg){ CSL_FINS (hMs->regs->MSCMD, MS_MSCMD_TPC, arg);}/** ============================================================================ * @n@b CSL_msDslFifo * * @b Description * @n This function designates the data to be communicated with the Memory Stick. Data is transmitted to and received using the internal FIFO. * * @b Arguments * @verbatim hMs Handle to MS instance @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n Internal FIFO designated to be used for data transfer * * @b Modifies * @n MSCMD register * * @b Example * @verbatim CSL_msDslFifo (hMs); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msDslFifo ( CSL_MsHandle hMs){ CSL_FINS (hMs->regs->MSCMD, MS_MSCMD_DSL, FALSE);}/** ============================================================================ * @n@b CSL_msDslExtmem * * @b Description * @n This function designates the data to be communicated with the Memory Stick. Data is transmitted to and received from the Memory Stick using an external memory. * * @b Arguments * @verbatim hMs Handle to MS instance @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n External memory designated to be used for data transfer * * @b Modifies * @n MSCMD register * * @b Example * @verbatim CSL_msDslExtmem (hMs); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msDslExtmem ( CSL_MsHandle hMs){ CSL_FINS (hMs->regs->MSCMD, MS_MSCMD_DSL, TRUE);}/** ============================================================================ * @n@b CSL_msReset * * @b Description * @n This function performs sync reset. * * @b Arguments * @verbatim hMs Handle to MS instance @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n Sync Reset is performed * * @b Modifies * @n MSSYST register * * @b Example * @verbatim CSL_msReset (hMs); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msReset ( CSL_MsHandle hMs){ CSL_FINS (hMs->regs->MSSYST, MS_MSSYST_RST, (Uint32)TRUE);}/** ============================================================================ * @n@b CSL_msSetDataSize * * @b Description * @n This function sets the transfer data size. * * @b Arguments * @verbatim hMs Handle to MS instance arg this is the variable of type Uint16. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n The transfer data size is set * * @b Modifies * @n MSCMD register * * @b Example * @verbatim CSL_msSetDataSize(hMs, arg); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msSetDataSize ( CSL_MsHandle hMs, Uint16 arg){ CSL_FINS (hMs->regs->MSCMD, MS_MSCMD_DSZ, arg);}/** ============================================================================ * @n@b CSL_msWriteFifo * * @b Description * @n This function writes data into internal FIFO. * * @b Arguments * @verbatim hMs Handle to MS instance arg this is the variable of type Uint16. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n Data is written into internal FIFO * * @b Modifies * @n MSDAT * * @b Example * @verbatim CSL_msWriteFifo(hMs, arg); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msWriteFifo( CSL_MsHandle hMs, Uint32 arg){ hMs->regs->MSDAT = arg;}/** ============================================================================ * @n@b CSL_msReadFifo * * @b Description * @n This function reads data from internal FIFO. * * @b Arguments * @verbatim hMs Handle to MS instance arg this is the variable of type void *. @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n Data is read from internal FIFO * * @b Modifies * @n None * * @b Example * @verbatim CSL_msReadFifo(hMs, &arg); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msReadFifo ( CSL_MsHandle hMs, void *arg){ *(Uint32*) arg = hMs->regs->MSDAT;}/** ============================================================================ * @n@b CSL_msIntEnable * * @b Description * @n This function enables interrupts of the MS module. * * @b Arguments * @verbatim hMs Handle to MS instance @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n Interrupts of MS are enabled * * @b Modifies * @n MSSYST register * * @b Example * @verbatim CSL_msIntEnable (hMs); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msIntEnable ( CSL_MsHandle hMs){ CSL_FINS (hMs->regs->MSSYST, MS_MSSYST_INTEN, 1); CSL_FINS (hMs->regs->MSSYST, MS_MSSYST_DRQSL, 1); CSL_FINS (hMs->regs->MSSYST, MS_MSSYST_MSIEN, 1);}/** ============================================================================ * @n@b CSL_msIntDisable * * @b Description * @n This function disables interrupts of the MS module. * * @b Arguments * @verbatim hMs Handle to MS instance @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n Interrupts of MS are disabled * * @b Modifies * @n MSSYST register * * @b Example * @verbatim CSL_msIntDisable (hMs); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msIntDisable ( CSL_MsHandle hMs){ CSL_FINS (hMs->regs->MSSYST, MS_MSSYST_INTEN, FALSE); CSL_FINS (hMs->regs->MSSYST, MS_MSSYST_DRQSL, FALSE); CSL_FINS (hMs->regs->MSSYST, MS_MSSYST_MSIEN, FALSE);}/** ============================================================================ * @n@b CSL_msDmaEnable * * @b Description * @n This function enables DMA access. * * @b Arguments * @verbatim hMs Handle to MS instance @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n DMA Access is enabled * * @b Modifies * @n MSSYST register * * @b Example * @verbatim CSL_msDmaEnable (hMs); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msDmaEnable ( CSL_MsHandle hMs){ CSL_FINS (hMs->regs->MSSYST, MS_MSSYST_DAM, TRUE);}/** ============================================================================ * @n@b CSL_msDmaDisable * * @b Description * @n This function disables DMA Access. * * @b Arguments * @verbatim hMs Handle to MS instance @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n DMA Access is disabled * * @b Modifies * @n MSSYST register * * @b Example * @verbatim CSL_msDmaDisable (hMs); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msDmaDisable ( CSL_MsHandle hMs){ CSL_FINS (hMs->regs->MSSYST, MS_MSSYST_DAM, FALSE);}/** ============================================================================ * @n@b CSL_msSetByteSwap * * @b Description * @n This function sets byte swapping. * * @b Arguments * @verbatim hMs Handle to MS instance arg Byte Swap Selection value @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n Byte Swap Selection value is set. * * @b Modifies * @n MSMCR register * * @b Example * @verbatim CSL_MsHandle hMs; CSL_MsByteSwapSel arg; ... CSL_msSetByteSwap (hMs, arg); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msSetByteSwap ( CSL_MsHandle hMs, CSL_MsByteSwapSel arg){ CSL_FINS (hMs->regs->MSMCR, MS_MSMCR_BS, arg);}/** ============================================================================ * @n@b CSL_msSetClkDiv * * @b Description * @n This function sets the Clock divider ratio. * * @b Arguments * @verbatim hMs Handle to MS instance arg Clock divider ratio @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n Clock divider ratio value is set. * * @b Modifies * @n MSMCR register * * @b Example * @verbatim CSL_MsHandle hMs; CSL_MsClkDivRatio arg; ... CSL_msSetClkDiv (hMs, arg); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_msSetClkDiv ( CSL_MsHandle hMs, CSL_MsClkDivRatio arg){ CSL_FINS (hMs->regs->MSMCR, MS_MSMCR_CD, arg);}#ifdef __cplusplus}#endif#endif /* CSL_MSAUX_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -