📄 tylib.html
字号:
</blockquote><h1>tyDevRemove( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>tyDevRemove( )</strong> - remove the tty device descriptor</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tyDevRemove ( TY_DEV_ID pTyDev /* ptr to tty dev descriptor to remove */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine removes an existing tty device descriptor. It releases theread and write buffers and the descriptor data structure.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if expected data structures are not found</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tyLib.html#top">tyLib</a></b><hr><a name="tyAbortFuncSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>tyAbortFuncSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>tyAbortFuncSet( )</strong> - set the abort function</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void tyAbortFuncSet ( FUNCPTR func /* routine to call when abort char received */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the function that will be called when the abortcharacter is received on a tty. There is only one global abort function,used for any tty on which <b>OPT_ABORT</b> is enabled. When the abort character isreceived from a tty with <b>OPT_ABORT</b> set, the function specified in <i>func</i> willbe called, with no parameters, from interrupt level.<p>Setting an abort function of NULL will disable the abort function.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tyLib.html#top">tyLib</a></b>, <b><a href="./tyLib.html#tyAbortSet">tyAbortSet</a>( )</b><hr><a name="tyAbortSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>tyAbortSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>tyAbortSet( )</strong> - change the abort character</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void tyAbortSet ( char ch /* char to be abort */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the abort character to <i>ch</i>.The default abort character is CTRL-C.<p>Typing the abort character to any device whose <b>OPT_ABORT</b> option is setwill cause the shell task to be killed and restarted.Note that the character set by this routine applies to all deviceswhose handlers use the standard tty package <b><a href="./tyLib.html#top">tyLib</a></b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tyLib.html#top">tyLib</a></b>, <b><a href="./tyLib.html#tyAbortFuncSet">tyAbortFuncSet</a>( )</b><hr><a name="tyBackspaceSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>tyBackspaceSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>tyBackspaceSet( )</strong> - change the backspace character</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void tyBackspaceSet ( char ch /* char to be backspace */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the backspace character to <i>ch</i>.The default backspace character is CTRL-H.<p>Typing the backspace character to any device operating in line protocolmode (<b>OPT_LINE</b> set) will cause the previous character typed to bedeleted, up to the beginning of the current line.Note that the character set by this routine applies to all deviceswhose handlers use the standard tty package <b><a href="./tyLib.html#top">tyLib</a></b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tyLib.html#top">tyLib</a></b><hr><a name="tyDeleteLineSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>tyDeleteLineSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>tyDeleteLineSet( )</strong> - change the line-delete character</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void tyDeleteLineSet ( char ch /* char to be line-delete */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the line-delete character to <i>ch</i>.The default line-delete character is CTRL-U.<p>Typing the delete character to any device operating in line protocolmode (<b>OPT_LINE</b> set) will cause all characters in the currentline to be deleted.Note that the character set by this routine applies to all deviceswhose handlers use the standard tty package <b><a href="./tyLib.html#top">tyLib</a></b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tyLib.html#top">tyLib</a></b><hr><a name="tyEOFSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>tyEOFSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>tyEOFSet( )</strong> - change the end-of-file character</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void tyEOFSet ( char ch /* char to be EOF */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the EOF character to <i>ch</i>.The default EOF character is CTRL-D.<p>Typing the EOF character to any device operating in line protocol mode(<b>OPT_LINE</b> set) will cause no character to be entered in the currentline, but will cause the current line to be terminated (thus without a newlinecharacter). The line is made available to reading tasks. Thus, if the EOFcharacter is the first character input on a line, a line length of zerocharacters is returned to the reader. This is the standard end-of-fileindication on a read call. Note that the EOF character set by this routinewill apply to all devices whose handlers use the standard tty package <b><a href="./tyLib.html#top">tyLib</a></b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tyLib.html#top">tyLib</a></b><hr><a name="tyMonitorTrapSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>tyMonitorTrapSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>tyMonitorTrapSet( )</strong> - change the trap-to-monitor character</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void tyMonitorTrapSet ( char ch /* char to be monitor trap */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the trap-to-monitor character to <i>ch</i>.The default trap-to-monitor character is CTRL-X.<p>Typing the trap-to-monitor character to any device whose <b>OPT_MON_TRAP</b> optionis set will cause the resident ROM monitor to be entered, if one is present.Once the ROM monitor is entered, the normal multitasking system is halted.<p>Note that the trap-to-monitor character set by this routine will apply to alldevices whose handlers use the standard tty package <b><a href="./tyLib.html#top">tyLib</a></b>. Also note thatnot all systems have a monitor trap available.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tyLib.html#top">tyLib</a></b><hr><a name="tyIoctl"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>tyIoctl( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>tyIoctl( )</strong> - handle device control requests</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tyIoctl ( TY_DEV_ID pTyDev, /* ptr to device to control */ int request, /* request code */ int arg /* some argument */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine handles <b><a href="./ioLib.html#ioctl">ioctl</a>( )</b> requests for tty devices. The I/O controlfunctions for tty devices are described in the manual entry for <b><a href="./tyLib.html#top">tyLib</a></b>.<p></blockquote><h4>BUGS</h4><blockquote><p><p>In line protocol mode (<b>OPT_LINE</b> option set), the FIONREAD functionactually returns the number of characters available plus the number oflines in the buffer. Thus, if five lines consisting of just NEWLINEs werein the input buffer, the FIONREAD function would return the value ten(five characters + five lines).<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p>VARARGS2 - not all requests include an arg.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tyLib.html#top">tyLib</a></b><hr><a name="tyWrite"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>tyWrite( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>tyWrite( )</strong> - do a task-level write for a tty device</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int tyWrite ( TY_DEV_ID pTyDev, /* ptr to device structure */ char * buffer, /* buffer of data to write */ int nbytes /* number of bytes in buffer */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine handles the task-level portion of the tty handler'swrite function.<p></blockquote><h4>RETURNS</h4><blockquote><p>The number of bytes actually written to the device.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tyLib.html#top">tyLib</a></b><hr><a name="tyRead"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>tyRead( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>tyRead( )</strong> - do a task-level read for a tty device</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int tyRead ( TY_DEV_ID pTyDev, /* device to read */ char * buffer, /* buffer to read into */ int maxbytes /* maximum length of read */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine handles the task-level portion of the tty handler's readfunction. It reads into the buffer up to <i>maxbytes</i> available bytes.<p>This routine should only be called from serial device drivers.<p></blockquote><h4>RETURNS</h4><blockquote><p>The number of bytes actually read into the buffer.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tyLib.html#top">tyLib</a></b><hr><a name="tyITx"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>tyITx( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>tyITx( )</strong> - interrupt-level output</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tyITx ( TY_DEV_ID pTyDev, /* pointer to tty device descriptor */ char * pChar /* where to put character to be output */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets a single character to be output to a device. It looks atthe ring buffer for <i>pTyDev</i> and gives the caller the next availablecharacter, if there is one. The character to be output is copied to <i>pChar</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>OK if there are more characters to send, orERROR if there are no more characters.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tyLib.html#top">tyLib</a></b><hr><a name="tyIRd"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>tyIRd( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>tyIRd( )</strong> - interrupt-level input</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tyIRd ( TY_DEV_ID pTyDev, /* ptr to tty device descriptor */ char inchar /* character read */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine handles interrupt-level character input for tty devices. Adevice driver calls this routine when it has received a character. Thisroutine adds the character to the ring buffer for the specified device, andgives a semaphore if a task is waiting for it.<p>This routine also handles all the special characters, as specified inthe option word for the device, such as X-on, X-off, NEWLINE, or backspace.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the ring buffer is full.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tyLib.html#top">tyLib</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -