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

📄 mfcont.c

📁 一个交换作业的源程序
💻 C
字号:
  /*********************************************************************
  *   FILE:          MFCONT.C                                          *
  *                                                                    *
  *   CREATE DATE:   05/01/92                                          *
  *                                                                    *
  *   FUNCTION:      Control all clock and basic programs by using     *
  *                  the  timetable.                                   *
  *                                                                    *
  *   PERIOD:  10ms .                                                  *
  *                                                                    *
  *   The following are all clock programs and their excuting periods  *
  *       file name         period                                     *
  *       ---------         ------                                     *
  *       MFLSCM             200ms                                     *
  *       MFMID              100ms                                     *
  *       MFPIDE             10ms                                      *
  *       MFTMOD             50ms                                      *
  *       MFSCOC             100ms                                     *
  *       MFDRSN             100ms                                     *
  *       MFSEDT             50ms                                      *
  *       MFDUST             no special period                         *
  *                                                                    *
  *   The following are all basic programs and their excuting periods  *
  *       file name         period                                     *
  *       ---------         ------                                     *
  *       SCAN_H             200ms                                     *
  *       SCAN_COMMU         100ms                                     *
  *       SCAN_T             50ms                                      *
  *       SCAN_D             50ms                                      *
  *       CERCOMMU_PROC      50ms                                      *
  *       CEDRECEIVE_COMMU   50ms                                      *
  *       LFCOMC             50ms                                      *
  *       SECHARD            10ms                                      *
  *********************************************************************/
  #include "exdata.c"

  extern void mflscm(void);
			 /* hang on and off identifing                   */
  extern void mfmid(void);
			 /* the bit_midst identifing                     */
  extern void mfpide(void);
			 /* dialing pulse identifing                     */
  extern void mftmod(void);
			 /* start and stop timer                         */
  extern void mfdrsn(void);
			 /* drive switching network                      */
  extern void mfsedt(void);
			 /* send and stop tone                           */
  extern void mfscoc(void);
			 /*  start and stop collecting phone number      */
  extern void mfdust(char);
			 /* do all things that is unreachable to student */


  /* The following are basic procedure,illustration refer basic programs */
  extern void scan_h(void);
  extern void scan_t(void);
  extern void scan_d(void);
  extern void scan_commu(void);
  extern void cercommu_proc(void);
  extern void cedreceive_commu(void);
  extern void lfcomc(void);
  extern void sechard(void);
  extern void timecheck(void);   //Caution here!

  /*  public variety  */
  extern char timelist[]; /* the value of timetable   */
  extern int count;       /* the counter              */
  extern char avail;      /* contral the timetable    */

void  mfcont(void)
{

 int i;
 for (i=0;i<8;i++){
 if (((timelist[count%20]&avail)>>i)&1){
 switch(i)
 {
  case 0: mflscm();
	 mfdust(i);
	 break;
  case 1: mfpide();
	  mfdust(i);
	 sechard();
	 break;
  case 2: mfdust(i);
	 mfsedt();
	 lfcomc();
	 cercommu_proc();
	 cedreceive_commu();
	 break;
  case 3: mftmod();
	 mfdust(i);
	 break;
  case 4: mfmid();
	 mfdrsn();
	 mfdust(i);
	 break;
  case 5: mfscoc();
	mfdust(i);
	 scan_commu();
	 break;
  case 6: scan_t();
	 scan_d();
	 break;
  case 7: scan_h();
	 break;
  default: break;
  }

  }
 }

count++;
delay(8);
}

⌨️ 快捷键说明

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