金砂紫钰 发表于 2013-1-11 16:39:01

按键标志位返回值问题

部分程序,



   else if(!key_four_six)
    {
   delay(500);
      if(!key_four_six)
      {
          if(!key_flag)
          {
                key_flag=1;
             if(b)
               {
               b=0;
               flag_4_6=0;
               }
             else
               {
               b=1;
               flag_4_6 =1;
               }
          }    ///                      这位按建标志位   



void engine_6_timer1() interrupt 1
{
TH0=(65536-25)/256;
TL0=(65536-25)%256;//25us
timer_first_count++;
    if(LedFlash>=80)
{
    LedFlash=0;

    smg_show();
}
LedFlash+
switch(flag_4_6)    ///////这里能接受到,标志位的值吗{
    case 0:
    {
    if(timer_count==1)   //开始触发70V 时间为,0US
    {
              spray_1_12V = 0;
      spray_1_70V = 1;      //700
    }
        else if(timer_count==32)
页: [1]
查看完整版本: 按键标志位返回值问题