<p>cCopy code</p><p>#include <reg52.h></p><p>#define LED P0_0</p><p>
</p><p>void main()</p><p>{</p><p> LED = 0;</p><p> while (1)</p><p> {</p><p> LED = 1;</p><p> delay(1000);</p><p> LED = 0;</p><p> delay(1000);</p><p> }</p><p>}</p><p>
</p><p>void delay(unsigned int i)</p><p>{</p><p> unsigned int j, k;</p><p> for (j = i; j > 0; j--)</p><p> {</p><p> for (k = 125; k > 0; k--);</p><p> }</p><p>}</p>
STM32经典点灯
@21小跑堂 :有一小段没写上来,重新添加上来了。请复审,谢谢~
原创字数不足哦