不是,配置好时钟后,直接用for循环延时了,不是很准确,大概的范围
- //===================================================
- // wait(100) means delay 100ms
- //===================================================
- void wait(unsigned short n)
- {
- unsigned char i;
- while (n--)
- {
- for (i = 0; i < 150; i++)
- {
- __no_operation();
- __no_operation();
- }
- }
- }
|