软件超时机制
1、背景
2、方案一
3、方案二
4、对比总结
STM32程序超时设计
/* Wait till HSE is ready and if Time out is reached exit */
do
{
HSEStatus = RCC->CR & RCC_CR_HSERDY;
StartUpCounter++;
} while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT));
while ((!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED))&&i){i–;};
原创文章,作者:guozi,如若转载,请注明出处:https://www.sudun.com/ask/80729.html