Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ttc

Media Vault

Software Library

Restoration Projects

Artifacts Sought

ttc

[Previous] [Contents] [Index] [Next]

ttc()

Controls the terminal

Synopsis:

#include <sys/io-char.h >

int ttc(int type,
        void *ptr,
        int arg );

Arguments:

type
One of:
  • TTC_INIT_PROC -- allocates and configures the basic resources which are shared by all terminal sessions
  • TTC_INIT_CC -- configures the character codes for the terminal
  • TTC_INIT_RAW -- set the terminal into RAW mode
  • TTC_INIT_EDIT -- set the terminal into EDIT i.e. "cooked" mode
  • TTC_SET_OPTION -- pass the standard terminal configuration options to io-char library for handling.

    If opt is found in the common string of options, IO_CHAR_COMMON_OPTIONS, the handler string returns 0. If opt is not found, it returns the opt back.

  • TTC_INIT_START -- allow the driver to start accepting messages
  • TTC_INIT_TTYNAME -- sets up the device name based on the unit number passed in and must be called before TTC_INIT_POWER and TTC_INIT_ATTACH
  • TTC_INIT_POWER -- initializes power management related data structures to defaults (ACTIVE mode only). The driver's call to TTC_INIT_POWER is mandatory.

    TTC_INIT_POWER must be called before any calls to io-char functions such as tti(), or before interrupt handlers are attached.

    This type must also be called after TTC_INIT_TTYNAME and before TTC_INIT_ATTACH. For power managed device drivers, the iochar_regdrv_power() function should be called prior to calling TTC_INIT_POWER.

  • TTC_INIT_ATTACH -- attaches the resource manager to the name initialized by TTC_INIT_TTYNAME
  • TTC_TIMER_QUEUE -- register to receive an event once a timer expires
  • TTC_INIT_PTY -- needed by devc-pty only. Do not use.
ptr
A pointer to the structure which will be updated with the new configuration data. Depending on the type argument, this argument will be a pointer to a structure of type TTYCTRL, TTYDEV, or TTYINIT.
arg
Data which describes the new setting. The values which are valid for this argument vary depending on the type argument.

Description:

This function configures the terminal's settings.

Returns:

0
Success.
-1
An error occurred.

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread No

See also:

tti(), tto(), TTYDEV


[Previous] [Contents] [Index] [Next]

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026