亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? preform.c

?? LP830 無線識別卡 讀寫程序demo
?? C
?? 第 1 頁 / 共 5 頁
字號:
      break;
   case HMS_MEM_SIZE:
      printf(" HMS ");
      break;
   default:
      printf("ERROR");
      break;
   }
}

#define SOME_DATA  5  // Try to read this many bytes for antenna and tag detect.
#define READ_SOMEPLACE 0x00 // Try to read from this address in antenna detect.
// ****************************************************************************
// Display if the current antenna type antenna is attached.
//
// Input:        Optional, comport to be used. 
// Return:       None.
// Side effects: None.
void ant_attached(void)
{
   BYTE ant_att;                // Local BOOLEAN flags for if antenna attatched
   BYTE tag_pres;               // and if a TAG is present.
   time_t start_time;           // Hold second count for display and tag read time.

   for ( ; ; ) // Loop forever, until user enters ESC.
   {
      ant_att = FALSE;          // Assume that no antenna with
      tag_pres = FALSE;         // Assume no tag present.
      // Search for a tag to see if antenna responds with anything.
      SearchTx(MIF_SEARCH_TI); // Try to communicate with the mifare chip.
      time(&start_time);
      while ((NOT comm_avail()) AND 
         (ANT_CHK_TIME > (time((long *)NULL) - start_time)))
      {
         if (esc_entered())       // Keep checking for an ESC key.
            return;               // Yes, get out. Exit on ESC.  Confused user.
      }
      if (comm_avail())         // Get any response from the antenna?
      {
         ant_att = TRUE;            // It is TRUE to have an antenna attached.
         if (SearchRx() EQ OP_OK)
            tag_pres = TRUE;        // TRUE to have a tag present.
      }
      clrscr();
      printf("Controller for");
      print_tag_type();   // Print tag type for these commands.
      printf("\n");
      if (ant_att)
      {
         printf("    attached.\n"); // Yes, got something, it must be there. 
         if (tag_pres)
            printf("With Tag present.");
         printf("\n");
      } else
         printf("NOT attached.\n\n");
      time(&start_time);       // Get current second count form the runtime.
      do                       // Check for ESC entered, while waiting for antanna.
         if (esc_entered())
            return;    // ESC entered, exit this function.
      while (BETWEEN_CHECK > (time((long *)NULL) - start_time));
   }
}
      
// ****************************************************************************
// Continuously read 
// Infinite loop and increment block read 
//
// Input:        NONE.
// Return:       NONE.
// Side effects: NONE.
void ContinueRead(void) 
{
   WORD  data_size;  // Number of bytes for these reads.
   WORD  disp_start; // Tag starting address for the current read display line.
   WORD  now_start;  // Tag starting addres for the current block read.
   WORD  this_disp;  // Number of bytes in a given display line.
   WORD  left_disp;  // Number of bytes left to read for this_display.
   WORD  this_read;  // Number of bytes in a given read.
   BYTE *rx_data;    // Where to place the received tag data for a given read.
   WORD duration;    // Duration of continual read.
   time_t time_left; // Remaining time for this continual read.
   time_t now_last_time; // Value returned by time() last time.
   time_t old_last_time; // Hole the last time value for calculations.
   BYTE ii;        // Tempory varriable.         

   printf("\nDuration in seconds. Less then 32,767. ENTER for a minute:\n");
   if ((duration = inp_num(LARGEST_DEC)) EQ ENTER_ALONE)
      duration = 60;
   else if (duration EQ TOO_BIG_VAL)  // Was ESC entered? 
      return;     // Yes, get out. Exit on ESC.  Confused user.
   disp_start = 0;            // Begin at addres zero (0).
   data_size = mem_size;      // Display the entire tag..
   do                         // Do while the user keeps requesting more.
   {
      time_left = duration;
      time(&now_last_time);
      clrscr();
      printf("\nSearching for tag.\n");
      while (time_left > 0)               // For the duration entered to read.
      {
         old_last_time = now_last_time;   // Use as working varriable.
         time_left = time_left - (time(&now_last_time) - old_last_time);
         // The time left value used to be printed out, so it is calculated.
         if ((data_size / format_size()) NE 0)  // Next packet of data MAX size?
            this_disp = format_size(); // Use a maximum display for this format..
         else                          // else just what fits.
            this_disp = data_size;
            
         rx_data   = tag_io_buf;       // Use the global working tag data buffer.
         now_start = disp_start;       // Line of data starts at this tag address.
         left_disp = this_disp;        // Have read no bytes for this display.
         start_down(TAG_CONTINUAL);    // This initialized finished.
         do                            // Do reads for one line of display.
         {
            while (down_count() AND NOT finished) // Note: Because BLReadTx and
            {            // BLReadRx take time the display down count is slower.
               if (left_disp <= max_data_pkt) // One display line be read with
                  this_read = left_disp;      // one read command.
               else                           // OR, 
                  this_read = max_data_pkt;   // many reads at maximum size.
               if (Read_command(now_start, this_read, rx_data) EQ OP_OK) 
               {
                  rx_data = rx_data + this_read;  // For next read of this display.
                  now_start = now_start + this_read;// Got this_read more tag data.
                  if ((left_disp = left_disp - this_read) EQ 0)// Read bytes.
                     finished = TRUE;  // This display bytes have been read.
               }
               if (kbhit())
               {
                  if ((ii = getch_cont()) EQ ESC)
                     return;
                  if (ii EQ CR)
                  {
                     printf("\nENTER to repeat.\n");
                     do
                     {
                        if ((ii = getch_cont()) EQ ESC)
                           return;             // User is giving up.
                     } while (ii NE CR);    // CR is ENTER to repeate.
                     printf("\nSearching for tag.\n");
                     time_left = duration;  // Start fresh display time.
                     time(&now_last_time);
                  }
               }
            }
         }  while (left_disp AND down_count());
         if (finished)
         {     //print out receiving data
            display_data(tag_io_buf, this_disp, disp_start);
            data_size = data_size - this_disp;
            if ((disp_start = disp_start + this_disp) >= mem_size)
            {
               disp_start = 0;  // Loop back to the begining.
               data_size = mem_size;      // Display the entire tag..
            }
         } 
      }
   } while (ask_again()); // Repeat some command?
}

// ****************************************************************************
// Preform a Non-contiguous write. The address must have been setup in the last
// command, using read_write_conf().
//   
// Input:        NONE.
// Return:       NONE.
// Side effects: NONE.
void write_notcont(void) 
{
   BYTE status;                // Status of write command.
   WORD num_write;             // Number of write  address input.
   WORD num_ASCII;             // Number of ASCII data bytes entere on a given line.
   BYTE data_buf[OUT_LIMIT];   // build the command in this buffer.

   num_write = 0;
   address_ptr = data_buf;
   do
   {
      printf("Input data byte number %d (ENTER when finished): ", num_write + 1);
      switch (display_type)
      {
      case HEX:
         address_value = inp_hex();  // Enter a number in hexadecimal format.
         break;

      case DEC:
         address_value = inp_num(BYTE_VALUE); // Enter a number in decimal format.
         break;

      case BIN:
         address_value = inp_bin(); // Enter a number in binary format.
         break;

      case ASCII:
         num_ASCII = get_ascii_data(1);    // Get a byte of ASCII data, a character.
         if (num_ASCII EQ TOO_BIG_VAL)
            address_value = TOO_BIG_VAL;   // User trying to ESCape out of this command.
         else if (num_ASCII EQ 0)
            address_value = ENTER_ALONE;   // Done entering the characters.
         else
            address_value = tag_io_buf[0]; // from a common buffer (return parameter).
         printf("\n");                     // Output a carriage return.
         break;

      default:                 // This will never happen.
         address_value = TOO_BIG_VAL; // ERROR, this should never happen.
         break;
      }
      if (address_value EQ TOO_BIG_VAL)
         return;     // User trying to ESCape out of this command.
      if (address_value NE ENTER_ALONE)
         num_write++;        // Data for another address was input, count it.
      *address_ptr++ = (BYTE) address_value & 0xFF; // and low byte also.
   } while (address_value NE ENTER_ALONE);                   // And point past data.

   // Prefrom the Non-contiguous write, with write time + some more for big write commands.
   NCWriteTx(MIF_WRITE_TI + (num_write * 10), data_buf, num_write);
   status = NCWriteRx();
   if(status EQ OP_OK) 
      printf("\nNon-contiguous write is done. \n");
   else      //error code is RX
      print_code(status);
   printf("\nPress any key to go back to menu. \n");
   getche_cont();
}

// ****************************************************************************
// Preform a Non-contiguous read. The address must have been setup in the last
// command, using read_write_conf().
//   
// Input:        NONE.
// Return:       NONE.
// Side effects: NONE.
void read_notcont(void) 
{
   WORD ii;
   BYTE *rx_buf; 
   BYTE status;

   printf("\nReading data from tag.  Please wait...\n\n");
   NCReadTx(MIFARE_TIME_OUT);
   
   rx_buf = (BYTE*) malloc(nc_read_size);
   status = NCReadRx(rx_buf, nc_read_size);

   printf("\n");
   if( (status EQ OP_OK) ) 
   {     //print out receiving data.
      for(ii = 0; ii < nc_read_size; ii++)
      {
         print_byte(rx_buf[ii]);
         if (display_type EQ ASCII)  // If displaying in ASCII, then
            printf(" ");  // have a space between characters.
         if (((ii + 1) MOD format_size()) EQ 0) // If handled a display line of data,
            printf("\n");                 // then output a carriage return.
      }
   } else                     //receive error message
      print_code(status);

   free(rx_buf);
   printf("\nPress any key to go back to menu. \n");
   getche_cont();

}

// ****************************************************************************
// Set up for a Read/Write Configuration Command.  This is to configure the
// tag for non-Contiguour Read/Write 
//   
// Input:        NONE.
// Return:       NONE.
// Side effects: NONE.
void read_write_conf(void) 
{
   BYTE *write_addr;    // Point to the input write addresses.
   BYTE status;  // Status of write command.
   WORD num_write;      // Number of write  address input.

   address_ptr = tag_io_buf;
   nc_read_size = 0;  // To remember How many bytes read. 
   do
   {
      printf("Input read addresses number %d (ENTER when finished): ", nc_read_size + 1);
      if ((address_value = inp_num(mem_size)) EQ TOO_BIG_VAL)
         return;     // User trying to ESCape out of this command.
      if (address_value NE ENTER_ALONE)
         nc_read_size++;        // Another address  was input, count it.
      *address_ptr++ = address_value >> 8;   // Get the high byte
      *address_ptr++ = (BYTE) address_value & 0xFF; // and low byte also.
   } while (address_value NE ENTER_ALONE);                   // And point past data.
   write_addr = address_ptr;
   num_write = 0;
   do
   {
      printf("Input write addresses number %d (ENTER when finished): ", num_write + 1);
      if ((address_value = inp_num(mem_size)) EQ TOO_BIG_VAL)
         return;     // User trying to ESCape out of this command.
      if (address_value NE ENTER_ALONE)
      {
         num_write++

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91浏览器在线视频| 在线观看成人小视频| 久久99精品久久久| 首页亚洲欧美制服丝腿| 亚洲成人精品一区| 亚洲chinese男男1069| 午夜电影网亚洲视频| 免费观看一级欧美片| 精品一区二区影视| 国产精品一区二区x88av| 国产精品88888| 成人国产精品免费| 97久久超碰精品国产| 欧洲av一区二区嗯嗯嗯啊| 欧美性三三影院| 91精品在线麻豆| 精品久久久三级丝袜| 国产午夜精品福利| 国产精品第四页| 亚洲一区二区三区中文字幕在线| 亚洲国产成人91porn| 奇米一区二区三区av| 国产一区二区导航在线播放| 成人永久aaa| 91同城在线观看| 精品视频色一区| 91精品国产91久久综合桃花| 精品第一国产综合精品aⅴ| 亚洲国产精品av| 成人性生交大片免费看在线播放| 国产女主播在线一区二区| 亚洲视频一区在线观看| 亚洲成人自拍偷拍| 国产自产高清不卡| 99精品国产视频| 欧美日韩电影在线播放| 亚洲国产欧美日韩另类综合| 精品剧情在线观看| 中文字幕在线不卡国产视频| 亚洲一区二区av在线| 精品影院一区二区久久久| 成av人片一区二区| 欧美日本韩国一区| 国产欧美一区二区精品久导航 | 91精品国产综合久久小美女| 日韩三级免费观看| 亚洲欧洲日产国码二区| 奇米精品一区二区三区四区| 成人国产视频在线观看| 日韩一级成人av| 中文字幕日韩av资源站| 奇米综合一区二区三区精品视频 | 日韩精品一区二区在线| 中文字幕在线一区| 欧美aaaaa成人免费观看视频| 国产·精品毛片| 777奇米四色成人影色区| 国产精品福利电影一区二区三区四区 | 久久精品一区八戒影视| 伊人夜夜躁av伊人久久| 久久电影网电视剧免费观看| 91成人在线免费观看| 国产丝袜美腿一区二区三区| 日韩极品在线观看| 91亚洲国产成人精品一区二三 | 中文成人av在线| 免费在线一区观看| 在线免费观看视频一区| 国产偷国产偷亚洲高清人白洁| 日日摸夜夜添夜夜添精品视频| 99久精品国产| 欧美激情一区在线| 久久9热精品视频| 欧美日韩成人一区二区| 亚洲欧美另类在线| 国产美女一区二区| 欧美一区二区久久| 亚洲国产精品精华液网站 | 欧美国产成人精品| 久久 天天综合| 欧美一区三区二区| 午夜天堂影视香蕉久久| 色成人在线视频| 日韩一区中文字幕| 不卡一区二区在线| 日本一区二区在线不卡| 韩国三级在线一区| 日韩欧美国产三级电影视频| 日韩国产精品91| 久久亚洲一级片| 国产精品三级av| 国产另类ts人妖一区二区| 精品少妇一区二区三区在线播放 | 国产精品久久久久久久久快鸭| 精品一区二区三区的国产在线播放| 欧美日韩国产一级| 天堂一区二区在线| 欧美理论在线播放| 日一区二区三区| 欧美日韩色一区| 三级在线观看一区二区| 欧美人狂配大交3d怪物一区| 亚瑟在线精品视频| 欧美精品久久99| 日本不卡123| 欧美大片一区二区| 国产综合色在线| 国产欧美精品一区二区色综合 | 99久久婷婷国产| 亚洲婷婷综合久久一本伊一区 | 国产精品区一区二区三区| 国产在线一区二区| 久久久美女艺术照精彩视频福利播放| 精品一区二区综合| 精品国产成人系列| 国产成人精品影院| 中文字幕在线免费不卡| 在线看国产一区| 亚洲午夜久久久久久久久电影院| 欧美色窝79yyyycom| 日本午夜精品一区二区三区电影| 亚洲欧美另类久久久精品2019| 黄色日韩三级电影| 日本一区二区三区国色天香 | 福利一区二区在线| 国产精品久久久久久久久免费相片| 99久久精品一区| 亚洲成人你懂的| 精品国产露脸精彩对白 | 久久九九99视频| 99re热这里只有精品视频| 亚洲午夜电影在线观看| 欧美一区2区视频在线观看| 国产一区999| 亚洲精品乱码久久久久久| 欧美一区二区三区影视| 国产精品99久| 亚洲精品高清视频在线观看| 91精品国产一区二区三区香蕉 | 欧美人xxxx| 国内精品第一页| 亚洲欧美偷拍三级| 欧美一区二区大片| www.欧美日韩| 日韩专区一卡二卡| 中文字幕免费观看一区| 欧美在线小视频| 国产制服丝袜一区| 一区二区三区四区在线免费观看| 欧美一级精品在线| 91丝袜高跟美女视频| 蜜桃视频一区二区三区 | 成人一级片在线观看| 亚洲福利一二三区| 久久精品亚洲精品国产欧美kt∨ | 精品国产乱码久久久久久牛牛| 99久久精品国产麻豆演员表| 日本欧美一区二区| 亚洲色大成网站www久久九九| 日韩午夜在线播放| 日本大香伊一区二区三区| 国产一区三区三区| 亚洲成国产人片在线观看| 欧美国产一区在线| 91麻豆精品国产91| 在线免费观看一区| 成人综合在线观看| 久久99九九99精品| 亚洲高清不卡在线观看| 国产精品美女视频| 337p日本欧洲亚洲大胆色噜噜| 日本韩国精品在线| 丁香六月综合激情| 狠狠色丁香九九婷婷综合五月| 色综合天天做天天爱| 亚洲欧美日本在线| 欧美激情综合网| 久久一留热品黄| 日韩欧美视频在线 | 亚洲欧美电影一区二区| 国产香蕉久久精品综合网| 这里只有精品电影| 精品成a人在线观看| 国产精品一区在线观看乱码| 日韩av网站免费在线| 亚洲综合视频在线观看| 国产精品午夜久久| 国产亚洲成年网址在线观看| 欧美va亚洲va国产综合| 91精品国产综合久久久蜜臀粉嫩| 在线观看av不卡| 在线精品视频免费播放| 97久久精品人人做人人爽 | 欧美电影免费观看完整版| 欧美日韩国产精品自在自线| 色哟哟一区二区在线观看| 成人国产精品免费| 成人av资源下载| 成人av网站免费| eeuss鲁片一区二区三区|