📄 csl_mcaspaux.h
字号:
break;
default:
st = CSL_ESYS_FAIL;
}
return st;
}
/** ===========================================================================
* @n@b CSL_mcaspGetXmtStat
*
* @b Description
* @n This function returns the value of XSTAT register.
*
* @b Arguments
* @verbatim
hMcasp Handle to the McASP instance
@endverbatim
*
* <b> Return Value </b> Uint32
* @li Value of XSTAT register.
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n Value of XSTAT register will be returned.
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
Uint32 xmtStat;
xmtStat = CSL_mcaspGetXmtStat (hMcasp);
@endverbatim
* ============================================================================
*/
static inline
Uint32 CSL_mcaspGetXmtStat (
CSL_McaspHandle hMcasp
)
{
return((Uint32) hMcasp->regs->XSTAT);
}
/** ===========================================================================
* @n@b CSL_mcaspGetRcvStat
*
* @b Description
* @n This function returns the value of RSTAT register.
*
* @b Arguments
* @verbatim
hMcasp Handle to the McASP instance
@endverbatim
*
* <b> Return Value </b> Uint32
* @li Value of RSTAT register.
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n Value of RSTAT register will be returned.
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
Uint32 rcvStat;
rcvStat = CSL_mcaspGetRcvStat (hMcasp);
@endverbatim
* ============================================================================
*/
static inline
Uint32 CSL_mcaspGetRcvStat (
CSL_McaspHandle hMcasp
)
{
return((Uint32) hMcasp->regs->RSTAT);
}
/** ===========================================================================
* @n@b CSL_mcaspGetSmFsXmt
*
* @b Description
* @n This function returns the XSMRST and XFRST field values of XGBLCTL
* register.
*
* @b Arguments
* @verbatim
hMcasp Handle to the McASP instance
@endverbatim
*
* <b> Return Value </b> Uint8
* @li 0x00 - Both transmit frame generator sync and transmit state
* machine are reset.
* @li 0x1 - Only transmit state machine is active.
* @li 0x10 - Only transmit frame sync generator is active.
* @li 0x11 - Both transmit frame generator sync and transmit state
* machine are active.
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n Value of XSMRST and XFRST fields of XGBLCTL register will be returned.
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
Uint16 smFsXmt;
smFsXmt = CSL_mcaspGetSmFsXmt (hMcasp);
@endverbatim
* ============================================================================
*/
static inline
Uint8 CSL_mcaspGetSmFsXmt (
CSL_McaspHandle hMcasp
)
{
Uint8 smFsXmt = 0;
smFsXmt = ((Uint8) CSL_FEXT (hMcasp->regs->XGBLCTL,
MCASP_XGBLCTL_XFRST));
smFsXmt <<= 4;
smFsXmt |= ((Uint8) CSL_FEXT (hMcasp->regs->XGBLCTL,
MCASP_XGBLCTL_XSMRST));
return smFsXmt;
}
/** ===========================================================================
* @n@b CSL_mcaspGetSmFsRcv
*
* @b Description
* @n This function returns the RSMRST and RFRST field values of RGBLCTL
* register.
*
* @b Arguments
* @verbatim
hMcasp Handle to the McASP instance
@endverbatim
*
* <b> Return Value </b> Uint8
* @li 0x00 - Both receive frame generator sync and receive state
* machine are reset.
* @li 0x1 - Only receive state machine is active.
* @li 0x10 - Only receive frame sync generator is active.
* @li 0x11 - Both receive frame generator sync and receive state
* machine are active.
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n Value of RSMRST and RFRST fields of RGBLCTL register will be returned.
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
Uint16 smFsRcv;
smFsRcv = CSL_mcaspGetSmFsRcv (hMcasp);
@endverbatim
* ============================================================================
*/
static inline
Uint8 CSL_mcaspGetSmFsRcv (
CSL_McaspHandle hMcasp
)
{
Uint8 smFsRcv = 0;
smFsRcv = ((Uint8) CSL_FEXT (hMcasp->regs->RGBLCTL,
MCASP_RGBLCTL_RFRST));
smFsRcv <<= 4;
smFsRcv |= ((Uint8) CSL_FEXT (hMcasp->regs->RGBLCTL,
MCASP_RGBLCTL_RSMRST));
return smFsRcv;
}
/** ===========================================================================
* @n@b CSL_mcaspGetDitMode
*
* @b Description
* @n This function returns the status of DITEN bit in DITCTL register.
* register.
*
* @b Arguments
* @verbatim
hMcasp Handle to the McASP instance
@endverbatim
*
* <b> Return Value </b> Bool
* @li TRUE DIT Mode is enabled
*
* @li FALSE DIT Mode is not enabled
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n Value of DITEN bit in DITCTL register will be returned.
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
Bool ditMode;
ditMode = CSL_mcaspGetDitMode (hMcasp);
@endverbatim
* ============================================================================
*/
static inline
Bool CSL_mcaspGetDitMode (
CSL_McaspHandle hMcasp
)
{
return((Bool) CSL_FEXT(hMcasp->regs->DITCTL, MCASP_DITCTL_DITEN));
}
/**
* Hardware Control Functions of McASP
*/
/** ===========================================================================
* @n@b CSL_mcaspSetXmtGbl
*
* @b Description
* @n This function configures the transmitter global control register
*
* @b Arguments
* @verbatim
hMcasp Handle to the McASP instance
xmtGbl Value to be loaded into the XGBLCTL register
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n XGBLCTL register will be loaded with the specified value
*
* @b Modifies
* @n XGBLCTL register
*
* @b Example
* @verbatim
Uint32 xmtGbl;
xmtGbl = 0x00000000;
CSL_mcaspSetXmtGbl (hMcasp, xmtGbl);
@endverbatim
* ============================================================================
*/
static inline
void CSL_mcaspSetXmtGbl (
CSL_McaspHandle hMcasp,
Uint32 xmtGbl
)
{
/* Configure XGBLCTL with the value passed */
hMcasp->regs->XGBLCTL = xmtGbl;
}
/** ===========================================================================
* @n@b CSL_mcaspSetRcvGbl
*
* @b Description
* @n This function configures the receiver global control register
*
* @b Arguments
* @verbatim
hMcasp Handle to the McASP instance
rcvGbl Value to be loaded into the RGBLCTL register
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n RGBLCTL register will be loaded with the specified value
*
* @b Modifies
* @n RGBLCTL register
*
* @b Example
* @verbatim
Uint32 rcvGbl;
rcvGbl = 0x00000000;
CSL_mcaspSetRcvGbl (hMcasp, rcvGbl);
@endverbatim
* ============================================================================
*/
static inline
void CSL_mcaspSetRcvGbl (
CSL_McaspHandle hMcasp,
Uint32 rcvGbl
)
{
/* Configure RGBLCTL with the value passed */
hMcasp->regs->RGBLCTL = rcvGbl;
}
/** ===========================================================================
* @n@b CSL_mcaspResetXmtFSRst
*
* @b Description
* @n This function resets the transmit frame sync generator reset enable bit
* of transmit global control register
*
* @b Arguments
* @verbatim
hMcasp Handle to the McASP instance
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n XGBLCTL register will be loaded with the specified value
*
* @b Modifies
* @n XGBLCTL register
*
* @b Example
* @verbatim
CSL_mcaspResetXmtFSRst (hMcasp);
@endverbatim
* ============================================================================
*/
static inline
void CSL_mcaspResetXmtFSRst (
CSL_McaspHandle hMcasp
)
{
CSL_FINST (hMcasp->regs->XGBLCTL, MCASP_XGBLCTL_XFRST, RESET);
}
/** ===========================================================================
* @n@b CSL_mcaspResetRcvFSRst
*
* @b Description
* @n This function resets the receive frame sync generator reset enable bit
* of receive global control register
*
* @b Arguments
* @verbatim
hMcasp Handle to the McASP instance
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n RGBLCTL register will be loaded with the specified value
*
* @b Modifies
* @n RGBLCTL register
*
* @b Example
* @verbatim
CSL_mcaspResetRcvFSRst (hMcasp);
@endverbatim
* ============================================================================
*/
static inline
void CSL_mcaspResetRcvFSRst (
CSL_McaspHandle hMcasp
)
{
CSL_FINST (hMcasp->regs->RGBLCTL, MCASP_RGBLCTL_RFRST, RESET);
}
/** ===========================================================================
* @n@b CSL_mcaspConfigAudioMute
*
* @b Description
* @n This function configures the AMUTE register with specified values
*
* @b Arguments
* @verbatim
hMcasp Handle to the McASP instance
audioMute Value to be loaded to the register
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n AMUTE register will be loaded with the specified value
*
* @b Modifies
* @n AMUTE register
*
* @b Example
* @verbatim
Uint32 audioMute;
audioMute = 0x00000010;
CSL_mcaspConfigAudioMute (hMcasp, audioMute);
@endverbatim
* ============================================================================
*/
static inline
void CSL_mcaspConfigAudioMute (
CSL_McaspHandle hMcasp,
Uint32 audioMute
)
{
/* Configure AMUTE register */
hMcasp->regs->AMUTE = (Uint16) audioMute;
}
/** ===========================================================================
* @n@b CSL_mcaspConfigLoopBack
*
* @b Description
* @n This function sets the digital loopback mode
*
* @b Arguments
* @verbatim
hMcasp Handle to the McASP instance
loopBack Value to be loaded into the bit filed
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n GBLCTL and DLBCTL register will be loaded with the specified value
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -