This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] MSP430FR2355:MSP430FR2xx_4xx DriverLib 文件中存在模糊性

Guru**** 2382250 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/784292/msp430fr2355-ambiguity-in-the-msp430fr2xx_4xx-driverlib-file

器件型号:MSP430FR2355

这2个相互矛盾的函数具有相同的详细说明
EUSCI B I2C enableMultiMasterMode()   和  EUSCI B I2C DisableMultiMasterMode()

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 VIBHU:

    这两个函数的描述之间存在差异。 请仔细检查说明。

    如果您告诉您这样一句话:"在这个函数的末尾、I2C 模块仍然被禁用、直到调用 EUSCI_B_I2C_ENABLE 为止"、我想说对于这两个函数的这句话应该没有误解。

    查看这两个函数、在 修改 UCMM 位之前、每个函数都会置位 UCSWRST 位。 但用户应调用 EUSCI_B_I2C_ENABLE()来清除 UCSWRST 位以启用 I2C 模块。

    void eUSCI_B_I2C_enableMultiMasterMode (uint16_t baseAddress)
    {
    HWREG16 (baseAddress + OFS_UCBxCTLW0)|= UCSWRST;
    HWREG16 (baseAddress + OFS_UCBxCTLW0)|= UCMM;
    }
    
    void EUSCI_B_I2C_DisableMultiMasterMode (uint16_t baseAddress)
    {
    
    HWREG16 (baseAddress + OFS_UCBxCTLW0)|= UCSWRST;
    HWREG16 (baseAddress + OFS_UCBxCTLW0)&&~UCMM;
    }