📄 csl_hdq1waux.h
字号:
hHdq1w Handle to the HDQ1W instance
@endverbatim
*
* <b>Return Value </b> data
* @li data - received data
*
* <b>Pre Condition </b>
* @n Both CSL_hdq1wInit() and CSL_hdq1wOpen() must be called successfully in
* that order before calling this function.
*
* <b>Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
Uint8 data;
data = CSL_hdq1wGetGobitStatus (hHdq1w);
@endverbatim
* =============================================================================
*/
static inline
Uint8 CSL_hdq1wGetRxData (
CSL_Hdq1wHandle hHdq1w
)
{
Uint8 data;
data = (Uint8)hHdq1w->regs->HDQ1W_RX;
return data;
}
/**
* =============================================================================
* @n@b CSL_hdq1wDisablePwrDwnMode
*
* @b Description
* @n This function disables the power down mode by enabling the clock to
* HDQ1W.
*
* @b Arguments
@verbatim
hHdq1w Handle to the HDQ1W instance
@endverbatim
*
* <b>Return Value </b>
* @n None
*
* <b>Pre Condition </b>
* @n Both CSL_hdq1wInit() and CSL_hdq1wOpen() must be called successfully in
* that order before calling this function.
*
* <b>Post Condition </b>
* @n The clock is enabled.
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_hdq1wDisablePwrDwnMode (hHdq1w);
@endverbatim
* =============================================================================
*/
static inline
void CSL_hdq1wDisablePwrDwnMode (
CSL_Hdq1wHandle hHdq1w
)
{
CSL_FINST (hHdq1w->regs->HDQ1W_CTRL, HDQ1W_HDQ1W_CTRL_PDM, DIS);
}
/**
* =============================================================================
* @n@b CSL_hdq1wEnablePwrDwnMode
*
* @b Description
* @n This function enables the power down mode by disabling the clock to
* HDQ1W.
*
* @b Arguments
@verbatim
hHdq1w Handle to the HDQ1W instance
@endverbatim
*
* <b>Return Value </b>
* @n None
*
* <b>Pre Condition </b>
* @n Both CSL_hdq1wInit() and CSL_hdq1wOpen() must be called successfully in
* that order before calling this function.
*
* <b>Post Condition </b>
* @n The clock is disabled.
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_hdq1wEnablePwrDwnMode (hHdq1w);
@endverbatim
* =============================================================================
*/
static inline
void CSL_hdq1wEnablePwrDwnMode (
CSL_Hdq1wHandle hHdq1w
)
{
CSL_FINST (hHdq1w->regs->HDQ1W_CTRL, HDQ1W_HDQ1W_CTRL_PDM, EN);
}
/**
* =============================================================================
* @n@b CSL_hdq1wSetGobit
*
* @b Description
* @n This function sends the appropriate commands.
*
* @b Arguments
@verbatim
hHdq1w Handle to the HDQ1W instance
@endverbatim
*
* <b>Return Value </b>
* @n None
*
* <b>Pre Condition </b>
* @n Both CSL_hdq1wInit() and CSL_hdq1wOpen() must be called successfully in
* that order before calling this function.
*
* <b>Post Condition </b>
* @n Appropriate command is sent.
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_hdq1wSetGobit (hHdq1w);
@endverbatim
* =============================================================================
*/
static inline
void CSL_hdq1wSetGobit (
CSL_Hdq1wHandle hHdq1w
)
{
CSL_FINST (hHdq1w->regs->HDQ1W_CTRL, HDQ1W_HDQ1W_CTRL_GB, GO);
}
/**
* =============================================================================
* @n@b CSL_hdq1wSendInitPulse
*
* @b Description
* @n This function configures the HDQ1W module to send the initialization
* pulse to detect the slave.
*
* @b Arguments
@verbatim
hHdq1w Handle to the HDQ1W instance
@endverbatim
*
* <b>Return Value </b>
* @n None
*
* <b>Pre Condition </b>
* @n Both CSL_hdq1wInit() and CSL_hdq1wOpen() must be called successfully in
* that order before calling this function.
*
* <b>Post Condition </b>
* @n HDQ1W module is configured to send the initialization pulse.
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_hdq1wSendInitPulse (hHdq1w);
@endverbatim
* =============================================================================
*/
static inline
void CSL_hdq1wSendInitPulse (
CSL_Hdq1wHandle hHdq1w
)
{
CSL_FINST (hHdq1w->regs->HDQ1W_CTRL, HDQ1W_HDQ1W_CTRL_IP, INITPULSE);
}
/**
* =============================================================================
* @n@b CSL_hdq1wWriteMode
*
* @b Description
* @n This function sets the next command as a write command.
*
* @b Arguments
@verbatim
hHdq1w Handle to the HDQ1W instance
@endverbatim
*
* <b>Return Value </b>
* @n None
*
* <b>Pre Condition </b>
* @n Both CSL_hdq1wInit() and CSL_hdq1wOpen() must be called successfully in
* that order before calling this function.
*
* <b>Post Condition </b>
* @n The next command set is a write command.
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_hdq1wWriteMode (hHdq1w);
@endverbatim
* =============================================================================
*/
static inline
void CSL_hdq1wWriteMode (
CSL_Hdq1wHandle hHdq1w
)
{
CSL_FINST (hHdq1w->regs->HDQ1W_CTRL, HDQ1W_HDQ1W_CTRL_RWB, WR);
}
/**
* =============================================================================
* @n@b CSL_hdq1wReadMode
*
* @b Description
* @n This function sets the next command as a read command.
*
* @b Arguments
@verbatim
hHdq1w Handle to the HDQ1W instance
@endverbatim
*
* <b>Return Value </b>
* @n None
*
* <b>Pre Condition </b>
* @n Both CSL_hdq1wInit() and CSL_hdq1wOpen() must be called successfully in
* that order before calling this function.
*
* <b>Post Condition </b>
* @n The next command set is a read command.
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_hdq1wReadMode (hHdq1w);
@endverbatim
* =============================================================================
*/
static inline
void CSL_hdq1wReadMode (
CSL_Hdq1wHandle hHdq1w
)
{
CSL_FINST (hHdq1w->regs->HDQ1W_CTRL, HDQ1W_HDQ1W_CTRL_RWB, RD);
}
/**
* =============================================================================
* @n@b CSL_hdq1wPutTxData
*
* @b Description
* @n This function writes the data to be transmitted to the transmit
* register.
*
* @b Arguments
@verbatim
hHdq1w Handle to the HDQ1W instance
txData Pointer to the data to be transmitted
@endverbatim
*
* <b>Return Value </b>
* @n None
*
* <b>Pre Condition </b>
* @n Both CSL_hdq1wInit() and CSL_hdq1wOpen() must be called successfully in
* that order before calling this function.
*
* <b>Post Condition </b>
* @n Data is written to the transmit register.
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
Uint8 data;
...
CSL_hdq1wPutTxData (hHdq1w, &data);
@endverbatim
* =============================================================================
*/
static inline
void CSL_hdq1wPutTxData (
CSL_Hdq1wHandle hHdq1w,
Uint8 *txData
)
{
hHdq1w->regs->HDQ1W_TX = *(Uint32 *)txData;
}
#ifdef _cplusplus
}
#endif
#endif /* _CSL_HDQ1WAUX_H_*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -