📄 csl_i2caux.h
字号:
CSL_I2cHandle hI2c){ CSL_FINS(hI2c->regs->ICMDR,I2C_ICMDR_STT, TRUE);}/** ============================================================================ * @n@b CSL_i2cStop * * @b Description * @n This function writes the stop command to the I2C module. * * @b Arguments * @verbatim hI2c Pointer to the object that holds reference to the instance of I2C requested after the call @endverbatim * * <b> Return Value </b> None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_i2cStop (hI2c); @endverbatim * ============================================================================ */CSL_IDEF_INLINEvoid CSL_i2cStop ( CSL_I2cHandle hI2c){ CSL_FINS(hI2c->regs->ICMDR,I2C_ICMDR_STP, TRUE);}/** ============================================================================ * @n@b CSL_i2cDirTransmit * * @b Description * @n This function sets the direction of data as transmit of the I2C module. * * @b Arguments * @verbatim hI2c Pointer to the object that holds reference to the instance of I2C requested after the call @endverbatim * * <b> Return Value </b> None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_i2cDirTransmit (hI2c); @endverbatim * ============================================================================ */CSL_IDEF_INLINEvoid CSL_i2cDirTransmit ( CSL_I2cHandle hI2c){ CSL_FINS(hI2c->regs->ICMDR,I2C_ICMDR_TRX, TRUE);}/** ============================================================================ * @n@b CSL_i2cDirReceive * * @b Description * @n This function sets the direction of data as receive of the I2C module. * * @b Arguments * @verbatim hI2c Pointer to the object that holds reference to the instance of I2C requested after the call @endverbatim * * <b> Return Value </b> None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_i2cDirReceive (hI2c); @endverbatim * ============================================================================ */CSL_IDEF_INLINEvoid CSL_i2cDirReceive ( CSL_I2cHandle hI2c){ CSL_FINS(hI2c->regs->ICMDR,I2C_ICMDR_TRX, FALSE);}/** ============================================================================ * @n@b CSL_i2RmEnable * * @b Description * @n This function enables the repeat mode of the I2C module. * * @b Arguments * @verbatim hI2c Pointer to the object that holds reference to the instance of I2C requested after the call @endverbatim * * <b> Return Value </b> None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_i2RmEnable (hI2c); @endverbatim * ============================================================================ */CSL_IDEF_INLINEvoid CSL_i2cRmEnable ( CSL_I2cHandle hI2c){ CSL_FINS(hI2c->regs->ICMDR,I2C_ICMDR_RM, TRUE);}/** ============================================================================ * @n@b CSL_i2cRmDisable * * @b Description * @n This function disables the repeat mode of the I2C module. * * @b Arguments * @verbatim hI2c Pointer to the object that holds reference to the instance of I2C requested after the call @endverbatim * * <b> Return Value </b> None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_i2cRmDisable (hI2c); @endverbatim * ============================================================================ */CSL_IDEF_INLINEvoid CSL_i2cRmDisable ( CSL_I2cHandle hI2c){ CSL_FINS(hI2c->regs->ICMDR,I2C_ICMDR_RM, FALSE);}/** ============================================================================ * @n@b CSL_i2cDlbEnable * * @b Description * @n This function enables the data loop back of the I2C module. * * @b Arguments * @verbatim hI2c Pointer to the object that holds reference to the instance of I2C requested after the call @endverbatim * * <b> Return Value </b> None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_i2cDlbEnable (hI2c); @endverbatim * ============================================================================ */CSL_IDEF_INLINEvoid CSL_i2cDlbEnable ( CSL_I2cHandle hI2c){ CSL_FINS(hI2c->regs->ICMDR,I2C_ICMDR_DLB, TRUE);}/** ============================================================================ * @n@b CSL_i2cDlbDisable * * @b Description * @n This function disables the data loop back of I2C module. * * @b Arguments * @verbatim hI2c Pointer to the object that holds reference to the instance of I2C requested after the call @endverbatim * * <b> Return Value </b> None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_i2cDlbDisable (hI2c); @endverbatim * ============================================================================ */CSL_IDEF_INLINEvoid CSL_i2cDlbDisable ( CSL_I2cHandle hI2c){ CSL_FINS(hI2c->regs->ICMDR,I2C_ICMDR_DLB, FALSE);}/** * Status Functions of i2c. *//** ============================================================================ * @n@b CSL_i2cGetClockSetup * * @b Description * @n This function gets the clock setup of the I2C module. * * @b Arguments * @verbatim hI2c Pointer to the object that holds reference to the instance of I2C requested after the call response Placeholder to return status. @endverbatim * * <b> Return Value </b> None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_i2cGetClockSetup (hI2c, &response); @endverbatim * ============================================================================ */CSL_IDEF_INLINEvoid CSL_i2cGetClockSetup ( CSL_I2cHandle hI2c, void *response){ ((CSL_I2cClkSetup *)response)->prescalar = CSL_FEXT(hI2c->regs->ICPSC,I2C_ICPSC_IPSC); ((CSL_I2cClkSetup *)response)->clklowdiv = CSL_FEXT(hI2c->regs->ICCLKL,I2C_ICCLKL_ICCL); ((CSL_I2cClkSetup *)response)->clkhighdiv = CSL_FEXT(hI2c->regs->ICCLKH,I2C_ICCLKH_ICCH);}/** ============================================================================ * @n@b CSL_i2cGetBusBusy * * @b Description * @n This function gets the bus busy status of I2C module. * * @b Arguments * @verbatim hI2c Pointer to the object that holds reference to the instance of I2C requested after the call response Placeholder to return status. @endverbatim * * <b> Return Value </b> None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_i2cGetBusBusy (hI2c, &response); @endverbatim * ============================================================================ */CSL_IDEF_INLINEvoid CSL_i2cGetBusBusy ( CSL_I2cHandle hI2c, void *response){ *(Uint16 *)response = CSL_FEXT(hI2c->regs->ICSTR,I2C_ICSTR_BB);}/** ============================================================================ * @n@b CSL_i2cGetRxRdy * * @b Description * @n This function gets the receive ready status of the I2C module. * * @b Arguments * @verbatim hI2c Pointer to the object that holds reference to the instance of I2C requested after the call response Placeholder to return status. @endverbatim * * <b> Return Value </b> None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_i2cGetRxRdy (hI2c, &response); @endverbatim * ============================================================================ */CSL_IDEF_INLINEvoid CSL_i2cGetRxRdy ( CSL_I2cHandle hI2c, void *response){ *(Uint16 *)response = CSL_FEXT(hI2c->regs->ICSTR,I2C_ICSTR_ICRRDY);}/** ============================================================================ * @n@b CSL_i2cGetTxRdy * * @b Description * @n This function gets the transmit ready status of the I2C module. * * @b Arguments * @verbatim hI2c Pointer to the object that holds reference to the instance of I2C requested after the call response Placeholder to return status. @endverbatim * * <b> Return Value </b> None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_i2cGetTxRdy (hI2c, &response); @endverbatim * ============================================================================ */CSL_IDEF_INLINEvoid CSL_i2cGetTxRdy ( CSL_I2cHandle hI2c, void *response){ *(Uint16 *)response = CSL_FEXT(hI2c->regs->ICSTR,I2C_ICSTR_ICXRDY);}/** ============================================================================ * @n@b CSL_i2cGetAcsRdy * * @b Description * @n This function gets the ACS ready status of the I2C module. * * @b Arguments * @verbatim hI2c Pointer to the object that holds reference to the instance of I2C requested after the call response Placeholder to return status. @endverbatim * * <b> Return Value </b> None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_i2cGetAcsRdy (hI2c, &response); @endverbatim * ============================================================================ */CSL_IDEF_INLINEvoid CSL_i2cGetAcsRdy ( CSL_I2cHandle hI2c, void *response){ *(Uint16 *)response = CSL_FEXT(hI2c->regs->ICSTR,I2C_ICSTR_ARDY);}/** ============================================================================ * @n@b CSL_i2cGetScd * * @b Description * @n This function gets the SCD status of the I2C module. * * @b Arguments * @verbatim hI2c Pointer to the object that holds reference to the instance of I2C requested after the call response Placeholder to return status. @endverbatim * * <b> Return Value </b> None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_i2cGetScd (hI2c, &response); @endverbatim * ============================================================================ */CSL_IDEF_INLINEvoid CSL_i2cGetScd ( CSL_I2cHandle hI2c, void *response){ *(Uint16 *)response = CSL_FEXT(hI2c->regs->ICSTR,I2C_ICSTR_SCD);}/** ============================================================================ * @n@b CSL_i2cGetAd0 * * @b Description * @n This function gets the AD0 status of the I2C module. * * @b Arguments
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -