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

📄 disp.lst

📁 本人at89c51snd1c主控IC增加了128*32点阵驱动显示
💻 LST
📖 第 1 页 / 共 4 页
字号:
                    break;
                }
              #else
 869   1             SetLCDAddress( 80, 1); /* init volume icon */
 870   1             PutCodeToLCD( &RepIcon8x16[rep_type][0], 16 );
 871   1        if (rep_type);
 872   1      #endif
 873   1      }
 874          
 875          
 876          /*F*****************************************************************************
 877          * NAME: print_file_name
 878          *-------------------------------------------------------------------------------
 879          * PARAMS:
 880          *
 881          * return:
 882          *----------------------------------------------------------------------------
 883          * PURPOSE:
 884          *   Print to lcd the current file name
 885          *----------------------------------------------------------------------------
 886          * EXAMPLE:
 887          *----------------------------------------------------------------------------
 888          * NOTE:
 889          *----------------------------------------------------------------------------
 890          * REQUIREMENTS:
 891          *****************************************************************************/
 892          void print_file_name()
 893          {
 894   1      #if CONF_DISPLAY == LCD
                switch(File_type())                       /* print file type icon */
                {
                  case FILE_DIR:
                    lcd_cgram(CGRAM_TYPE, cgram_dir);     /* select directory icon */
                    break;
              
                  case FILE_MP3:
                    lcd_cgram(CGRAM_TYPE, cgram_mp3);     /* select song icon */
                    break;
              
                  case FILE_WAV:
                    lcd_cgram(CGRAM_TYPE, cgram_wav);     /* select voice icon */
                    break;
              
                  default:
                    lcd_cgram(CGRAM_TYPE, cgram_blank);   /* select voice icon */
                    break;
                }
              #endif
 914   1          SetLCDAddress( 120, 1);
 915   1          PutCodeToLCD( &wav[File_type()], 4); 
 916   1        disp_name_start();                        /* start name display */  
 917   1      }
 918          
 919          
 920          /*F*****************************************************************************
 921          * NAME: print_file_type
 922          *-------------------------------------------------------------------------------
C51 COMPILER V7.20   DISP                                                                  03/24/2007 10:02:40 PAGE 16  

 923          * PARAMS:
 924          *
 925          * return:
 926          *----------------------------------------------------------------------------
 927          * PURPOSE:
 928          *   Print to lcd the current file type
 929          *----------------------------------------------------------------------------
 930          * EXAMPLE:
 931          *----------------------------------------------------------------------------
 932          * NOTE:
 933          *----------------------------------------------------------------------------
 934          * REQUIREMENTS:
 935          *****************************************************************************/
 936          void print_file_type()
 937          {
 938   1      //#if CONF_DISPLAY == LCD
 939   1        switch(File_type())                       /* print file type icon */
 940   1        {
 941   2          case FILE_DIR:
 942   2             SetLCDAddress( 2 ,2 );
 943   2             PutCodeToLCD( &cgram_dir[0], 8);
 944   2            //lcd_cgram(CGRAM_TYPE, cgram_dir);     /* select directory icon */
 945   2            break;
 946   2      
 947   2          case FILE_MP3:
 948   2             SetLCDAddress( 2 ,2 );
 949   2             PutCodeToLCD( &cgram_mp3[0], 8);
 950   2           // lcd_cgram(CGRAM_TYPE, cgram_mp3);     /* select song icon */
 951   2            break;
 952   2      
 953   2          case FILE_WAV:
 954   2             SetLCDAddress( 2 ,2 );
 955   2             PutCodeToLCD( &cgram_wav[0], 8);
 956   2            //lcd_cgram(CGRAM_TYPE, cgram_wav);     /* select voice icon */
 957   2            break;
 958   2      
 959   2          default:
 960   2             SetLCDAddress( 2 , 2 );
 961   2             PutCodeToLCD( &cgram_blank[0], 8);
 962   2            //lcd_cgram(CGRAM_TYPE, cgram_blank);   /* select voice icon */
 963   2            break;
 964   2        }
 965   1      //#endif
 966   1      }
 967          
 968          
 969          /*F*****************************************************************************
 970          * NAME: print_name
 971          *-------------------------------------------------------------------------------
 972          * PARAMS:
 973          *   string: pointer on char string
 974          * return:
 975          *   TRUE:  at the end of the string
 976          *   FALSE: in the middle of the string
 977          *----------------------------------------------------------------------------
 978          * PURPOSE:
 979          *   Print 14 characters of the file name
 980          *----------------------------------------------------------------------------
 981          * EXAMPLE:
 982          *----------------------------------------------------------------------------
 983          * NOTE:
 984          *----------------------------------------------------------------------------
C51 COMPILER V7.20   DISP                                                                  03/24/2007 10:02:40 PAGE 17  

 985          * REQUIREMENTS:
 986          *****************************************************************************/
 987          bit print_name (char pdata *string)
 988          {
 989   1      #if CONF_DISPLAY == LCD
                lcd_set_cur(POS_FILE);
                lcd_putchar(*string++);
                lcd_putchar(*string++);
                lcd_putchar(*string++);
                lcd_putchar(*string++);
                lcd_putchar(*string++);
                lcd_putchar(*string++);
                lcd_putchar(*string++);
                lcd_putchar(*string++);
                lcd_putchar(*string++);
                lcd_putchar(*string++);
                lcd_putchar(*string++);
                lcd_putchar(*string++);
                lcd_putchar(*string++);
                lcd_putchar(*string++);
                return (*string == '\0');
              #else
1007   1        if (string);
1008   1        return 1;
1009   1      #endif
1010   1      
1011   1      }
1012          
1013          
1014          /*F**************************************************************************
1015          * NAME: print_screen
1016          *----------------------------------------------------------------------------
1017          * PARAMS:
1018          *   screen: string in code space to print on LCD
1019          * return:
1020          *----------------------------------------------------------------------------
1021          * PURPOSE:
1022          *   Print a screen string on LCD
1023          *----------------------------------------------------------------------------
1024          * EXAMPLE:
1025          *----------------------------------------------------------------------------
1026          * NOTE:
1027          *----------------------------------------------------------------------------
1028          * REQUIREMENTS:
1029          *****************************************************************************/
1030          void print_screen (char code *screen)
1031          {
1032   1      #if CONF_DISPLAY == LCD
                lcd_set_cur(POS_HOME);
                while (*screen != '\0')
                {
                  lcd_putchar(*screen++);
                }
              #else
1039   1        if (screen);
1040   1      #endif
1041   1      }
1042          
1043          
1044          /*F**************************************************************************
1045          * NAME: print_string
1046          *----------------------------------------------------------------------------
C51 COMPILER V7.20   DISP                                                                  03/24/2007 10:02:40 PAGE 18  

1047          * PARAMS:
1048          *   string: string in code space to print on LCD
1049          * return:
1050          *----------------------------------------------------------------------------
1051          * PURPOSE:
1052          *   Print a string on LCD
1053          *----------------------------------------------------------------------------
1054          * EXAMPLE:
1055          *----------------------------------------------------------------------------
1056          * NOTE:
1057          *----------------------------------------------------------------------------
1058          * REQUIREMENTS:
1059          *****************************************************************************/
1060          void print_string (char code *string)
1061          {
1062   1      #if CONF_DISPLAY == LCD
                while (*string != '\0')
                {
                  lcd_putchar(*string++);
                }
              #else
1068   1        if (string);
1069   1      #endif
1070   1      }
1071          
1072          
1073          #if CONF_DISPLAY == LED
1074          /*F**************************************************************************
1075          * NAME: print_fatal_screen
1076          *----------------------------------------------------------------------------
1077          * PARAMS:
1078          *   screen: string in code space to print on LCD
1079          * return:
1080          *----------------------------------------------------------------------------
1081          * PURPOSE:
1082          *   Print a screen string on LCD
1083          *----------------------------------------------------------------------------
1084          * EXAMPLE:
1085          *----------------------------------------------------------------------------
1086          * NOTE:
1087          *----------------------------------------------------------------------------
1088          * REQUIREMENTS:
1089          *****************************************************************************/
1090          void print_fatal_screen (void)
1091          {
1092   1        LED_TREEB = LED_BASS=LED_MED = 0;
1093   1        LED_VOL = 1;
1094   1      }
1095          #endif
1096          
1097          /*F****************************************************************************
1098          * NAME: print_decim
1099          *------------------------------------------------------------------------------
1100          * PARAMS:
1101          *   b:     number to print
1102          *   space: TRUE: print ' 0', FALSE: print '00'
1103          * return:
1104          *------------------------------------------------------------------------------
1105          * PURPOSE:
1106          *   Print a 2 digits number on LCD '00-99' or ' 0-99'
1107          *----------------------------------------------------------------------------
1108          * EXAMPLE:
C51 COMPILER V7.20   DISP                                                                  03/24/2007 10:02:40 PAGE 19  

1109          *----------------------------------------------------------------------------
1110          * NOTE:
1111          *----------------------------------------------------------------------------
1112          * REQUIREMENTS:
1113          *****************************************************************************/
1114          void print_decim (Byte b, bit space)
1115          {
1116   1      #if CONF_DISPLAY == LCD
                if (b < 10)
                {
                  if (space)
                    lcd_putchar(' ');
                  else
                    lcd_putchar('0');
                  lcd_putchar(b +'0');
                }
                else
                {
                  lcd_putchar(b / 10 +'0');
                  lcd_putchar(b % 10 +'0');
                }
              #else
1131   1        if (b && space);
1132   1      #endif
1133   1      }
1134          
1135          
1136          
1137          
1138          void lcd_cgram( Uchar Page, Uchar Column, Uchar Index )
1139          {
1140   1          SetLCDAddress( Page , Column );
1141   1          PutCodeToLCD( &VolumeStep[Index], 8);
1142   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    942    ----
   CONSTANT SIZE    =    412    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----      17
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----       1
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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