RTEMS
Files | Classes | Typedefs | Enumerations | Functions
Termios

Termios. More...

Files

file  termiosinitialize.c
 Termios Initialization.
 

Classes

struct  rtems_termios_callbacks
 

Typedefs

typedef struct rtems_termios_callbacks rtems_termios_callbacks
 
typedef rtems_termios_iproc_status_code(* rtems_termios_isig_handler) (unsigned char c, struct rtems_termios_tty *tty)
 Type for ISIG (VINTR/VKILL) handler. More...
 

Enumerations

enum  rtems_termios_iproc_status_code { RTEMS_TERMIOS_IPROC_CONTINUE, RTEMS_TERMIOS_IPROC_INTERRUPT, RTEMS_TERMIOS_IPROC_DONE }
 The status code returned by all Termios input processing (iproc) functions and input signal (isig) handlers. More...
 

Functions

static __inline__ void rtems_termios_initialize (void)
 
rtems_status_code rtems_termios_bufsize (size_t cbufsize, size_t raw_input, size_t raw_output)
 
rtems_termios_iproc_status_code rtems_termios_default_isig_handler (unsigned char c, struct rtems_termios_tty *tty)
 Default handler for ISIG (VINTR/VKILL) More...
 
rtems_termios_iproc_status_code rtems_termios_posix_isig_handler (unsigned char c, struct rtems_termios_tty *tty)
 POSIX handler for ISIG (VINTR/VKILL) More...
 
rtems_status_code rtems_termios_register_isig_handler (rtems_termios_isig_handler handler)
 Register handler for ISIG (VINTR/VKILL) More...
 
int rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
 
rtems_status_code rtems_termios_open (rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks)
 
rtems_status_code rtems_termios_close (void *arg)
 
rtems_status_code rtems_termios_read (void *arg)
 
rtems_status_code rtems_termios_write (void *arg)
 
rtems_status_code rtems_termios_ioctl (void *arg)
 
int rtems_termios_dequeue_characters (void *ttyp, int len)
 

Detailed Description

Termios.

Typedef Documentation

◆ rtems_termios_isig_handler

typedef rtems_termios_iproc_status_code(* rtems_termios_isig_handler) (unsigned char c, struct rtems_termios_tty *tty)

Type for ISIG (VINTR/VKILL) handler.

This type defines the interface to a method which will process VKILL and VINTR characters. The user can register a handler to override the default behavior which is to take no special action on these characters. The POSIX required behavior is to generate a SIGINTR or SIGQUIT signal. This behavior is implemented if the user registers the rtems_termios_posix_isig_handler().

Parameters
ccharacter that was input
ttytermios structure pointer for this input tty
Returns
The value returned is according to that documented for rtems_termios_iproc_status_code.

Definition at line 1955 of file libio.h.

Enumeration Type Documentation

◆ rtems_termios_iproc_status_code

The status code returned by all Termios input processing (iproc) functions and input signal (isig) handlers.

Enumerator
RTEMS_TERMIOS_IPROC_CONTINUE 

This status indicates that the input processing can continue.

Input signal handlers shall return this status if no signal was raised and the input processing can continue.

RTEMS_TERMIOS_IPROC_INTERRUPT 

This status indicates that the input processing should stop due to a signal.

This indicates that the character was processed and determined to be one that requires a signal to be raised (e.g. VINTR or VKILL). The tty must be in the right Termios mode for this to occur. There is no further processing of this character required and the pending read() operation should be interrupted.

RTEMS_TERMIOS_IPROC_DONE 

This status indicates that the input processing is done.

This status shall not be returned by input processing signal handlers.

Definition at line 1910 of file libio.h.

Function Documentation

◆ rtems_termios_default_isig_handler()

rtems_termios_iproc_status_code rtems_termios_default_isig_handler ( unsigned char  c,
struct rtems_termios_tty tty 
)

Default handler for ISIG (VINTR/VKILL)

This handler is installed by default by termios. It performs no actions on receiving the VINTR and VKILL characters. This is not POSIX conformant behavior but is the historical RTEMS behavior and avoid any default dependency on signal processing code.

Parameters
ccharacter that was input
ttytermios structure pointer for this input tty

The installed ISIG handler is only invoked if the character is (VKILL or VINTR) and ISIG is enabled. Thus the handler need only check the character and perform the appropriate action.

Returns
The value returned is according to that documented for all methods adhering to rtems_termios_isig_handler.

◆ rtems_termios_posix_isig_handler()

rtems_termios_iproc_status_code rtems_termios_posix_isig_handler ( unsigned char  c,
struct rtems_termios_tty tty 
)

POSIX handler for ISIG (VINTR/VKILL)

This handler is installed by the used to obtain POSIX behavior upon receiving the VINTR and VKILL characters. The POSIX required behavior is to generate a SIGINTR or SIGQUIT signal if ISIG is enabled.

Parameters
ccharacter that was input
ttytermios structure pointer for this input tty
Returns
The value returned is according to that documented for all methods adhering to rtems_termios_isig_handler.

◆ rtems_termios_register_isig_handler()

rtems_status_code rtems_termios_register_isig_handler ( rtems_termios_isig_handler  handler)

Register handler for ISIG (VINTR/VKILL)

This method is invoked to install an ISIG handler. This may be used to install rtems_termios_posix_isig_handler() to obtain POSIX behavior or a custom handler. The handler rtems_termios_default_isig_handler() is installed by default.

Parameters
handlerentry point of the new ISIG handler
Return values
RTEMS_SUCCESSFULif successful or error code if unsuccessful.