stm32的微秒延時(shí)程序
延時(shí)函數(shù)為:
本文引用地址:http://www.2s4d.com/article/201611/316910.htm #definedelayUs(x){ unsigned int _dcnt;
_dcnt=(x*16);
while(_dcnt-- > 0)
{ continue; }
}
x---------為延時(shí)時(shí)間(單位為us)
其中_dcnt=(x*16); 中的16,是可以改的,改為8的時(shí)候延時(shí)間時(shí)間為x*0.5。
評(píng)論