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

📄 rs232topcapp.lst

📁 dvr
💻 LST
📖 第 1 页 / 共 2 页
字号:
C51 COMPILER V7.50   RS232TOPCAPP                                                          12/14/2005 10:05:37 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE RS232TOPCAPP
OBJECT MODULE PLACED IN .\OBJ\RS232toPCapp.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE RS232toPCapp.c LARGE OPTIMIZE(9,SIZE) BROWSE PRINT(.\LST\RS232toPCapp.lst) 
                    -OBJECT(.\OBJ\RS232toPCapp.obj)

line level    source

   1          /********************************************************************
   2                  
   3                  Copyright (C) 2003 UBiSYS Technology Limited.
   4                  All rights reserved.    
   5                  
   6              author    : dahlsse
   7              created   : 2004-03-01
   8              filename  : UBi9021Test.c
   9              tab size  : 4
  10              purpose   : UBi9021 File System Test Routine
  11              target mcu:
  12              notes     : test each items by enabling : "#if 0" ---> "#if 1"
  13                  history   :     
  14                  
  15          *********************************************************************/
  16          #include "types.h"
  17          
  18          #ifdef RS232_TO_PC_TRANSFER
              
              #include "8052reg.h"
              //#include      "UBiCMN.h"
              #include        "RS232toPCapp.h"
              //#include      "DevIO.h"
              //#include      "UsbMass.h"
              //#include      "SCSI.h"
              //#include      "Fat.h"
              //#include      "File.h"
              #include "gosd.h"
              #include "ghdd.h"
              #include <stdio.h>
              #include "lib.h"
              #ifdef LANIF
              #include "socket.h"
              #endif
              
              #include "sio.h"
              #include "gio.h"
              #include "key.h"
              
              u16 GetFrameCount(u8 *buf, u16 size);
              //static U8 volatile res = 0;
              
              //=====================================================================
              //extern xdata u8 gv_usb_in_use;
                    u8*  pBUF;//pointer to gBUF
              xdata u8   gBUF[512];
              xdata u8   backup_frames = 2;
              //=====================================================================
              
              
              //====================================================================
              //
              //====================================================================
              u16 GetFrameCount(u8 *buf, u16 size)
C51 COMPILER V7.50   RS232TOPCAPP                                                          12/14/2005 10:05:37 PAGE 2   

              {
                      u16 i;
                      u16 cnt = 0;
              
                      for(i=0;i<(size-4);i++)
                      {
                              if(buf[i]==0x00)
                                      if(buf[i+1]==0x00)
                                              if(buf[i+2]==0x01)
                                                      if(buf[i+3]==0xF8)
                                                              cnt++;
                      }
                      return cnt;
              }
              
              //====================================================================
              //
              //====================================================================
              extern u8       key_check(void);
              void RS232_move_frames(u8 hddIndex, u32 LBA, u16 frames)
              {
                      u32 cur_lba;
                      u32 start_lba;
                      u8 MM,DD,HH,MI,SS;
                      u16 YY;
                      u16 frame_cnt;
                      u16 ch_num;
                      u16 tot_frame_cnt;
                      u8 ch;
                      u8 str[12];
                      u16 i;
                      u8 audio_flag;
                      u8 strbuf[40];
                      u8 *blank_ln = "                              ";
                      u8 pgs,j;
                      //u8 mnb=1;
                      u16 k;
              //      u8 key;
                      
                      str[4] = '/';
              
                      
                      pBUF = (u8*)gBUF;
                      
                      // read current frame and get the time information
                      // and channel information
                      center_line(3, "COPY FRAMES TO BUFFER", 21);
                      center_line(7, "DETECTING FRAMES", 16);
                      mem_cpy(strbuf, "              ", 14);
                      cur_lba = LBA;
                      pgs = 0;
                      while(1) // check audio packet and skip backward
                      {
                              HDD_ReadSector(hddIndex, cur_lba*8, pBUF);
                              if((pBUF[0]&0x80)==0x00) // is it video packet?
                                      break;
                              if(cur_lba==0) break;
                              cur_lba--;
              #ifdef DEBUG_USB
                              printf("\n\r[%08lx] next..", cur_lba*8);
              #endif
                              //u32toa(cur_lba*8, &strbuf[5]);
C51 COMPILER V7.50   RS232TOPCAPP                                                          12/14/2005 10:05:37 PAGE 3   

                              for(j=0;j<14;j++) strbuf[j] = (pgs>=j)?'.':' ';
                              if(pgs>=13) pgs = 0;
                              else pgs++;
                              center_line(10,strbuf,14);
                      }
                      YY = (u8)pBUF[0];
                      MM = pBUF[1];
                      DD = pBUF[2];
                      HH = pBUF[3];
                      MI = pBUF[4];
                      SS = pBUF[5];
                      ch = pBUF[7];
                      YY += 2000;
                      YY -= 1980;
                      if(ch&0x10) // quad mode
                              ch_num = 1;
                      else
                      {
                              ch_num = 0;
                              if(ch&0x08) ch_num++;
                              if(ch&0x04) ch_num++;
                              if(ch&0x02) ch_num++;
                              if(ch&0x01) ch_num++;
                      }
                      tot_frame_cnt = (ch_num * frames);
                      //tot_frame_cnt = 1;

⌨️ 快捷键说明

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