📄 syslib.html
字号:
<b><a href="./sysLib.html#top">sysLib</a></b>, and BSP-specific reference pages for this routine.<hr><a name="sysScsiConfig"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>sysScsiConfig( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>sysScsiConfig( )</strong> - system SCSI configuration</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS sysScsiConfig (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This is an example SCSI configuration routine.<p>Most of the code found here is an example of how to declare a SCSIperipheral configuration. You must edit this routine to reflect theactual configuration of your SCSI bus.This example can also be found in <b>src/config/usrScsi.c</b>.<p>If you are just getting started, you can test your hardware configurationby defining <b>SCSI_AUTO_CONFIG</b>, which will probe the bus anddisplay all devices found. No device should have the same SCSI bus ID asyour VxWorks SCSI port (default = 7), or the same as any other device.Check for proper bus termination.<p>There are three configuration examples here. Theydemonstrate configuration of a SCSI hard disk (any type), an OMTI 3500 floppy disk, and a tape drive (any type).<p></blockQuote><h4>Hard Disk</h4><blockQuote>The hard disk is divided into two 32-Mbyte partitions and a thirdpartition with the remainder of the disk. The first partition is initializedas a dosFs device. The second and third partitions are initialized asrt11Fs devices, each with 256 directory entries.<p>It is recommended that the first partition (<b>BLK_DEV</b>) on a block device bea dosFs device, if the intention is eventually to boot VxWorks from thedevice. This will simplify the task considerably.<p></blockQuote><h4>Floppy Disk</h4><blockQuote>The floppy, since it is a removable medium device, is allowed to have only asingle partition, and dosFs is the file system of choice for this device,since it facilitates media compatibility with IBM PC machines.<p>In contrast to the hard disk configuration, the floppysetup in this example is more intricate. Note that the<b><a href="./scsiLib.html#scsiPhysDevCreate">scsiPhysDevCreate</a>( )</b> call is issued twice. The first time is merely to geta "handle" to pass to <b><a href="./scsiLib.html#scsiModeSelect">scsiModeSelect</a>( )</b>, since the defaultmedia type is sometimes inappropriate (in the case of genericSCSI-to-floppy cards). After the hardware is correctly configured, thehandle is discarded via <b><a href="./scsiLib.html#scsiPhysDevDelete">scsiPhysDevDelete</a>( )</b>, after which theperipheral is correctly configured by a second call to <b><a href="./scsiLib.html#scsiPhysDevCreate">scsiPhysDevCreate</a>( )</b>.(Before the <b><a href="./scsiLib.html#scsiModeSelect">scsiModeSelect</a>( )</b> call, the configuration information wasincorrect.) Note that after the <b><a href="./scsiLib.html#scsiBlkDevCreate">scsiBlkDevCreate</a>( )</b> call, thecorrect values for <i>sectorsPerTrack</i> and <i>nHeads</i> must be set via<b><a href="./scsiLib.html#scsiBlkDevInit">scsiBlkDevInit</a>( )</b>. This is necessary for IBM PC compatibility.<p></blockQuote><h4>Tape Drive</h4><blockQuote>The tape configuration is also somewhat complex because certain device parameters need to turned off within VxWorks and thefixed-block size needs to be defined, assuming that the tapesupports fixed blocks.<p>The last parameter to the <b>dosFsDevInit( )</b> call is a pointer to a<b>DOS_VOL_CONFIG</b> structure. By specifying NULL, you are asking<b>dosFsDevInit( )</b> to read this information off the disk in the drive. Thismay fail if no disk is present or if the disk has no valid dosFsdirectory. Should this be the case, you can use the <b>dosFsMkfs( )</b> command tocreate a new directory on a disk. This routine uses default parameters(see <b><a href="./dosFsLib.html#top">dosFsLib</a></b>) that may not be suitable for your application, in whichcase you should use <b>dosFsDevInit( )</b> with a pointer to a valid <b>DOS_VOL_CONFIG</b>structure that you have created and initialized. If <b>dosFsDevInit( )</b> isused, a <b><a href="./usrFsLib.html#diskInit">diskInit</a>( )</b> call should be made to write a new directory on thedisk, if the disk is blank or disposable.<p></blockquote><h4>NOTE</h4><blockquote><p>The variable <b>pSbdFloppy</b> is global to allow the above calls to bemade from the VxWorks shell, for example:<p><pre> -> dosFsMkfs "/fd0/", pSbdFloppy</pre>If a disk is new, use <b><a href="./usrFsLib.html#diskFormat">diskFormat</a>( )</b> to format it.<p></blockquote><h4>NOTE </h4><blockquote><p>This is a generic page for a BSP-specific routine; thisdescription contains general information only. To determine if thisroutine is supported by your BSP, or for information specific to yourBSP's version of this routine, see the reference pages for your BSP.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b>, and BSP-specific reference pages for this routine.<p><hr><a name="sysLocalToBusAdrs"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>sysLocalToBusAdrs( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>sysLocalToBusAdrs( )</strong> - convert a local address to a bus address</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS sysLocalToBusAdrs ( int adrsSpace, /* bus address space in which busAdrs resides */ char * localAdrs, /* local address to convert */ char * *pBusAdrs /* where to return bus address */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets the bus address that accesses a specified localmemory address.<p></blockquote><h4>NOTE </h4><blockquote><p>This is a generic page for a BSP-specific routine; thisdescription contains general information only. To determine if thisroutine is supported by your BSP, or for information specific to yourBSP's version of this routine, see the reference pages for your BSP.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the address space is unknown or not mapped.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b>, <b><a href="./sysLib.html#sysBusToLocalAdrs">sysBusToLocalAdrs</a>( )</b>, and BSP-specific reference pages for this routine.<hr><a name="sysBusToLocalAdrs"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>sysBusToLocalAdrs( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>sysBusToLocalAdrs( )</strong> - convert a bus address to a local address</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS sysBusToLocalAdrs ( int adrsSpace, /* bus address space in which busAdrs resides */ char * busAdrs, /* bus address to convert */ char * *pLocalAdrs /* where to return local address */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets the local address that accesses a specified busmemory address.<p></blockquote><h4>NOTE </h4><blockquote><p>This is a generic page for a BSP-specific routine; thisdescription contains general information only. To determine if thisroutine is supported by your BSP, or for information specific to yourBSP's version of this routine, see the reference pages for your BSP.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the address space is unknown or the mapping is notpossible.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b>, <b><a href="./sysLib.html#sysLocalToBusAdrs">sysLocalToBusAdrs</a>( )</b>, and BSP-specific reference pages for this routine.<hr><a name="sysSerialHwInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>sysSerialHwInit( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>sysSerialHwInit( )</strong> - initialize the BSP serial devices to a quiesent state</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void sysSerialHwInit (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the BSP serial device descriptors and puts thedevices in a quiesent state. It is called from <b><a href="./sysLib.html#sysHwInit">sysHwInit</a>( )</b> withinterrupts locked.<p></blockquote><h4>NOTE </h4><blockquote><p>This is a generic page for a BSP-specific routine; thisdescription contains general information only. To determine if thisroutine is supported by your BSP, or for information specific to yourBSP's version of this routine, see the reference pages for your BSP.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b>, and BSP-specific reference pages for this routine.<hr><a name="sysSerialHwInit2"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>sysSerialHwInit2( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>sysSerialHwInit2( )</strong> - connect BSP serial device interrupts</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void sysSerialHwInit2 (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine connects the BSP serial device interrupts. It is called from<b><a href="../bsp/ads8260/sysLib.html#sysHwInit2" >sysHwInit2</a>( )</b>. Serial device interrupts could not be connected in<b><a href="./sysLib.html#sysSerialHwInit">sysSerialHwInit</a>( )</b> because the kernel memory allocator was not initializedat that point, and <b><a href="./intArchLib.html#intConnect">intConnect</a>( )</b> calls <b><a href="./memPartLib.html#malloc">malloc</a>( )</b>.<p></blockquote><h4>NOTE </h4><blockquote><p>This is a generic page for a BSP-specific routine; thisdescription contains general information only. To determine if thisroutine is supported by your BSP, or for information specific to yourBSP's version of this routine, see the reference pages for your BSP.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b>, and BSP-specific reference pages for this routine.<hr><a name="sysSerialReset"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>sysSerialReset( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>sysSerialReset( )</strong> - reset all SIO devices to a quiet state</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void sysSerialReset (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine is called from <b><a href="./sysLib.html#sysToMonitor">sysToMonitor</a>( )</b> to reset all SIO device and prevent them from generating interrupts or performing DMA cycles.<p></blockquote><h4>NOTE </h4><blockquote><p>This is a generic page for a BSP-specific routine; thisdescription contains general information only. To determine if thisroutine is supported by your BSP, or for information specific to yourBSP's version of this routine, see the reference pages for your BSP.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b>, and BSP-specific reference pages for this routine.<hr><a name="sysSerialChanGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>sysSerialChanGet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>sysSerialChanGet( )</strong> - get the <b>SIO_CHAN</b> device associated with a serial channel</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>SIO_CHAN * sysSerialChanGet ( int channel /* serial channel */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets the <b>SIO_CHAN</b> device associated with a specified serialchannel.<p></blockquote><h4>NOTE </h4><blockquote><p>This is a generic page for a BSP-specific routine; thisdescription contains general information only. To determine if thisroutine is supported by your BSP, or for information specific to yourBSP's version of this routine, see the reference pages for your BSP.<p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to the <b>SIO_CHAN</b> structure for the channel, or ERRORif the channel is invalid.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b>, and BSP-specific reference pages for this routine.<hr><a name="sysNanoDelay"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>sysNanoDelay( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>sysNanoDelay( )</strong> - delay for specified number of nanoseconds</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void sysNanoDelay ( UINT32 nanoseconds /* nanoseconds to delay */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This is an optional API for BSPs to provide. Some, but not all, drivers dorequire the BSP to implement this function.<p>When implemented, this function implements a spin loop type delay for atleast the specified number of nanoseconds. This is not a task delay,control of the processor is not given up to another task. The actual delaymust be equal to or greater than the requested number of nanoseconds.<p>The purpose of this function is to provide a reasonably accurate time delayof very short duration. It should not be used for any delays that are muchgreater than two system clock ticks in length. For delays of a full clocktick, or more, the use of <b><a href="./taskLib.html#taskDelay">taskDelay</a>( )</b> is recommended.<p>This routine should be implemented as interrupt safe.<p></blockquote><h4>NOTE </h4><blockquote><p>This is a generic page for a BSP-specific routine; thisdescription contains general information only. To determine if thisroutine is supported by your BSP, or for information specific to yourBSP's version of this routine, see the reference pages for your BSP.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b>, and BSP-specific reference pages for this routine.</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -