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

📄 eds.lst

📁 此程序为twell8806驱动程序
💻 LST
📖 第 1 页 / 共 3 页
字号:
C51 COMPILER V7.50   EDS                                                                   08/20/2007 10:23:30 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE EDS
OBJECT MODULE PLACED IN eds.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE eds.c COMPACT OPTIMIZE(9,SIZE)

line level    source

   1          // EDS.c
   2          //========================================================================
   3          // EDS
   4          // ver1.07-1 10/3/2001 .Created for v-chip.
   5          //                                         .Using OSDWindow3.
   6          //
   7          //
   8          //      ljy01xx04       (with ...CC_ comment)
   9          //                              .Modify whole structure of CheckVchip() 
  10          //
  11          //========================================================================
  12          //      Possible EDS format
  13          //              Control_code    Type    (d1,d2)[,(d3,d4),,,,(d31, d32)]
  14          //              Control_code    checksum
  15          //------------------------------------------------------------------------
  16          
  17          #include "Config.h"
  18          #ifdef SUPPORT_CCD_VCHIP
              #include "typedefs.h"
              #include "main.h"
              #include "i2c.h"
              #include "tw88.h"
              #include "dispinfo.h"
              #include "osdbasic.h"
              #include "debug.h"
              #include "printf.h"
              #include "etc_eep.h"
              #include "cc.h"
              #include "audio.h"
              #include "osdmenu.h"
              #include "eds.h"
              
              #define  CURRENT_CLASS_START            0x01
              #define  CURRENT_CLASS_CONT_            0x02
              #define  PROGRAM_RATING                         0x05
              
              
              static  IDATA BYTE  EDS_control=0;
              static  IDATA BYTE  MovieRating=0, EDS_packet_len=0;
              static  IDATA BYTE  BlockedTV, BlockedMovie, CurrentMovieRating=0, CurrentTVRating=0;
                              bit   Block_On=0;
              extern  bit             DisplayInputHold;
              
              
              #define TV_Y7           2
              //for CurrentTVRating and DisplayBlockedRating_Content()
              // 0DVS Lrrr
              #define CONTENT_TV_D_MASK       0x40            
              #define CONTENT_TV_V_MASK       0x20
              #define CONTENT_TV_S_MASK       0x10
              #define CONTENT_TV_L_MASK       0x08
              #define TVRATING_MASK           0x07
              
              static  IDATA BYTE  BlockedTV_Content[7];
              
C51 COMPILER V7.50   EDS                                                                   08/20/2007 10:23:30 PAGE 2   

              CODE BYTE OSDBlockedMovieStr[][10]={    //LJY100401 v-chip
                      { "None     " },
                      { "MPAA G   " },
                      { "MPAA PG  " },
                      { "MPAA PG13" },
                      { "MPAA R   " },
                      { "MPAA NC17" },
                      { "MPAA X   " },
                      { "MPAA NR  " } //ljy020105...
              };
              
              
              CODE BYTE OSDBlockedTVStr[][7]={        //LJY100401 v-chip
                      { "None " },
                      { "TV-Y " },
                      { "TV-Y7" },
                      { "TV-G " },
                      { "TV-PG" },
                      { "TV-14" },
                      { "TV-MA" },
                      { "" }
              };
              CODE BYTE BlockedStr[]={ "Blocked:          "};
              CODE BYTE ContentFVStr[]={"FV"};
              CODE BYTE ContentVStr[]={"V"};
              CODE BYTE ContentSStr[]={"S"};
              CODE BYTE ContentLStr[]={"L"};
              CODE BYTE ContentDStr[]={"D"};
              
              void DisplayBlockedRating(CODE_P BYTE *str)
              {
                      extern CODE BYTE Init_Osd_DisplayVchipWindow[];
                      extern CODE BYTE Str_Vchip_E[];
                      BYTE length;
              
                      if( GetDisplayedOSD() & INPUTINFO )             ClearInput();
              
                      if( !(GetDisplayedOSD() & RATINGINFO)){
                              ClearClosedCaption();//Change_OSDColorLookup();
              
                              ClearDataCnt(RATINGINFO_ADDR, 18*2); 
                              InitOSDWindow(Init_Osd_DisplayVchipWindow);
              
                              DrawAttrCnt(RATINGINFO_ADDR, BACK_COLOR|CH_COLOR_WHITE, 18 );    
                              DrawAttrCnt(RATINGINFO_ADDR+18, BACK_COLOR|CH_COLOR_RED, 18 );
                              WriteStringToAddr(RATINGINFO_ADDR, Str_Vchip_E, 6);
              
                              SetDisplayedOSD ( RATINGINFO );
                              #ifdef DEBUG_CCEDS
                              Printf("\r\n SetDisplayedOSD : RATINGINFO ");
                              #endif
              
              
                      }
                      WriteStringToAddr(RATINGINFO_ADDR+18, BlockedStr, 18);
                      ShowOSDWindow(RATINGINFO_OSDWIN,TRUE);
                      ShowOSDWindowAll(1);
              
                      length=strlen(str);
                      WriteStringToAddr(RATINGINFO_ADDR+18+8, str, length);
                      #ifdef DEBUG_CCEDS
                      Printf("\r\n DisplayBlockedRating==> %s",str);
C51 COMPILER V7.50   EDS                                                                   08/20/2007 10:23:30 PAGE 3   

                      #endif
              }
              
              void CheckAndBlockInput(BYTE rating)
              {
                      BYTE redisp=0;
              
                      SetLastBlockedTime();
                      if( CurrentMovieRating != rating ) {
                                      CurrentMovieRating = rating;
                                      CurrentTVRating = 0;
                                      if( GetDisplayedOSD() & CC )            ClearClosedCaption();
                                      //ClearClosedCaption();
                                      PanelBlack(1);//ForceDecoderOutput(BLUE_DECODER);
                                      DisplayBlockedRating(OSDBlockedMovieStr[rating]);
                                      Block_On = 1;
              
                                      // Audio Mute
                                      AudioOff();
                                      //SetAudioMute(1);
              
                      }
              
              }
              
              void DisplayBlockedRating_Content(BYTE content)
              {
                      WORD pos;
                      BYTE length;
                      //content: 000FVSLD
                      if( !content )
                              return;
              
                      SetOSDWindowNum(RATINGINFO_OSDWIN);
                      pos = RATINGINFO_ADDR+18+8+6; 
                      pos++;
              
                      if( content & CONTENT_TV_V_MASK ) {     //V
                              if( (content & TVRATING_MASK) == TV_Y7 ) { //FV
                                      length = strlen(ContentFVStr);
                                      WriteStringToAddr(pos, ContentFVStr, length);
                      #ifdef DEBUG_CCEDS
                                      Printf("\r\n DisplayBlockedRating_Content==> %s",ContentFVStr);
                      #endif
                                      pos+=2;
                              }
                              else {                                                  //V
                                      length = strlen(ContentVStr);
                                      WriteStringToAddr(pos, ContentVStr,  length);
                      #ifdef DEBUG_CCEDS
                                      Printf("\r\n DisplayBlockedRating_Content==> %s",ContentVStr);
                      #endif
                                      pos++;
                              }
                      }
                      if( content & CONTENT_TV_S_MASK ) {     //S
                              WriteStringToAddr(pos, ContentSStr,  strlen(ContentSStr));
                      #ifdef DEBUG_CCEDS
                              Printf("\r\n DisplayBlockedRating_Content==> %s",ContentSStr);
                      #endif
                              pos++;
                      }
C51 COMPILER V7.50   EDS                                                                   08/20/2007 10:23:30 PAGE 4   

                      if( content & CONTENT_TV_L_MASK ) {     //L
                              WriteStringToAddr(pos, ContentLStr,  strlen(ContentLStr));
                      #ifdef DEBUG_CCEDS

⌨️ 快捷键说明

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