初级会员
- 积分
- 105
- 金钱
- 105
- 注册时间
- 2013-4-3
- 在线时间
- 2 小时
|
<div>while(1)</div>
<div><span class="Apple-tab-span" style="white-space:pre;"> </span>{<span class="Apple-tab-span" style="white-space:pre;"> </span> <span class="Apple-tab-span" style="white-space:pre;"> </span> <span class="Apple-tab-span" style="white-space:pre;"> </span> <span class="Apple-tab-span" style="white-space:pre;"> </span> </div>
<div><span class="Apple-tab-span" style="white-space:pre;"> </span>if(NRF24L01_RxPacket(tmp_buf)==0)//一旦接收到信息,则显示出来。0:接收完成</div>
<div><span class="Apple-tab-span" style="white-space:pre;"> </span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre;"> </span>tmp_buf[32]=0;//加入字符串结束符</div>
<div><span class="Apple-tab-span" style="white-space:pre;"> </span>LCD_ShowString(0,190,239,32,16,tmp_buf); </div>
<div><span class="Apple-tab-span" style="white-space:pre;"> </span>}else delay_us(100);<span class="Apple-tab-span" style="white-space:pre;"> </span> </div>
<div><span class="Apple-tab-span" style="white-space:pre;"> </span>t++;</div>
<div><span class="Apple-tab-span" style="white-space:pre;"> </span>if(t==10000)//大约1s钟改变一次状态</div>
<div><span class="Apple-tab-span" style="white-space:pre;"> </span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre;"> </span>t=0;</div>
<div><span class="Apple-tab-span" style="white-space:pre;"> </span>LED0=!LED0;</div>
<div><span class="Apple-tab-span" style="white-space:pre;"> </span>} <span class="Apple-tab-span" style="white-space:pre;"> </span> </div>
<div><span class="Apple-tab-span" style="white-space:pre;"> </span>};<span class="Apple-tab-span" style="white-space:pre;"> <br />
这是</span>原子哥的程序,是主函数中的一段,我想请教一下:程序是怎么退出这个while循环的?</div> |
|