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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ltmodem.c

?? 話帶數(shù)據(jù)中傳真解調(diào)程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
 *	$Id: ltmodem.c,v 1.7 1999/12/19 21:52:09 root Exp root $
 *
 *	Lucent modem diagnostics tool.
 *
 *  Copyright (c) 1999 Richard J.M. Close
 *  Copyright (c) 1999 Pavel Machek <pavel@suse.cz>
 *  Copyright (c) 1999 Jamie Lokier
 *
 *	Can be freely distributed and used under the terms of the GNU GPL.
 */

#include "ltmodem.h"

//void show_modem(void); ??

// Include the DSP code.
#include "dsp.c"

// Main program.

int main(int argc, char **argv)
{

  char c;
  sync();	// it's for your own protection!
  setvbuf(stdout, NULL, _IONBF, 0);

  puts("ltmodem version " LTMODEM_VERSION);

  // Try to find an ISA modem.
  init_isa();
  if (!isapnp_modem)
	// No ISA modem found so try PCI.
    init_pci();

#if TRY_INTERRUPTS
  // Open the IRQ device node for reading.
  irq_dev = fopen(IRQ_DEV, "r");
  if (irq_dev) {
	printf ("Opened %s for reading.\n", IRQ_DEV);
	// Set up bb threads.
	bb_threads_stacksize(65536);
	bb_threads_shared_sighandlers(0);
	bb_threads_mutexcreate(0);
	bb_threads_mutexcreate(1);

	interrupt_enabled = 1;
	modem_enabled = 0;
	bb_threads_lock(1);
	irq_pid = bb_threads_newthread(catch_interrupts, NULL);
	printf("Spawned interrupt handler thread pid= %d\n", irq_pid);

	bb_threads_unlock(1);
  }
  else
	printf ("Failed to open %s.\n", IRQ_DEV);
  
#endif


  /* If modem is found then it sets modem_dev to device structure
     for modem, and modem =1 */
  if ( (!isapnp_modem) && !find_modem() ) {
    printf ("Sorry, no Lucent PCI modem that I know of was found.\n");
    printf ("If you have one fitted then please mail me with the details\n");
    printf ("at: richard@close.u-net.com please include an output from\n");
    printf ("cat /proc/pci and as much info. on the card as possible.\n");
    printf ("If you have an ISA modem please see README.ISA.\n");
    exit(1);
  }

  while ((c = getopt(argc, argv, "zimovtrhpd:uc" )) != -1) {
    switch(c) {
    case 'z':
      show_modem();
      setup_irq();
	  io_init();
      break;
    case 'i':
      show_modem();
      main_menu();
      break;
    case 'c':
      command_mode();
      break;
    case 't':
      show_modem();
      setup_irq();
      io_init();
      hangup();
      break;
    case 'r':
      show_modem();
      setup_irq();
      io_init();
      hangup();
      waitForCall();
      break;
    case 'u':	/* Full duplex transmit/receive */
      //      show_modem();
      setup_irq();
      io_init();
      voice_init();
      dp_offhook_cmd();
      voice_transmit(-1);
      die( "Should be unreachable\n" ); // ???
      break;
    case 'd':
      show_modem();
      setup_irq();
      io_init();
	  dp_update_modem_options();

	  // Turn speaker on, and set volume to max.
      setSpeaker(true, 3);

	  /*{ // Keep an eye on how long going offhook takes!
		unsigned short my_timer;
		my_timer = x_current_time(); */
	  dp_offhook_cmd();
		/* printf ("dp_offhook_cmd took %dmS.\n", x_elapsed_time(my_timer));
		}*/

	  // Initialise the dial state.
	  bodge_init_dial();

#if WAIT_FOR_DIALTONE
      // Wait for dial tone.
      printf( "Waiting for dialtone... ");
	  if (waitForDialTone())
		printf("got it!\n");
	  else {
		printf("no dial tone detected, is the phone plugged in?\n");
        hangup();
		break;
	  }
#endif

      // Dial how you want.
      printf( "About to dial %s: ...", optarg );
      dial(optarg);
      printf( " done.\n");
	
#if WAIT_FOR_ANSWER  
	  { 
		unsigned short local_timer;
        bool modemDetected = false;
        bool lineBusy = false;

		// Set up for call related detection.
		bodge_after_dial_init();

		dp_answer_state = 0;

		local_timer = x_current_time();

		// Set up tone detection.
		dp_detect_tones_cmd();

		// Busy tone detection will not work if this is set!
		S_data_calling_tone = false;

		// Wait until busy tone detected or answer tone detected or 10 seconds has expired.
		while (x_elapsed_time(local_timer) < 10000) {

		  if (dp_busy_tone_detected()) {
			lineBusy = true;
		  	break;
		  }
		  if (x_elapsed_time(local_timer) > 1000)
			// After 1 sec. also check for answer.
			if (dp_answer_tone_detected()) {
			  printf("Answer detected.\n");
			  modemDetected = true;
			  break;
			}
		}
		if (modemDetected)
		  // Set up modem data connection.
		  connect_to_modem();
		else if (lineBusy){
		  printf("The line is busy! hanging up...\n");
		  hangup();
		}
		else
		  printf("No answer tone, bummer!\n");
	  }
#endif
	  
#if HANGUP_AFTER_DIAL
	  // Delay before hanging up, make this long enough to hear
	  // any response from line when messing around with dialling.
	  sleep(5);

      printf( "About to hangup\n" );
	  hangup();
#endif
      break;

    case 'o':
      show_modem();
      setup_irq();
      io_init();
      big_init();
      voice_init();
      printf("Ready\n" );
      dp_offhook_cmd();
      dp_pulse_dial_cmd(3);	/* How do you prove that number PI does not exist? */
      dp_pulse_dial_cmd(1);	/* You take telephone and dial 3 1 4 1 5 9 2 6 5 4 */
      dp_pulse_dial_cmd(4);	/* and then you hear ta da da called number does */
      dp_pulse_dial_cmd(1);	/* not exist. (It works in Prague at least :-) */
      dp_pulse_dial_cmd(5);
      dp_pulse_dial_cmd(9);
      dp_pulse_dial_cmd(2);
      dp_pulse_dial_cmd(6);
      dp_pulse_dial_cmd(5);
      dp_pulse_dial_cmd(4);
      dp_DTMF_dial_cmd(1);
#if 0
      sleep(1);
      dp_synth_ring_init();
      sleep(1);
      dp_synth_ring_on();
      sleep(1);
      dp_synth_ring_off();
#endif
      sleep(1);

#if 1
      printf( "Staring tad\n" );
      dp_start_tad(0xf0);
      expect_irqs();
#endif

#if 0
      printf( "X_output(13)\n" );
      x_output(0x13);
      expect_irqs();
      x_output(0x1a);
      printf( "Should be ready?\n" );
#endif
      expect_irqs();
      printf( "Should dial 2\n" );
      dp_DTMF_dial_cmd(2);
      expect_irqs();
#if 0
      printf( "Really should dial 2\n" );
      dp_offhook_cmd();
      dial("2");
      expect_irqs();
#endif
#if 0
      expect_irqs();
      printf( "init hdsp\n" );
      dp_init_hdsp();
      expect_irqs();
      printf( "Starting speakerphone\n" );
      dp_start_hdsp();
      expect_irqs();
      printf( "Switching fdsp\n" );
      dp_switch_fdsp();
      expect_irqs();
      {
	  int i = 0;
	  for (i = 0; i<5; i++) {
	    dp_mute_fdsp(1);
	    sleep(1);
	    dp_mute_fdsp(0);
	    sleep(1);
	  }
      }
      printf( "Stop fdsp:\n" );
      dp_stop_fdsp();
      sleep(3);
      printf( "About to hangup.\n" );
      dp_onhook_cmd();
      /* go_offhook(); -- seems to do something slightly different */
      /* dp_download_fax(); */
#endif
      break;
    case 'm':
      continous_monitoring(3, 1000);
      break;
    case 'p':
      pulseDial = true;
      break;
    case 'v':
      verbose++;
      break;
    case 'h':
    default:
      printf( "Usage: ltmodem [-imovthpd]\n" );
      printf( "-i interative use.\n-m monitoring ports/registers.\n");
      printf( "-o prove PI does not exist and turn modem into microwave owen.\n");
      /* -o is really meant for debugging only, and it does strange
         things. Not a toy for people who read help. It does different
         things in every release. */
      printf( "-v increase level of verbosity.\n");
      printf( "-t basic test, display checksum etc. then hangup.\n");
      printf( "-r receive call, initialises modem then waits for incoming call.\n");
      printf( "-c enter command mode, read commands from fd#3.\n");
      printf( "-u put phone offhook, then start transmitting data from stdin\n"
	      "   and receive data from modem to stdout. You _must_ provide data on stdin\n" );
      printf( "-p enable Pulse dialling, default is Tone.\n");
      printf( "-d dial the specified number.\n");
      printf( "-h print this message!\n");
      goto exit;
    }
  }
  exit:

#if TRY_INTERRUPTS
  // Request termination.
  interrupt_enabled = 0;
  // Close device node;
  if (irq_dev)
	fclose(irq_dev);
  else {
   printf("Cannot close IRQ device as it is not open!.\n");
   printf("Have you done: 'modprobe usirq' ?.\n");
  }
  kill(irq_pid, SIGQUIT);

  // Clean up the thread.
  bb_threads_cleanup(wait(NULL));
#endif

  if (isapnp_modem)
    cleanup_isa();

  else
    cleanup_pci();


  return 0;
}

void command_mode(void)
{
  char buf[10240];
  FILE *cmd = fdopen(3, "r");

  fprintf(stderr, "PROTOCOL 0.0\n" );
  fprintf(stderr, "SWVERSION ltmodem " LTMODEM_VERSION "\n" );
  //  show_modem();
  setup_irq();
  io_init();
  voice_init();
  dp_update_modem_options();

  fprintf(stderr, "HWVERSION mars V%x.%x (rom checksum %x)\n",
		  x_chip_version, dp_version, rom_checksum );
  //fprintf(stderr, "+ Command mode ready\n" );

  while (fgets(buf, 10235, cmd) != NULL) {
    fprintf(stderr, "# Got command %s\n", buf );

    if (!strncmp(buf, "help", 4) || (buf[0] == '?')) {
      fprintf(stderr, "Available commands:
   help         Displays command summary.
   ?            Same as help.
   quit         Exit command mode back to shell.
   exit         Guess what! (yes the same as quit).
   onhook   	Go onhook.
   offhook      Go offhook.
   dial	xxx     Dial the number xxx.
   duplex       Perform duplex voice transmission.
   ringin       Wait for a call to come in.
   reset        Hang up and reset the modem.
   speaker on	Turn internal speaker on.
   speaker off	Turn internal speaker off.
" );

    } else if (!strncmp(buf, "onhook", 6)) {
      dp_onhook_cmd();
      fprintf(stderr, "+ OK\n" );

    } else if (!strncmp(buf, "offhook", 7)) {
      dp_offhook_cmd();
      fprintf(stderr, "+ OK\n" );

    } else if (!strncmp(buf, "ringin", 6)) {
      waitForCall();
      fprintf(stderr, "+ OK\n" );

    } else if (!strncmp(buf, "expect dialtone", 15)) {
	  // Make sure we are off hook.
	  if (x_status[0] != 0) {
		fprintf(stderr, "- Error: You must go offhook first!\n" );
		continue;
	  }
	  // Initialise the dial state.
	  bodge_init_dial();
      // Wait for dial tone.
	  if (waitForDialTone())
		fprintf(stderr, "+ got dialtone OK\n" );
	  else
		fprintf(stderr, "- No dial tone detected, is the phone plugged in?\n");

    } else if (!strncmp(buf, "dial", 4)) {
	  // Make sure we are off hook.
	  if (x_status[0] != 0) {
		fprintf(stderr, "- Error: You must go offhook first!\n" );
		continue;
	  }
	  // Initialise the dial state.
	  bodge_init_dial();
	  dial(buf + 5);
	  fprintf(stderr, "# ringing... " );

#if WAIT_FOR_ANSWER  
	  // Set up for call related detection.
	  bodge_after_dial_init();

	  // Wait for answer tone.
	  if (waitForAnswerTone())

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久一二三区| 日韩一区中文字幕| 青青草成人在线观看| 亚洲午夜免费福利视频| 国产日韩欧美一区二区三区乱码 | 欧美日韩成人在线一区| 欧美精品v国产精品v日韩精品| 国产精品的网站| 成人av高清在线| 国产片一区二区三区| 国产精品亚洲人在线观看| 久久久亚洲欧洲日产国码αv| 激情偷乱视频一区二区三区| 蜜臀va亚洲va欧美va天堂| 欧美日韩高清一区| 婷婷久久综合九色综合绿巨人 | 色综合天天综合网国产成人综合天 | 麻豆成人综合网| 制服.丝袜.亚洲.中文.综合| 丝袜美腿高跟呻吟高潮一区| 欧美挠脚心视频网站| 视频一区二区中文字幕| 国产精品夫妻自拍| 在线视频你懂得一区| 成人免费va视频| 国产精品亲子伦对白| av在线播放一区二区三区| 成人欧美一区二区三区白人 | 欧美中文字幕一区二区三区亚洲| 亚洲免费在线视频| 欧美日韩中字一区| 免费精品视频最新在线| 久久久亚洲综合| av在线播放一区二区三区| 一区二区三区美女视频| 欧美色精品在线视频| 免费人成网站在线观看欧美高清| 精品国产免费一区二区三区四区 | 久久久不卡网国产精品二区| 国产v综合v亚洲欧| 亚洲视频一二三区| 欧美在线免费播放| 青青草原综合久久大伊人精品 | 精品国产一区二区亚洲人成毛片| 国产一区二区视频在线| 国产精品久久三区| 欧美亚洲综合在线| 久久精品国产精品亚洲综合| 久久久99久久| 欧洲另类一二三四区| 日韩电影一区二区三区| 久久婷婷久久一区二区三区| 91色在线porny| 婷婷成人激情在线网| 2021中文字幕一区亚洲| 成av人片一区二区| 午夜av区久久| 国产日韩影视精品| 欧美视频一区二区| 国产精品一区二区不卡| 亚洲激情男女视频| 国产不卡视频一区| 亚洲三级久久久| 日韩一区二区精品| 99精品视频在线观看| 日产国产高清一区二区三区| 精品久久久久久久一区二区蜜臀| 99热精品国产| 捆绑变态av一区二区三区| 国产精品久久99| 91精品办公室少妇高潮对白| 亚洲精品免费视频| 在线中文字幕一区二区| 亚洲桃色在线一区| 中文字幕精品—区二区四季| 色94色欧美sute亚洲线路二 | 狠狠色丁香婷综合久久| 在线观看一区二区视频| 亚洲视频在线观看一区| 色猫猫国产区一区二在线视频| 亚洲午夜在线电影| 欧美乱熟臀69xxxxxx| 日韩电影在线观看网站| 精品国产一区二区亚洲人成毛片| 韩国成人在线视频| 久久久三级国产网站| 国产精品午夜在线观看| 国产一区二区视频在线播放| 色偷偷88欧美精品久久久| 久久在线免费观看| 蜜桃精品在线观看| 欧美亚洲一区三区| 中文字幕综合网| 精品一区二区三区免费毛片爱| 色综合久久综合中文综合网| 国产香蕉久久精品综合网| 麻豆精品一区二区av白丝在线| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 日本成人中文字幕在线视频| 欧美日本在线观看| 99国产一区二区三精品乱码| 天堂成人国产精品一区| 6080国产精品一区二区| 国产河南妇女毛片精品久久久| 国产欧美一区二区在线观看| 一区二区三区日韩在线观看| a亚洲天堂av| 狠狠色丁香九九婷婷综合五月| 亚洲美女区一区| 国产精品免费看片| 久久久精品天堂| 欧美成人一区二区| 日韩视频一区二区在线观看| 欧美日本在线观看| 欧美日韩在线电影| jizzjizzjizz欧美| 一区二区高清视频在线观看| 成人激情校园春色| 欧美在线看片a免费观看| 国产精品夜夜嗨| 狠狠色综合日日| 美国毛片一区二区| 美女视频第一区二区三区免费观看网站| 亚洲国产日韩一级| 亚洲一卡二卡三卡四卡无卡久久| 成人欧美一区二区三区1314| 国产精品你懂的在线欣赏| 久久久久久久久久久久久久久99| 精品福利一二区| 精品女同一区二区| 精品噜噜噜噜久久久久久久久试看| 欧美猛男gaygay网站| 欧美三级三级三级| 欧美日韩美少妇| 在线不卡的av| 欧美一二三区在线| 欧美成人精品1314www| 日韩欧美国产系列| 精品国产凹凸成av人网站| 欧美精品一区二区精品网| 久久亚洲春色中文字幕久久久| 精品成人一区二区| 久久久精品国产99久久精品芒果| 国产欧美一区二区三区鸳鸯浴| 日本一区二区高清| 亚洲私人黄色宅男| 亚洲一区在线视频观看| 婷婷夜色潮精品综合在线| 免播放器亚洲一区| 国产一区二区美女诱惑| 国产精品66部| av不卡在线观看| 在线看不卡av| 91精品久久久久久蜜臀| 精品毛片乱码1区2区3区| 久久婷婷国产综合国色天香| 国产精品三级在线观看| 亚洲欧美日韩国产综合在线 | 国产亚洲欧美一区在线观看| 国产精品国产自产拍高清av| 亚洲精品你懂的| 日韩精品电影在线| 国产一区二区三区四区五区美女 | 国产成人综合在线| 95精品视频在线| 欧美三级日韩三级| 欧美成人激情免费网| 中文幕一区二区三区久久蜜桃| 亚洲欧美日韩系列| 蜜桃av一区二区在线观看| 国产成人精品aa毛片| 91高清视频在线| 日韩精品一区二区三区视频播放| 欧美韩国日本不卡| 亚洲成人动漫在线免费观看| 精品一区二区三区在线观看| eeuss鲁一区二区三区| 日本高清不卡一区| 日韩一级免费观看| 国产精品嫩草影院com| 亚洲一本大道在线| 国产精品夜夜爽| 欧美日韩精品电影| 国产无人区一区二区三区| 亚洲综合久久久久| 国产综合色在线视频区| 91豆麻精品91久久久久久| 亚洲精品一区二区三区在线观看| 日韩美女视频一区| 久久国产尿小便嘘嘘| 国产乱人伦偷精品视频不卡| 精品一区二区三区在线观看国产| 成人h精品动漫一区二区三区| 777午夜精品视频在线播放| 国产日韩欧美a| 日本成人中文字幕| 99久久久久久| 欧美电影免费观看高清完整版在 | 在线观看日韩一区| 久久精品视频一区|