TIOCSETN, TIOCSETP
QNX SDP8.0Devctl and Ioctl CommandsDeveloper
Set a terminal's parameters
Synopsis:
#include <sys/ioctl.h>
#define TIOCSETP _IOW('t', 9, struct sgttyb)
#define TIOCSETN _IOW('t',10, struct sgttyb)
Arguments to ioctl():
Argument | Value |
---|---|
fd | A file descriptor that you obtained by opening the device |
request | TIOCSETN or TIOCSETP |
Additional argument | A pointer to a struct sgttyb |
Description:
These commands set a terminal's parameters. TIOCSETP flushes the tty; TIOCSETN doesn't.
Input:
A filled-in struct sgttyb (defined in <sgtty.h>):
struct sgttyb {
char sg_ispeed; /* input speed */
char sg_ospeed; /* output speed */
char sg_erase; /* erase character */
char sg_kill; /* kill character */
int sg_flags; /* mode flags */
};
The mode flags, which are defined in <sys/termio.h> include the following:
- TANDEM — send stopc when the output queue is full.
- CBREAK — half-cooked mode.
- LCASE — simulate lower case.
- CRMOD — map \r to \r\n on output (ONLCR & ICRNL.
- RAW — no I/O processing.
- ODDP — get/send odd parity.
- EVENP — get/send even parity.
- ANYP — get any parity/send none.
as well as the following, which is defined in <termios.h>:
- ECHO — enable echo.
Output:
None.
See also:
ioctl() in the QNX OS C Library Reference
Page updated: