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

📄 drv_conf.c

📁 有线电视系统前端设备复用器原代码。 用语接受卫星信号
💻 C
📖 第 1 页 / 共 4 页
字号:
#endif
#if (SC_UDP)
    InstallDriver(SC_UDP, otcp_udpspace_init, NULLF, NULLF, NULLF,
                  NULLF, NULLF, (long)&udp_drv, 0, IO_STREAM_DEV);
    PsosNumDntEnts++;
#endif
#if (SC_TCP)
    InstallDriver(SC_TCP, otcp_tcpspace_init, NULLF, NULLF, NULLF,
                  NULLF, NULLF, (long)&tcp_drv, 0, IO_STREAM_DEV);
    PsosNumDntEnts++;
#endif
#if (SC_LOOP)
    InstallDriver(SC_LOOP, otcp_loopspace_init, NULLF, NULLF, NULLF,
                  NULLF, NULLF, (long)&loop_drv, 0, IO_STREAM_DEV);
    PsosNumDntEnts++;
#endif

    }
#endif /* (SC_DEV_OTCP) */

#if (SC_DEV_OLAP)
  {
    extern struct streamtab phpiinfo, twfrinfo ;
    extern void   phpiinit(), twfrinit();
#if (SC_PHPI)
    static const psedrvparam_t phpiparam={"phpi",DT_CLONE,&phpiinfo,  0, 0};
#endif
#if (SC_LAPB)
    static const psedrvparam_t lapbparam ={"lapb", DT_REGULAR,&twfrinfo,0, 0};
#endif
 
#if (SC_PHPI)
    InstallDriver(SC_PHPI, phpiinit, NULLF, NULLF, NULLF,
                  NULLF, NULLF, (long)&phpiparam, 0, IO_STREAM_DEV);
    PsosNumDntEnts++;
#endif
#if (SC_LAPB)
    InstallDriver(SC_LAPB, twfrinit, NULLF, NULLF, NULLF,
                  NULLF, NULLF, (long)&lapbparam, 0, IO_STREAM_DEV);
    PsosNumDntEnts++;
#endif
  }
#endif

#if (SC_DEV_OX25)
  {
    extern struct streamtab phpiinfo, twfrinfo, twpkinfo, twsninfo, ipconvinfo;
    extern void twpkinit(), twsninit(), tcpsninit();
#if (SC_X25)
    static const psedrvparam_t x25param  ={"x25",  DT_DRIVER, &twpkinfo, 0, 0};
#endif
#if (SC_SNDCF)
    static const psedrvparam_t sndfparam ={"sndf", DT_REGULAR, &twsninfo, 0, 0};
#endif
#if (SC_IPCONV)
    static const psedrvparam_t ipconvparam={"ipsn",DT_REGULAR, &ipconvinfo, 0, 0};
#endif

#if (SC_X25)
    InstallDriver(SC_X25, twpkinit, NULLF, NULLF, NULLF,
                  NULLF, NULLF, (long)&x25param, 0, IO_STREAM_DEV);
    PsosNumDntEnts++;
#endif
#if (SC_SNDCF)
    InstallDriver(SC_SNDCF, twsninit, NULLF, NULLF, NULLF,
                  NULLF, NULLF, (long)&sndfparam, 0, IO_STREAM_DEV);
    PsosNumDntEnts++;
#endif
#if (SC_IPCONV)
    InstallDriver(SC_IPCONV, tcpsninit, NULLF, NULLF, NULLF,
                  NULLF, NULLF, (long)&ipconvparam, 0, IO_STREAM_DEV);
    PsosNumDntEnts++;
#endif
  }
#endif

#if (SC_DEV_ISDN)
  {
    extern struct streamtab phinfo, q921info, ipcdinfo ;
    extern void q921init(), phinit();

#if (SC_PH)
    static const psedrvparam_t phpiparam={"ph",DT_REGULAR,&phinfo,  0, 0};
#endif
#if (SC_LAPD)
    static const psedrvparam_t lapbparam={"q921",DT_REGULAR,&q921info,0,0};
#endif
#if (SC_IPCD)
    static const psedrvparam_t ipcdparam={"ipcd",DT_REGULAR,&ipcdinfo,0,0};
#endif
 
#if (SC_PH)
    InstallDriver(SC_PH, phinit, NULLF, NULLF, NULLF,
                  NULLF, NULLF, (long)&phpiparam, 0, IO_STREAM_DEV);
    PsosNumDntEnts++;
#endif
#if (SC_LAPD)
    InstallDriver(SC_LAPD, q921init, NULLF, NULLF, NULLF,
                  NULLF, NULLF, (long)&lapbparam, 0, IO_STREAM_DEV);
    PsosNumDntEnts++;
#endif
#if (SC_IPCD)
    InstallDriver(SC_IPCD, NULLF, NULLF, NULLF, NULLF,
                  NULLF, NULLF, (long)&ipcdparam, 0, IO_STREAM_DEV);
    PsosNumDntEnts++;
#endif
  }
#endif

#if (SC_DEV_MLPP)
  {
    extern struct streamtab frmuxtab, pppstream, Spimtab;
    extern void frmuxinit();
 
#if (SC_FRMUX)
    static const psedrvparam_t fmuxparam ={"cfmux",DT_REGULAR,&frmuxtab,0,0};
#endif
#if (SC_PPP)
    static const psedrvparam_t pppparam ={"cppp",DT_REGULAR,&pppstream,0,0};
#endif
#if (SC_PIM)
    static const psedrvparam_t pimparam ={"cpim",DT_REGULAR,&Spimtab,0,0};
#endif
 
#if (SC_FRMUX)
    InstallDriver(SC_FRMUX, frmuxinit, NULLF, NULLF, NULLF,
                  NULLF, NULLF, (long)&fmuxparam, 0, IO_STREAM_DEV);
    PsosNumDntEnts++;
#endif
#if (SC_PPP)
    InstallDriver(SC_PPP, NULLF, NULLF, NULLF, NULLF,
                  NULLF, NULLF, (long)&pppparam, 0, IO_STREAM_DEV);
    PsosNumDntEnts++;
#endif
#if (SC_PIM)
    InstallDriver(SC_PIM, NULLF, NULLF, NULLF, NULLF,
                  NULLF, NULLF, (long)&pimparam, 0, IO_STREAM_DEV);
    PsosNumDntEnts++;
#endif
  }
#endif

#if defined(SC_DEV_PSMUX) && SC_DEV_PSMUX
#include "drv_conf.app"
#endif





























/*---------------------------------------------------------------------*/
/* Additional drivers may be installed here.                           */
/*---------------------------------------------------------------------*/

#if(SC_DEV_RS232)
	InstallDriver(SC_DEV_RS232, (void *)smc_init, (void *)smc_open, (void *)smc_close,(void *)smc_read,
                  (void *)smc_write, NULLF, 0, 0, IO_CHAR_DEV);
#endif

#if(SC_DEV_RS422)
	InstallDriver(SC_DEV_RS422, (void *)scc_init, (void *)scc_open, (void *)scc_close,(void *)scc_read,
                  (void *)scc_write, NULLF, 0, 0, IO_CHAR_DEV);
#endif

#if(SC_DEV_PANEL)
	InstallDriver(SC_DEV_PANEL, (void *)panel_init, (void *)panel_open, (void *)panel_close,(void *)panel_read,
                  (void *)panel_write, NULLF, 0, 0, IO_CHAR_DEV);
#endif

return FreeMemPtr;
}

/***********************************************************************/
/* DrvSysStartCO : This is called from sysinit.c "SysStartCO".         */
/*                                                                     */
/*      INPUTS: None                                                   */
/*                                                                     */
/*     RETURNS: None                                                   */
/*     OUTPUTS: None                                                   */
/*     NOTE(S): Currently used to set-up the Initial Device Name Table */
/*              Additional code can be added here to clean-up the      */
/*              driver specific data area.                             */
/*                                                                     */
/***********************************************************************/
void DrvSysStartCO()
{
    long i, j;
    char namebuf[KC_DNLEN+1];

/*---------------------------------------------------------------------*/
/* Following are the call-outs which will be called. If your driver    */
/* needs pSOS+ "GS" (Warm Startup) notification to clear your driver   */
/* data structures, register here, so that it will be called.          */
/*---------------------------------------------------------------------*/
#if (SC_DEV_SERIAL && BSP_SERIAL)
        DevSerialCO();
#endif

#if (SC_DEV_CONSOLE && BSP_CONSOLE)
        DevPCConsoleCO();
#endif

/*---------------------------------------------------------------------*/
/* Default CONSOLE is passed as the DEFAULT CONSOLE for Re-Direction   */
/* CONSOLE can be either DEV_CONSOLE or DEV_SERIAL.                    */
/*---------------------------------------------------------------------*/
#if SC_DEV_PSCONSOLE
        PsConsoleSysStartCo(SC_PSCNSL_DEFAULT_DEV, SC_PSCNSL_DEFAULT_DEV);
#endif

#if SC_DEV_RDIO
        RdioSysStartCo();
#endif

#if SC_DEV_SCSI && BSP_SCSI
        DevScsiCO();
#endif

#if SC_DEV_SCSI_TAPE && BSP_SCSI_TAPE
        DevScsiCO();
#endif

#if SC_DEV_IDE && BSP_IDE
        DevIdeCO();
#endif

#if SC_DEV_PARALLEL
        DevParallelCO();
#endif

#if SC_DEV_FLOPPY && BSP_FLOPPY
        DevFloppyCO();
#endif

#if (SC_DEV_TFTP || SC_DEV_NTFTP)
        DevTftpCO();
#endif

#if SC_DEV_HTTP
        DevHttpCO();
#endif

#if SC_DEV_PIPE
        DevPipeCO();
#endif

/*---------------------------------------------------------------------*/
/* This code is used to build the initial table of device names used   */
/* in the pSOSystem.                                                   */
/*---------------------------------------------------------------------*/
/*-----------------------------------------------------------------*/
/* Make one name for the entrie pSOSystem Serial channels.         */
/*-----------------------------------------------------------------*/
#if (SC_DEV_SERIAL && BSP_SERIAL)
    dnt_add("tty", DEV_SERIAL);
#endif /* SC_DEV_SERIAL */

/*-----------------------------------------------------------------*/
/* Make one name for the PC Console Driver. (PC-Monitor).          */
/*-----------------------------------------------------------------*/
#if (SC_DEV_CONSOLE && BSP_CONSOLE)
    dnt_add("pcconsole", DEV_CONSOLE);
#endif

/*-----------------------------------------------------------------*/
/* Null Driver.                                                    */
/*-----------------------------------------------------------------*/
#if SC_DEV_NULL
    dnt_add("null", DEV_NULL);
#endif

/*-----------------------------------------------------------------*/
/* There is only one timer in the system. Make a name for it.      */
/*-----------------------------------------------------------------*/
#if SC_DEV_TIMER
    dnt_add("timer", DEV_TIMER);
#endif /* SC_DEV_TIMER */

/*-----------------------------------------------------------------*/
/* Add DNT entries for all pSEUDO console minor devices            */
/*-----------------------------------------------------------------*/
#if SC_DEV_PSCONSOLE
    dnt_add("psconsole", DEV_PSCONSOLE + SYSCONSOLE_DEV);
    dnt_add("stdin",     DEV_PSCONSOLE + STDIN_DEV);
    dnt_add("stdout",    DEV_PSCONSOLE + STDOUT_DEV);
    dnt_add("stderr",    DEV_PSCONSOLE + STDERR_DEV);
#endif

#if SC_DEV_MEMLOG
    dnt_add("memlog", DEV_MEMLOG);
#endif
        
#if SC_DEV_RDIO
    dnt_add("rdio", DEV_RDIO);
#endif
        

/*-----------------------------------------------------------------*/
/* Add the name for the RAMDISK driver as "ramdisk".               */
/*-----------------------------------------------------------------*/
#if SC_DEV_RAMDISK
    dnt_add("ramdisk", DEV_RAMDISK);
#endif /* SC_DEV_RAMDISK */

/*-----------------------------------------------------------------*/
/* Add the name for the PIPE drivers as "pipe".                    */
/*-----------------------------------------------------------------*/
#if SC_DEV_PIPE

⌨️ 快捷键说明

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