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

📄 syslib.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 5 页
字号:
OK always.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b><hr><a name="pciConfigBdfPack"></a><p align=right><a href="rtnIndex.html"><i>pcPentium :  Routines</i></a></p></blockquote><h1><i>pciConfigBdfPack</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pciConfigBdfPack</i>(&nbsp;)</strong> - pack parameters for the Configuration Address Register</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int pciConfigBdfPack    (    int busNo,    /* bus number */    int deviceNo, /* device number */    int funcNo    /* function number */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine packs three parameters into one integer for accessing theConfiguration Address Register<p></blockquote><h4>RETURNS</h4><blockquote><p>packed integer encoded version of bus, device, and function numbers.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b><hr><a name="pciConfigInByte"></a><p align=right><a href="rtnIndex.html"><i>pcPentium :  Routines</i></a></p></blockquote><h1><i>pciConfigInByte</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pciConfigInByte</i>(&nbsp;)</strong> - read one byte from the PCI configuration space</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS pciConfigInByte    (    int     busNo,    /* bus number */    int     deviceNo, /* device number */    int     funcNo,   /* function number */    int     offset,   /* offset into the configuration space */    UINT8 * pData     /* data read from the offset */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine reads one byte from the PCI configuration space<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if this library is not initialized</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b><hr><a name="pciConfigInWord"></a><p align=right><a href="rtnIndex.html"><i>pcPentium :  Routines</i></a></p></blockquote><h1><i>pciConfigInWord</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pciConfigInWord</i>(&nbsp;)</strong> - read one word from the PCI configuration space</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS pciConfigInWord    (    int      busNo,    /* bus number */    int      deviceNo, /* device number */    int      funcNo,   /* function number */    int      offset,   /* offset into the configuration space */    UINT16 * pData     /* data read from the offset */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine reads one word from the PCI configuration space<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if this library is not initialized</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b><hr><a name="pciConfigInLong"></a><p align=right><a href="rtnIndex.html"><i>pcPentium :  Routines</i></a></p></blockquote><h1><i>pciConfigInLong</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pciConfigInLong</i>(&nbsp;)</strong> - read one longword from the PCI configuration space</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS pciConfigInLong    (    int      busNo,    /* bus number */    int      deviceNo, /* device number */    int      funcNo,   /* function number */    int      offset,   /* offset into the configuration space */    UINT32 * pData     /* data read from the offset */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine reads one longword from the PCI configuration space<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if this library is not initialized</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b><hr><a name="pciConfigOutByte"></a><p align=right><a href="rtnIndex.html"><i>pcPentium :  Routines</i></a></p></blockquote><h1><i>pciConfigOutByte</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pciConfigOutByte</i>(&nbsp;)</strong> - write one byte to the PCI configuration space</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS pciConfigOutByte    (    int   busNo,    /* bus number */    int   deviceNo, /* device number */    int   funcNo,   /* function number */    int   offset,   /* offset into the configuration space */    UINT8 data      /* data written to the offset */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine writes one byte to the PCI configuration space.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if this library is not initialized</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b><hr><a name="pciConfigOutWord"></a><p align=right><a href="rtnIndex.html"><i>pcPentium :  Routines</i></a></p></blockquote><h1><i>pciConfigOutWord</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pciConfigOutWord</i>(&nbsp;)</strong> - write one 16-bit word to the PCI configuration space</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS pciConfigOutWord    (    int    busNo,    /* bus number */    int    deviceNo, /* device number */    int    funcNo,   /* function number */    int    offset,   /* offset into the configuration space */    UINT16 data      /* data written to the offset */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine writes one 16-bit word to the PCI configuration space.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if this library is not initialized</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b><hr><a name="pciConfigOutLong"></a><p align=right><a href="rtnIndex.html"><i>pcPentium :  Routines</i></a></p></blockquote><h1><i>pciConfigOutLong</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pciConfigOutLong</i>(&nbsp;)</strong> - write one longword to the PCI configuration space</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS pciConfigOutLong    (    int    busNo,    /* bus number */    int    deviceNo, /* device number */    int    funcNo,   /* function number */    int    offset,   /* offset into the configuration space */    UINT32 data      /* data written to the offset */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine writes one longword to the PCI configuration space.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if this library is not initialized</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b><hr><a name="pciConfigModifyLong"></a><p align=right><a href="rtnIndex.html"><i>pcPentium :  Routines</i></a></p></blockquote><h1><i>pciConfigModifyLong</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pciConfigModifyLong</i>(&nbsp;)</strong> - Perform a masked longword register update</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS pciConfigModifyLong    (    int    busNo,    /* bus number */    int    deviceNo, /* device number */    int    funcNo,   /* function number */    int    offset,   /* offset into the configuration space */    UINT32 bitMask,  /* Mask which defines field to alter */    UINT32 data      /* data written to the offset */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function writes a field into a PCI configuration header withoutaltering any bits not present in the field.  It does this by firstdoing a PCI configuration read (into a temporary location) of the PCIconfiguration header word which contains the field to be altered.It then alters the bits in the temporary location to match the desiredvalue of the field.  It then writes back the temporary location witha configuration write.  All configuration accesses are long and thefield to alter is specified by the "1" bits in the <b>bitMask</b> parameter.<p>Be careful to using pciConfigModifyLong for updating the Command andstatus register.  The status bits must be written back as zeroes, elsethey will be cleared.  Proper use involves including the status bits inthe mask value, but setting their value to zero in the data value.<p>The following example will set the <b>PCI_CMD_IO_ENABLE</b> bit without clearing anystatus bits.  The macro <b>PCI_CMD_MASK</b> includes all the status bits aspart of the mask.  The fact that <b>PCI_CMD_MASTER</b> doesn't include these bits,causes them to be written back as zeroes, therefore they aren't cleared.<p><pre>    pciConfigModifyLong (b,d,f,PCI_CFG_COMMAND,                 (PCI_CMD_MASK | PCI_CMD_IO_ENABLE), PCI_CMD_IO_ENABLE);</pre>Use of explicit longword read and write operations for dealing with anyregister containing "write 1 to clear" bits is sound policy.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK if operation succeeds, ERROR if operation fails.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b><hr><a name="pciConfigModifyWord"></a><p align=right><a href="rtnIndex.html"><i>pcPentium :  Routines</i></a></p></blockquote><h1><i>pciConfigModifyWord</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pciConfigModifyWord</i>(&nbsp;)</strong> - Perform a masked longword register update</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS pciConfigModifyWord    (    int    busNo,    /* bus number */    int    deviceNo, /* device number */    int    funcNo,   /* function number */    int    offset,   /* offset into the configuration space */    UINT16 bitMask,  /* Mask which defines field to alter */    UINT16 data      /* data written to the offset */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function writes a field into a PCI configuration header withoutaltering any bits not present in the field.  It does this by firstdoing a PCI configuration read (into a temporary location) of the PCIconfiguration header word which contains the field to be altered.It then alters the bits in the temporary location to match the desiredvalue of the field.  It then writes back the temporary location witha configuration write.  All configuration accesses are long and thefield to alter is specified by the "1" bits in the <b>bitMask</b> parameter.<p>Do not use this routine to modify any register that contains <b>write 1to clear</b> type of status bits in the same longword.  This specificallyapplies to the command register.  Modify byte operations could potentiallybe implemented as longword operations with bit shifting and masking.  Thiscould have the effect of clearing status bits in registers that aren't beingupdated.  Use pciConfigInLong and pciConfigOutLong, or pciModifyLong,to read and update the entire longword.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK if operation succeeds.  ERROR if operation fails.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b><hr><a name="pciConfigModifyByte"></a><p align=right><a href="rtnIndex.html"><i>pcPentium :  Routines</i></a></p></blockquote><h1><i>pciConfigModifyByte</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>pciConfigModifyByte</i>(&nbsp;)</strong> - Perform a masked longword register update</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS pciConfigModifyByte    (    int   busNo,    /* bus number */    int   deviceNo, /* device number */    int   funcNo,   /* function number */    int   offset,   /* offset into the configuration space */    UINT8 bitMask,  /* Mask which defines field to alter */    UINT8 data      /* data written to the offset */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function writes a field into a PCI configuration header withoutaltering any bits not present in the field.  It does this by firstdoing a PCI configuration read (into a temporary location) of the PCIconfiguration header word which contains the field to be altered.It then alters the bits in the temporary location to match the desiredvalue of the field.  It then writes back the temporary location witha configuration write.  All configuration accesses are long and thefield to alter is specified by the "1" bits in the <b>bitMask</b> parameter.<p>Do not use this routine to modify any register that contains <b>write 1to clear</b> type of status bits in the same longword.  This specificallyapplies to the command register.  Modify byte operations could potentiallybe implemented as longword operations with bit shifting and masking.  Thiscould have the effect of clearing status bits in registers that aren't beingupdated.  Use pciConfigInLong and pciConfigOutLong, or pciModifyLong,to read and update the entire longword.<p></blockquote><h4>RETURNS</h4><blockquote><p>

⌨️ 快捷键说明

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