! Get stop condition status!! param base is the base address of the I2C instance used!! This function reads and returns the stop condition bit status!! return Returns b true if the STP bit has been se
//***************************************************** *********************** // //! 获取停止条件状态。 //! //! \param base是所使用的I2C实例的基地址。 //! //! 此函数读取并返回停止条件位状态。 //! //! \return 如果设备已设置STP位以在I2C模块的内部数据计数器达到0时生成停止条件,则返回\ b true。当STP位为零时返回\ b false。此位在生成停止条件后自动清除。 // //***************************************************************************** static inline bool I2C_getStopConditionStatus(uint32_t base) { // // 检查参数。 // ASSERT(I2C_isBaseValid(base));
//
// 检查停止条件位并适当返回。
//
return((HWREGH(base + I2C_O_MDR) & I2C_MDR_STP) != 0U);
}
原文地址: https://www.cveoy.top/t/topic/bnAk 著作权归作者所有。请勿转载和采集!