⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 display.c

📁 该模板使用于周立功公司研发的EasyARM2100系列开发板
💻 C
📖 第 1 页 / 共 5 页
字号:
            if(out_config==0)
            {
             show_picture(ldm_100,                  0,30,56,16); 
             show_picture(fengchong_nondu,          16,0,64,16);
             show_picture_n(munilian_peizhi,        32,0,64,16);
             show_picture(touguoli_peizhi,          48,0,64,16);    
            } 
                   
                    
             if((IO0PIN & ENTER)==0)            
              {
                 delay(200);
                 if((IO0PIN & ENTER)==0)
                 {
                  while((IO0PIN & ENTER)==0); 
                   Bclear_LCD_screen=1;
                   out_config=1;  
                   configure=0;
                   delay(2000);
                 }
               } 
               
            else if( (IO0PIN & CANCEL ) == 0)        
             {
              delay(200);
              if((IO0PIN & CANCEL)==0)
                {
                 while((IO0PIN & CANCEL)==0);
                 current_screen=DEFAULT_SCREEN;    
                 Bclear_LCD_screen=1;
                 show_ID=0; configure=0; write_flag=0;
                 out_config=0;chanel_select=0;
                }
             }
             if(out_config==1)
             {
                 if((Bclear_LCD_screen)&&(configure==0))
                        {
                        Bclear_LCD_screen=0;
                        clr_LCD_screen();
                       
                        show_picture(ldm_100,            0,30,56,16);//LDM-100 
                        show_picture(tongdao1,          16,0,64,16);
                        show_picture(tongdao2,        32,0,64,16);
                        show_picture(baocheng,         48,32,64,16);
                        show_picture_n(xiao_guan_du,      16,70,48,16);
                        show_picture(touguo_li,          32,70,48,16);  
                        }
                 //------------------
                   if(((IO0PIN & DOWN)==0)&&(chanel_select==0))                
                    {
                    delay(200);
                     if((IO0PIN & DOWN)==0)
                      {
                      while((IO0PIN & DOWN)==0); 
                        config_id++;
                      if (config_id>2)   
                      config_id=0;
                    }
                 }       
                  else if(((IO0PIN & UP)==0)&&(chanel_select==0))                
                  {
                  delay(200);
                  if((IO0PIN & UP)==0)
                   {
                    while((IO0PIN & UP)==0); 
                    config_id--;
                     if (config_id>2)
                     config_id=2;     
                    }
                  }
                 //------------------
                switch(config_id)
                {
                case 0:     //-------配置1通道-------------
                      {
                      if(chanel_select==0)
                       {
                       show_picture(ldm_100,            0,30,56,16);//LDM-100 
                       show_picture_n(tongdao1,          16,0,64,16);
                       show_picture(tongdao2,        32,0,64,16);
                       show_picture(baocheng,         48,32,64,16);
                    
                       show_picture(xiao_guan_du,      16,70,48,16);
                       show_picture(touguo_li,          32,70,48,16); 
                       }
                            //对通道1进行配置-----
                        if((IO0PIN & ENTER)==0)
                            {
                             delay(200);
                             if((IO0PIN & ENTER)==0)
                               {
                                while((IO0PIN & ENTER)==0); 
                                Bclear_LCD_screen=1;
                                configure=1;
                                chanel_select=1;  
                                }
                             } 
               
                         else if( (IO0PIN & CANCEL ) == 0)        
                               {
                               delay(200);
                               if((IO0PIN & CANCEL)==0)
                                 {
                                  while((IO0PIN & CANCEL)==0);
                                  current_screen=DEFAULT_SCREEN;    
                                  Bclear_LCD_screen=1;
                                  show_ID=0;write_flag=0;
                                  configure=0;chanel_select=0;
                                  out_config=0;
                                  } 
                                }
                       if((chanel_select==1)&&(configure==1))
                        { 
                         if(Bclear_LCD_screen)
                           {
                           Bclear_LCD_screen=0;
                           clr_LCD_screen();
                           
                            show_picture(ldm_100,            0,30,56,16);//LDM-100 
                            show_picture(tongdao1,          16,0,64,16);
                            show_picture(tongdao2,        32,0,64,16);
                            show_picture(baocheng,         48,32, 64,16);
                            
                            show_picture_n(xiao_guan_du,      16,70,48,16);
                            show_picture(touguo_li,          32,70,48,16); 
                         }
                          if((IO0PIN & DOWN)==0)                
                             {
                              delay(200);
                              if((IO0PIN & DOWN)==0)
                                {
                                 while((IO0PIN & DOWN)==0); 
                                 config_id1++;
                                 if (config_id1>2)   
                                  config_id1=0;
                                  write_flag=1;
                                }
                              }       
                          else if((IO0PIN & UP)==0)                
                             {
                              delay(200);
                             if((IO0PIN & UP)==0)
                               {
                                while((IO0PIN & UP)==0); 
                                config_id1--;
                                if (config_id1>2)
                                config_id1=2; 
                                write_flag=1;    
                               }
                             }
                             //----------1通道输出选配-----------
                             switch(config_id1)
                                {
                               case 0:
                                     {
                                       
                                       show_picture(ldm_100,            0,30,56,16); 
                                       show_picture(tongdao1,          16,0,64,16);
                                       show_picture(tongdao2,        32,0,64,16);
                                       show_picture(baocheng,         48,32, 64,16);
                                       
                                       show_picture_n(xiao_guan_du,      16,70,48,16);
                                       show_picture(touguo_li,          32,70,48,16); 
                                      }break;
                                case 1:
                                     {
                                        
                                       show_picture(ldm_100,            0,30,56,16); 
                                       show_picture(tongdao1,          16,0,64,16);
                                       show_picture(tongdao2,        32,0,64,16);
                                       show_picture(baocheng,         48,32, 64,16);
                                       
                                       show_picture_n(touguo_li,      16,70,48,16);
                                       show_picture(xiao_guan_du,          32,70,48,16); 
                                      }break;
                                case 2:
                                     { 
                                      
                                       show_picture(ldm_100,            0,30,56,16);
                                       show_picture(tongdao1,          16,0,64,16);
                                       show_picture(tongdao2,        32,0,64,16);
                                       show_picture(baocheng,         48,32, 64,16);
                                       
                                       show_picture_n(fencheng_nondu,      16,70,48,16);
                                       show_picture(touguo_li,          32,70,48,16); 
                                     
                                     }break;
                                default:
                                      break;    
                                   }
                                 if( write_flag==1)
                                        {
                                         write_flag=0;
                                         UART0_SendByte(0x0f);
                                         UART0_SendByte(config_id1);
                                        }
                             //----------------------------------
                          }
                       
                  }break;
                case 1:    //--------配置2通道------------
                      {
                       if(chanel_select==0)
                        {
	                     show_picture(ldm_100,            0,30,56,16);
                         show_picture(tongdao1,         16,0,64,16);
                         show_picture_n(tongdao2,           32,0,64,16);
                         show_picture(baocheng,         48,32, 64,16);
                         
                         show_picture(xiao_guan_du,       16,70,48,16);
                         show_picture(touguo_li,          32,70,48,16);
                         }
                                    //对通道2进行配置-----
                        if((IO0PIN & ENTER)==0)              
                            {
                             delay(200);
                             if((IO0PIN & ENTER)==0)
                               {
                                while((IO0PIN & ENTER)==0); 
                                Bclear_LCD_screen=1;
                                configure=1;
                                chanel_select=1;  
                                }
                             } 
               
                         else if( (IO0PIN & CANCEL ) == 0)        
                               {
                               delay(200);
                               if((IO0PIN & CANCEL)==0)
                                 {
                                  while((IO0PIN & CANCEL)==0);
                                  current_screen=DEFAULT_SCREEN;    
                                  Bclear_LCD_screen=1;
                                  show_ID=0;write_flag=0;
                                  configure=0;chanel_select=0;
                                  out_config=0;
                                  } 
                                }
                       if((chanel_select==1)&&(configure==1))
                        {   if(Bclear_LCD_screen)
                            {
                            Bclear_LCD_screen=0;
                             clr_LCD_screen();
                             
                             show_picture(ldm_100,            0,30,56,16); 
                             show_picture(tongdao1,          16,0,64,16);
                             show_picture(tongdao2,        32,0,64,16);
                             show_picture(baocheng,         48,32, 64,16);
                             
                             show_picture(xiao_guan_du,      16,70,48,16);
                             show_picture_n(touguo_li,          32,70,48,16); 
                             }
                          if((IO0PIN & DOWN)==0)                
                             {
                              delay(200);
                              if((IO0PIN & DOWN)==0)
                                {
                                 while((IO0PIN & DOWN)==0); 
                                 config_id1++;
                                 if (config_id1>2)   
                                  config_id1=0;
                                  write_flag=1;
                                }
                              }       
                          else if((IO0PIN & UP)==0)                
                             {
                              delay(200);
                             if((IO0PIN & UP)==0)
                               {
                                while((IO0PIN & UP)==0); 
                                config_id1--;
                                if (config_id1>2)
                                config_id1=2;
                                write_flag=1;     
                               }
                             }
                           //----------2通道输出选配-----------
                             switch(config_id1)
                                {
                               case 0:
                                     {
                                       show_picture(ldm_100,            0,30,56,16); 
                                       show_picture(tongdao1,          16,0,64,16);
                                       show_picture(tongdao2,        32,0,64,16);
                                       show_picture(baocheng,         48,32, 64,16);
                                       
                                       show_picture(touguo_li,      16,70,48,16);
                                       show_picture_n(xiao_guan_du, 32,70,48,16); 
                                      }break;
                                case 1:
                                     {
                                       show_picture(ldm_100,            0,30,56,16);
                                       show_picture(tongdao1,          16,0,64,16);
                                       show_picture(tongdao2,        32,0,64,16);
                                       show_picture(baocheng,         48,32, 64,16);
                                       
                                       show_picture(touguo_li,      16,70,48,16);
                                       show_picture_n(touguo_li,          32,70,48,16); 
                                      }break;
                                case 2:
                                     { 
                                       show_picture(ldm_100,            0,30,56,16); 
                                       show_picture(tongdao1,          16,0,64,16);
                                       show_picture(tongdao2,        32,0,64,16);
                                       show_picture(baocheng,         48,32, 64,16);
                                       
                                       show_picture(touguo_li,      16,70,48,16);
                                       show_picture_n(fencheng_nondu,          32,70,48,16); 
                                     
                                     }break;
                                default:
                                      break;       
                                     
                                }
                                
                      

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -