📄 drv_conf.c
字号:
#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, 0); PsosNumDntEnts++;#endif#if (SC_LAPB) InstallDriver(SC_LAPB, twfrinit, NULLF, NULLF, NULLF, NULLF, NULLF, (long)&lapbparam, 0, 0); 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, 0); PsosNumDntEnts++;#endif#if (SC_SNDCF) InstallDriver(SC_SNDCF, twsninit, NULLF, NULLF, NULLF, NULLF, NULLF, (long)&sndfparam, 0, 0); PsosNumDntEnts++;#endif#if (SC_IPCONV) InstallDriver(SC_IPCONV, tcpsninit, NULLF, NULLF, NULLF, NULLF, NULLF, (long)&ipconvparam, 0, 0); PsosNumDntEnts++;#endif }#endif/*---------------------------------------------------------------------*//* Additional drivers may be installed here. *//*---------------------------------------------------------------------*/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. *//* *//***********************************************************************/static void fake_a_use_to_prevent_compiler_warning(long x) {}void DrvSysStartCO(){ long i=0, j=0; char namebuf[KC_DNLEN+1]; fake_a_use_to_prevent_compiler_warning(i); fake_a_use_to_prevent_compiler_warning(j); fake_a_use_to_prevent_compiler_warning((long)namebuf);/*---------------------------------------------------------------------*//* 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 DevSerialCO();#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 DevTftpCO();#endif#if SC_DEV_PSEUDO DevPseudoCO();#endif/*---------------------------------------------------------------------*//* This code is used to build the initial table of device names used *//* in the pSOSystem. *//*---------------------------------------------------------------------*/#if SC_INIT_DNTABLE /*-----------------------------------------------------------------*/ /* Make one name for each serial channel the board supports plus */ /* one for the standard I/O channel. */ /*-----------------------------------------------------------------*/ #if SC_DEV_SERIAL dnt_add("tty", DEV_SERIAL); #endif /* SC_DEV_SERIAL */ /*-----------------------------------------------------------------*/ /* There is only one timer in the system. Make a name for it. */ /*-----------------------------------------------------------------*/ #if SC_DEV_TIMER dnt_add("timer", DEV_TIMER + 0); #endif /* SC_DEV_TIMER */ /*-----------------------------------------------------------------*/ /* There is only one ramdisk in the system. Make a name for it. */ /*-----------------------------------------------------------------*/ #if SC_DEV_RAMDISK dnt_add("ramdisk", DEV_RAMDISK + 0); #endif /* SC_DEV_RAMDISK */ /*-----------------------------------------------------------------*/ /* Make the default names for the SCSI disks supported by */ /* pSOSystem. The names are specified as rsdXYZZ, where X is a */ /* single hex digit specifying the SCSI bus number (currently */ /* pSOSystem only supports one SCSI bus) 0-f, Y is a single hex */ /* digit specifying the drive number on a given SCSI bus 0-f, and */ /* ZZ is two hex digits specifying the partion number 00-ff. A */ /* partition number of zero specifies an unpartition drive. All */ /* the hex digits are lower case. */ /*-----------------------------------------------------------------*/ #if SC_DEV_SCSI && BSP_SCSI for (i=0; i<8; i++) for (j=0; j<5; j++) { GenerateString(namebuf, "rsd%x%x%.2x", 0, i, j); dnt_add(namebuf, DEV_SCSI + ((j << 8) + i)); } #endif /* SC_DEV_SCSI && BSP_SCSI */ /*-----------------------------------------------------------------*/ /* Make the default names for the SCSI tape drives supported by */ /* pSOSystem. The names are specified as rstXY, where X is a */ /* single hex digit specifying the SCSI bus number (currently */ /* pSOSystem only supports one SCSI bus) 0-f, Y is a single hex */ /* digit specifying the drive number on a given SCSI bus 0-f. */ /*-----------------------------------------------------------------*/ #if SC_DEV_SCSI_TAPE && BSP_SCSI_TAPE for (i=0; i<8; i++) { GenerateString(namebuf, "rst%x%x", 0, i); dnt_add(namebuf, DEV_SCSI_TAPE + i); } #endif /* SC_DEV_SCSI_TAPE && BSP_SCSI_TAPE */ /*-----------------------------------------------------------------*/ /* Make the default names for the IDE disks supported by */ /* pSOSystem. The names are specified as ideYZZ, where Y is a */ /* single hex digit specifying the drive number on the IDE bus */ /* 0-f, and ZZ is two hex digits specifying the partion number */ /* 00-ff. A partition number of zero specifies an unpartition */ /* drive. All the hex digits are lower case. */ /*-----------------------------------------------------------------*/ #if SC_DEV_IDE && BSP_IDE for (i=0; i<2; i++) for (j=0; j<5; j++) { GenerateString(namebuf, "ide%x%.2x", i, j); dnt_add(namebuf, DEV_IDE + ((j << 8) + i)); } #endif /* SC_DEV_IDE && BSP_IDE */ /*-----------------------------------------------------------------*/ /* There is only one parallel driver in the system. Make a name */ /* for it. */ /*-----------------------------------------------------------------*/ #if SC_DEV_PARALLEL dnt_add("printer", DEV_PARALLEL); #endif /* SC_DEV_PARALLEL */ /*-----------------------------------------------------------------*/ /* Add the names for the first and second floppy drives in the */ /* system. */ /*-----------------------------------------------------------------*/ #if SC_DEV_FLOPPY && BSP_FLOPPY dnt_add("rfd0", DEV_FLOPPY); dnt_add("rfd1", (DEV_FLOPPY) | 1); #endif /* SC_DEV_FLOPPY */ /*-----------------------------------------------------------------*/ /* There is only one watchdog driver in the system. Make a name */ /* for it. */ /*-----------------------------------------------------------------*/ #if SC_DEV_WATCHDOG dnt_add("watchdog", DEV_WATCHDOG); #endif /* SC_DEV_WATCHDOG */ /*-----------------------------------------------------------------*/ /* There is only one cmos driver in the system. Make a name for it.*/ /*-----------------------------------------------------------------*/ #if SC_DEV_CMOS dnt_add("cmos", DEV_CMOS); #endif /* SC_DEV_CMOS */ /*-----------------------------------------------------------------*/ /* Make default names for the TFTP pseudo device. Add names for */ /* the eight channels supported by default. If the number of */ /* channels supported is changed, add or subtract names as needed. */ /*-----------------------------------------------------------------*/ #if SC_DEV_TFTP for (i=0; i<SC_MAX_TFTP_CHAN; i++) { GenerateString(namebuf, "tftp%x", i); dnt_add(namebuf, DEV_TFTP + i); } #endif /* SC_DEV_TFTP */ /*-----------------------------------------------------------------*/ /* There is only one "Pseudo" driver in the system. Make a name */ /* for it. */ /*-----------------------------------------------------------------*/ #if SC_DEV_PSEUDO dnt_add("pseudo", DEV_PSEUDO); #endif /* SC_DEV_PSEUDO */ #if (SC_DEV_DLPI || SC_DEV_PPP || SC_DEV_SLIP) *-----------------------------------------------------------------*/ /* There is only one enetdlpi driver in the system. Make a name for it.*/ /*-----------------------------------------------------------------*/ #if SC_DEV_DLPI dnt_add("dlpi", DEV_DLPI); #endif /* SC_DEV_DLPI */ /*-----------------------------------------------------------------*/ /* There is only one enetslip driver in the system. Make a name for it.*/ /*-----------------------------------------------------------------*/ #if SC_DEV_DLPI_SLIP dnt_add("dlslip", DEV_DLPI_SLIP); #endif /* SC_DEV_DLPI_SLIP */ /*-----------------------------------------------------------------*/ /* There is only one enetppp driver in the system. Make a name for it.*/ /*-----------------------------------------------------------------*/ #if SC_DEV_DLPI_PPP dnt_add("dlppp", DEV_DLPI_PPP); #endif /* SC_DEV_DLPI_PPP */ #endif#if (SC_DEV_LOG) dnt_add("log", DEV_LOG);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -