📄 winsio.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/winSio.html - generated by refgen from winSio.c --> <title> winSio </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual : Libraries</i></a></p></blockquote><h1>winSio</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>winSio</strong> - win serial driver </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./winSio.html#winDevInit">winDevInit</a></i>( )</b> - initialize a <b>WIN_CHAN</b><br><b><i><a href="./winSio.html#winDevInit2">winDevInit2</a></i>( )</b> - initialize a <b>WIN_CHAN</b>, part 2<br><b><i><a href="./winSio.html#winIntRcv">winIntRcv</a></i>( )</b> - handle a channel's receive-character interrupt<br><b><i><a href="./winSio.html#winIntTx">winIntTx</a></i>( )</b> - transmit a single character.<br><b><i><a href="./unixSio.html#dummyCallback">dummyCallback</a></i>( )</b> - dummy callback routine<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This is the console serial driver for the Windows simulator. It recieves character interrupts from Windows and send them off to vxWorks.<p>Device data structures are defined in the header file <b>h/drv/sio/winSio.h</b>.A device data structure, <b>WIN_CHAN</b>, is defined for each channel.<p></blockquote><h4>USAGE</h4><blockquote><p>The driver is typically only called only by the BSP. The directly callableroutines in this module are <b><i><a href="./winSio.html#winDevInit">winDevInit</a></i>( )</b>, <b><i><a href="./winSio.html#winDevInit2">winDevInit2</a></i>( )</b>,<b><i><a href="./winSio.html#winIntRcv">winIntRcv</a></i>( )</b> and <b><i><a href="./winSio.html#winIntTx">winIntTx</a></i>( )</b>.<p>The BSP calls <b><i><a href="./winSio.html#winDevInit">winDevInit</a></i>( )</b> to initialize or reset the device.It connects the driver's interrupt handlers (winIntRcv and winIntTx)using <b><i><a href="./intArchLib.html#intConnect">intConnect</a></i>( )</b>.After connecting the interrupt handlers, the BSP calls <b><i><a href="./winSio.html#winDevInit2">winDevInit2</a></i>( )</b>to inform the driver that interrupt mode operation is now possible.<p></blockquote><h4>BSP</h4><blockquote><p>By convention all the BSP-specific serial initialization is performed ina file called <b>sysSerial.c</b>, which is #include'ed by <b>sysLib.c</b>.<b>sysSerial.c</b> implements at least four functions, <b><i><a href="./sysLib.html#sysSerialHwInit">sysSerialHwInit</a></i>( )</b><b><i><a href="./sysLib.html#sysSerialHwInit2">sysSerialHwInit2</a></i>( )</b>, <b><i><a href="./sysLib.html#sysSerialChanGet">sysSerialChanGet</a></i>( )</b>, and <b><i><a href="./sysLib.html#sysSerialReset">sysSerialReset</a></i>( )</b>, which work as follows:<p>sysSerialHwInit is called by sysHwInit to initialize the serial devices.This routine will initialize all the board specific fields in the<b>WIN_CHAN</b> structure (e.g., register I/O addresses, etc) beforecalling <b><i><a href="./winSio.html#winDevInit">winDevInit</a></i>( )</b>, which resets the device and installs the driverfunction pointers. <b><i><a href="./sysLib.html#sysSerialHwInit">sysSerialHwInit</a></i>( )</b> should also perform any other processingwhich is needed for the serial drivers, such as configuring on-boardinterrupt controllers as appropriate.<p>sysSerialHwInit2 is called by sysHwInit2 to connect the serial driver'sinterrupt handlers using <b><i><a href="./intArchLib.html#intConnect">intConnect</a></i>( )</b>. After connecting the interrupthandlers, the call to <b><i><a href="./winSio.html#winDevInit2">winDevInit2</a></i>( )</b> is made to permit interruptmode operations to begin.<p>sysSerialChanGet is called by usrRoot to get the serial channel descriptorassociated with a serial channel number. The routine takes a single parameterwhich is a channel number ranging between zero and <b>NUM_TTY</b>. It returnsa pointer to the corresponding channel descriptor, <b>SIO_CHAN</b> *, which isjust the address of the <b>WIN_CHAN</b> structure.<p>sysSerialReset is called from <b><i><a href="./sysLib.html#sysToMonitor">sysToMonitor</a></i>( )</b> and should reset the serialdevices to an inactive state.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><p><b>drv/sio/winSio.h</b> <b>sioLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./winSio.html#top">winSio</a></b><hr><a name="winDevInit"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>winDevInit</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>winDevInit</i>( )</strong> - initialize a <b>WIN_CHAN</b></p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void winDevInit ( WIN_CHAN * pChan )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the driverfunction pointers and then resets the chip in a quiescent state.The BSP must have already initialized all the device addresses and thebaudFreq fields in the <b>WIN_CHAN</b> structure before passing it tothis routine.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./winSio.html#top">winSio</a></b><hr><a name="winDevInit2"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>winDevInit2</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>winDevInit2</i>( )</strong> - initialize a <b>WIN_CHAN</b>, part 2</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void winDevInit2 ( WIN_CHAN * pChan /* device to initialize */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine is called by the BSP after interrupts have been connected.The driver can now operate in interrupt mode. Before this routine iscalled only polled mode operations should be allowed.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>ARGSUSED</h4><blockquote><p>SEE ALSO<b><a href="./winSio.html#top">winSio</a></b><hr><a name="winIntRcv"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>winIntRcv</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>winIntRcv</i>( )</strong> - handle a channel's receive-character interrupt</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void winIntRcv ( WIN_CHAN * pChan, /* channel generating the interrupt */ UINT16 wparam /* message args get passed if you look */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function is attached to the simulator's interrupt handler, andpasses the character received in the message to the callback.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./winSio.html#top">winSio</a></b><hr><a name="winIntTx"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>winIntTx</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>winIntTx</i>( )</strong> - transmit a single character.</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void winIntTx ( WIN_CHAN * pChan /* channel generating the interrupt */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This displays a single character to the simulator's window.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./winSio.html#top">winSio</a></b><hr><a name="dummyCallback"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>dummyCallback</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>dummyCallback</i>( )</strong> - dummy callback routine</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS dummyCallback (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p></blockquote><h4>RETURNS</h4><blockquote><p>ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./winSio.html#top">winSio</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -