RTEMS 6.1-rc1
Macros | Functions | Variables
termios.c File Reference
#include <rtems.h>
#include <rtems/libio.h>
#include <rtems/imfs.h>
#include <rtems/score/assert.h>
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
#include <sys/fcntl.h>
#include <sys/filio.h>
#include <sys/ttycom.h>
#include <rtems/termiostypes.h>

Macros

#define CBUFSIZE   (rtems_termios_cbufsize)
 
#define RAW_INPUT_BUFFER_SIZE   (rtems_termios_raw_input_size)
 
#define RAW_OUTPUT_BUFFER_SIZE   (rtems_termios_raw_output_size)
 
#define FL_IREQXOF   1U /* input queue requests stop of incoming data */
 
#define FL_ISNTXOF   2U /* XOFF has been sent to other side of line */
 
#define FL_IRTSOFF   4U /* RTS has been turned off for other side.. */
 
#define FL_ORCVXOF   0x10U /* XOFF has been received */
 
#define FL_OSTOP   0x20U /* output has been stopped due to XOFF */
 
#define FL_MDRTS   0x100U /* input controlled with RTS/CTS handshake */
 
#define FL_MDXON   0x200U /* input controlled with XON/XOFF protocol */
 
#define FL_MDXOF   0x400U /* output controlled with XON/XOFF protocol */
 
#define NODISC(n)
 
#define TERMIOS_TXTASK_PRIO   10
 
#define TERMIOS_RXTASK_PRIO   9
 
#define TERMIOS_TXTASK_STACKSIZE   1024
 
#define TERMIOS_RXTASK_STACKSIZE   1024
 
#define TERMIOS_TX_START_EVENT   RTEMS_EVENT_1
 
#define TERMIOS_TX_TERMINATE_EVENT   RTEMS_EVENT_0
 
#define TERMIOS_RX_PROC_EVENT   RTEMS_EVENT_1
 
#define TERMIOS_RX_TERMINATE_EVENT   RTEMS_EVENT_0
 

Functions

rtems_status_code rtems_termios_device_install (const char *device_file, const rtems_termios_device_handler *handler, const rtems_termios_device_flow *flow, rtems_termios_device_context *context)
 Installs a Termios device. More...
 
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_bufsize (size_t cbufsize, size_t raw_input, size_t raw_output)
 
rtems_status_code rtems_termios_ioctl (void *arg)
 
void rtems_termios_puts (const void *_buf, size_t len, struct rtems_termios_tty *tty)
 
rtems_status_code rtems_termios_write (void *arg)
 
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_status_code rtems_termios_register_isig_handler (rtems_termios_isig_handler handler)
 Register handler for ISIG (VINTR/VKILL) More...
 
rtems_status_code rtems_termios_read (void *arg)
 
void rtems_termios_rxirq_occured (struct rtems_termios_tty *tty)
 
int rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
 
int rtems_termios_dequeue_characters (void *ttyp, int len)
 

Variables

struct rtems_termios_linesw rtems_termios_linesw [MAXLDISC]
 
int rtems_termios_nlinesw
 

Detailed Description

TERMIOS serial line support

Macro Definition Documentation

◆ NODISC

#define NODISC (   n)
Value:
{ NULL, NULL, NULL, NULL, \
NULL, NULL, NULL, NULL }
#define NULL
Requests a GPIO pin group configuration.
Definition: xil_types.h:54