p89lpc915程序

源代码在线查看: message.lst

软件大小: 129 K
上传用户: jipigu
关键词: p89 lpc 915 89
下载地址: 免注册下载 普通下载 VIP

相关代码

				C51 COMPILER V8.08   MESSAGE                                                               07/26/2007 15:52:31 PAGE 1   
				
				
				C51 COMPILER V8.08, COMPILATION OF MODULE MESSAGE
				OBJECT MODULE PLACED IN .\obj\MESSAGE.obj
				COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE SRC\MESSAGE.C BROWSE DEBUG OBJECTEXTEND PRINT(.\lst\MESSAGE.lst) OBJECT(.\o
				                    -bj\MESSAGE.obj)
				
				line level    source
				
				   1          
				   2          #ifdef PH_932
				              
				              #include "comm.h"
				              #include "uart.h"
				              #include "spi.h"
				              #include "message.h"
				              #include "key_process.h"
				              #include "stdio.h"
				              
				              code char productline[] = "PRIMARE";
				              code char model[] = "Cd 21";
				              code char version[] = "v2.01 May 25 2006";
				              //code char interface_version[] = "interface version";
				              bit dim_level = DIMER_ON;
				              #if 0
				              char *str_ptr;
				              void message(char *string)
				              {
				                      while(RI == 1);
				                      SBUF = STX;
				                      while(TI == 0);
				                      TI = 0;
				                      str_ptr = string;
				                      while((*str_ptr)||(str_ptr == (&information[1])))
				                              {
				                              if(*(str_ptr) == DLE)   /*if DLE, I send it twice*/
				                                      {
				                                      while(RI == 1);
				                                      SBUF = *(str_ptr);
				                                      while(TI == 0);
				                                      TI = 0;
				                                      }
				                              while(RI == 1);
				                              SBUF = *(str_ptr);
				                              while(TI == 0);
				                              TI = 0;
				                              str_ptr++;
				                              }
				                      while(RI == 1);
				                      SBUF = DLE;
				                      while(TI == 0);
				                      TI = 0;
				                      while(RI == 1);
				                      SBUF = ETX;
				                      while(TI == 0);
				                      TI = 0;
				              }
				              #endif
				              void PutChar(char ch)
				              {
				                     SBUF = ch;
				                      while(TI == 0);
				                      TI = 0;
				C51 COMPILER V8.08   MESSAGE                                                               07/26/2007 15:52:31 PAGE 2   
				
				              }
				              
				              void send_end()
				              {
				                      PutChar(DLE);
				                      PutChar(ETX);
				              }
				              
				              void send_verbose(char mode)
				              {
				                      if(mode == VERBOSE_MODE)
				                              {
				                              PutChar(STX);
				                              PutChar(mode);
				                              PutChar(verbose_flag?1:0);
				                              send_end();
				              //              printf("%c%c%c%c%c",STX,mode,verbose_flag?1:0,DLE,ETX);
				                              }
				                      else
				                              {
				                              if(verbose_flag)
				                                      {
				                                      PutChar(STX);
				                                      PutChar(mode);
				              //                      printf("%c%c",STX,mode);
				                                      switch(mode)
				                                              {
				                                              case VERBOSE_POWER:     //1 0x01
				                                                      PutChar(power_flag?1:0);
				              //                                      printf("%c",power_flag?1:0);
				                                                      break;
				                                              case VERBOSE_DIMER:     //1 0x0A
				                                                      PutChar(dim_level?1:0);
				              //                                      printf("%c",dim_level?1:0);
				                                                      break;
				                                              case VERBOSE_REMOTE:    //1 0x0F
				                                                      PutChar(0);
				              //                                      printf("%c",0);
				                                                      break;
				                                              case VERBOSE_IR_INPUT:  //1 0x12
				                                                      PutChar(SEL_IR?1:0);
				              //                                      printf("%c",SEL_IR?1:0);
				                                                      break;
				                                              case VERBOSE_PRODUCTLINE:       //1 0x15
				                                                      printf("%s",productline);
				                                                      break;
				                                              case VERBOSE_MODEL:     //1 0x16
				                                                      printf("%s",model);
				                                                      break;
				                                              case VERBOSE_VERSION:   //1 0x17
				                                                      printf("%s",version);
				                                                      break;
				                                              case VERBOSE_INTERFACE: //1 0x18
				                                                      printf("%c",0x10);
				                                                      break;
				                                              }
				                                      send_end();
				              //                      printf("%c%c",DLE,ETX);
				                                      }
				                              }
				              }
				              
				C51 COMPILER V8.08   MESSAGE                                                               07/26/2007 15:52:31 PAGE 3   
				
				              void process_key_verbose(char key)
				              {
				                      switch(key)
				                              {
				                              case _DIMER_KEY:
				                                      send_verbose(VERBOSE_DIMER);
				                                      break;
				                              case _DIMER_KEY_0:
				                              case _DIMER_KEY_2:
				                                      send_verbose(VERBOSE_DIMER);
				                                      break;
				                              case _DIMER_KEY_1:
				                              case _DIMER_KEY_3:
				                                      send_verbose(VERBOSE_DIMER);
				                                      break;
				                              case _POWER_KEY:
				                              case IR_POWER_ON_KEY:
				                              case IR_POWER_OFF_KEY:
				                                      send_verbose(VERBOSE_POWER);
				                                      break;
				                              default:
				                                      send_verbose(VERBOSE_REMOTE);
				                                      break;
				                              }
				              }
				              #endif
				
				
				MODULE INFORMATION:   STATIC OVERLAYABLE
				   CODE SIZE        =   ----    ----
				   CONSTANT SIZE    =   ----    ----
				   XDATA SIZE       =   ----    ----
				   PDATA SIZE       =   ----    ----
				   DATA SIZE        =   ----    ----
				   IDATA SIZE       =   ----    ----
				   BIT SIZE         =   ----    ----
				END OF MODULE INFORMATION.
				
				
				C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)
							

相关资源