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

📄 rs232topcapp.lst

📁 dvr
💻 LST
📖 第 1 页 / 共 2 页
字号:
              #ifdef DEBUG_USB
                      printf("\n\rRS232_move_frames: ch_num=%d", (int) ch_num);
              //      mem_dump((u16)&pBUF[0], 512);
              #endif
              
                      // search to backward to find one frame
                      cur_lba = (LBA==0) ? LBA : LBA-1;
                      frame_cnt = 0;
                      while(1)
                      {
                              for(i=0;i<8;i++) // read 4KB
                              {
                                      HDD_ReadSector(hddIndex, (cur_lba*8)+i, pBUF);
                                      for(j=0;j<14;j++) strbuf[j] = (pgs>=j)?'.':' ';
                                      if(pgs>=13) pgs = 0;
                                      else pgs++;
                                      center_line(10,strbuf,14);
                                      if((i==0) && (pBUF[0]&0x80))
                                              break;
                                      if(i==0)        frame_cnt = frame_cnt + GetFrameCount(&pBUF[8], 504);
                                      else            frame_cnt = frame_cnt + GetFrameCount(&pBUF[0], 512);
              #ifdef DEBUG_USB
              //                      printf("\n\r[%08lx] frame_cnt=%d", cur_lba*8+i, (int)frame_cnt);
              #endif
                                      if(frame_cnt >= (tot_frame_cnt+1))      break;
                              }
                              if(frame_cnt >= (tot_frame_cnt+1))      break;
                              if(cur_lba==0) break;
                              cur_lba--;
                      }
                      start_lba = cur_lba;
                      center_line(7, blank_ln,30);
                      center_line(10,blank_ln,30);
              #ifdef DEBUG_USB
                      printf("\n\rRS232_move_frames: frame_cnt=%02x start_lba=%08lx", (u16) frame_cnt, start_lba*8);
              #endif
C51 COMPILER V7.50   RS232TOPCAPP                                                          12/14/2005 10:05:37 PAGE 4   

                      // start move frames
                      //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
              //      {
              
                              center_line(7,"MOVE FRAMES TO PC",17);
                              mem_cpy(strbuf, "FRAMES [000/000]", 16);
                              
              //              num00=0;
              //              secnum01=0;
              //              secnum02=0;
                                      frame_cnt = 0;
                                      cur_lba = start_lba;
                                      pgs = 0;
                                      while(1)
                                      {
                                              audio_flag = 0;
                                              for(i=0;i<8;i++) // read 4KB
                                              {
                                                      HDD_ReadSector(hddIndex, (cur_lba*8)+i, pBUF);
                                                      if((i==0) && (pBUF[0]&0x80))
                                                              audio_flag = 1;
                                                      if(audio_flag==0)
                                                      {
                                                              if(i==0)        frame_cnt = frame_cnt + GetFrameCount(&pBUF[8], 504);
                                                              else            frame_cnt = frame_cnt + GetFrameCount(&pBUF[0], 512);
                                                      }
                                                      
                                                      //osd_showhexword(secnum01,16,3,1);
                                                      //osd_showhexword(secnum02,16,2,1);
                                                      
                                                      for(k=0;k<512;k++)
                                                      {
                                                           sio_putchar(gBUF[k]);
                                                           while(TI);
                                                           
                                                           delay_time(10, 5);
                                                           
                                                           //osd_showhexword(k,8,2,1);//show hex
                                                           //if(num00 == 512)
                                                           //{
                                                           //    num00 = 0;
                                                           //    secnum01++;
                                                           //}
                                                           //osd_showhexword(num00,8,3,1);//show hex
                                                           //key = key_check();
                                                           //if(key==X_STOP)
                                                           //      goto END_MOVE_FRAMES;
                                                           //else if(key==X_PAUSE)
                                                           //   mnb=1;
                                                      }
                                                      //secnum02++;
                                                      //
                                                      //key = key_check();
                                                      //if(key==X_STOP)
                                                      //      goto END_MOVE_FRAMES;
                                                      //else if(key==X_PAUSE)
                                                      //        mnb=1;
                                                      //      
                                                      //while(mnb)
                                                      //{
                                                      //      key = key_check();
                                                      //        if(key==X_PLAY)
C51 COMPILER V7.50   RS232TOPCAPP                                                          12/14/2005 10:05:37 PAGE 5   

                                                      //           break;
                                                      //      else if(key==X_CHALL)
                                                      //           mnb=0;
                                                      //}
              
                                                      mem_cpy(strbuf, "FRAMES [000/000]", 16);
                                                      dtoa(frame_cnt, &strbuf[8], 3);
                                                      dtoa(tot_frame_cnt, &strbuf[12], 3);
                                                      //u32toa(cur_lba*8+i, &strbuf[21]);
                                                      center_line(10,strbuf,16);
                                                      
                                                      for(j=0;j<14;j++) strbuf[j] = (pgs>=j)?'.':' ';
                                                      if(pgs>=13) pgs = 0;
                                                      else pgs++;
                                                      center_line(11,strbuf,14);
                                                      
                                                      if(frame_cnt >= (tot_frame_cnt+1))      break;
                                              }
                                              if(frame_cnt >= (tot_frame_cnt+1))      break;
                                              cur_lba++;
                                      }
              //              }
              
              //END_MOVE_FRAMES:;
              
                      //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
              //while(1)
              //{
              //      key = key_check();
              //      if(key==X_STOP)
              //              break;
              //}
              }
              
              #endif // VY_UBI9021
 276          
 277          
 278          


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)

⌨️ 快捷键说明

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