RTEMS 6.1-rc7
Loading...
Searching...
No Matches
Modules | Files | Data Structures | Macros | Typedefs | Enumerations | Enumerator | Functions | Variables
RTEMS Termios Device Support

This group contains the Termios Device Support provided by RTEMS. More...

Modules

 SC16IS752 Serial Device Driver
 

Files

file  termiosdevice.h
 This header file provides the interfaces of the RTEMS Termios Device Support.
 
file  termios_baud2index.c
 Convert Bxxx Constant to Index.
 
file  termios_baud2num.c
 Convert Baud Part of Termios control flags to an integral Baud Value.
 
file  termios_baudtable.c
 RTEMS Termios Baud Table.
 
file  termios_num2baud.c
 Converts the Integral Baud to Termios Control Flag Representation.
 
file  termios_setinitialbaud.c
 Sets the Initial Baud in the Termios Context.
 
file  termiosinitialize.c
 This source file contains the implementation of rtems_termios_device_lock_acquire_default() and rtems_termios_device_lock_release_default().
 

Data Structures

struct  ttywakeup
 
struct  rtems_termios_rawbuf
 
struct  rtems_termios_device_node
 Termios device node for installed devices. More...
 
struct  rtems_termios_tty
 
struct  rtems_termios_linesw
 

Macros

#define TTYDISC   0 /* termios tty line discipline */
 
#define TABLDISC   3 /* tablet discipline */
 
#define SLIPDISC   4 /* serial IP discipline */
 
#define PPPDISC   5 /* PPP discipline */
 
#define MAXLDISC   8
 
#define RTEMS_IO_SNDWAKEUP   _IOW('t', 11, struct ttywakeup ) /* send tty wakeup */
 
#define RTEMS_IO_RCVWAKEUP   _IOW('t', 12, struct ttywakeup ) /* recv tty wakeup */
 
#define OLCUC   0x00000100 /* map lower case to upper case on output */
 
#define IUCLC   0x00004000 /* map upper case to lower case on input */
 
#define RTEMS_TERMIOS_NUMBER_BAUD_RATES   25
 

Typedefs

typedef struct rtems_termios_device_node rtems_termios_device_node
 Termios device node for installed devices.
 
typedef struct rtems_termios_tty rtems_termios_tty
 
typedef uint32_t rtems_termios_baud_t
 

Enumerations

enum  { rob_idle , rob_busy , rob_wait }
 

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.
 
void rtems_termios_set_best_baud (struct termios *term, uint32_t baud)
 Sets the best baud value in the Termios control.
 
void rtems_termios_rxirq_occured (struct rtems_termios_tty *tty)
 
void rtems_termios_puts (const void *buf, size_t len, struct rtems_termios_tty *tty)
 
speed_t rtems_termios_number_to_baud (rtems_termios_baud_t baud)
 Converts the Integral Baud value baud to the Termios Control Flag Representation.
 
rtems_termios_baud_t rtems_termios_baud_to_number (speed_t baud)
 Converts the baud flags to an integral baud value.
 
int rtems_termios_baud_to_index (rtems_termios_baud_t termios_baud)
 Convert Bxxx Constant to Index.
 
int rtems_termios_set_initial_baud (struct rtems_termios_tty *tty, rtems_termios_baud_t baud)
 Sets the initial baud in the Termios context tty.
 
int rtems_termios_kqfilter (rtems_libio_t *iop, struct knote *kn)
 Termios kqueue() filter filesystem node handler.
 
int rtems_termios_mmap (rtems_libio_t *iop, void **addr, size_t len, int prot, off_t off)
 Termios mmap() filter filesystem node handler.
 
int rtems_termios_poll (rtems_libio_t *iop, int events)
 Termios poll() filesystem node handler.
 

Variables

void(* ttywakeup::sw_pfn )(struct termios *tty, void *arg)
 
void * ttywakeup::sw_arg
 
char * rtems_termios_rawbuf::theBuf
 
volatile unsigned int rtems_termios_rawbuf::Head
 
volatile unsigned int rtems_termios_rawbuf::Tail
 
volatile unsigned int rtems_termios_rawbuf::Size
 
rtems_binary_semaphore rtems_termios_rawbuf::Semaphore
 
rtems_chain_node rtems_termios_device_node::node
 
rtems_device_major_number rtems_termios_device_node::major
 
rtems_device_minor_number rtems_termios_device_node::minor
 
const rtems_termios_device_handlerrtems_termios_device_node::handler
 
const rtems_termios_device_flowrtems_termios_device_node::flow
 
rtems_termios_device_contextrtems_termios_device_node::context
 
struct rtems_termios_ttyrtems_termios_device_node::tty
 
struct rtems_termios_ttyrtems_termios_tty::forw
 
struct rtems_termios_ttyrtems_termios_tty::back
 
int rtems_termios_tty::refcount
 
rtems_device_major_number rtems_termios_tty::major
 
rtems_device_minor_number rtems_termios_tty::minor
 
rtems_mutex rtems_termios_tty::isem
 
rtems_mutex rtems_termios_tty::osem
 
char * rtems_termios_tty::cbuf
 
int rtems_termios_tty::ccount
 
int rtems_termios_tty::cindex
 
int rtems_termios_tty::column
 
int rtems_termios_tty::read_start_column
 
struct termios rtems_termios_tty::termios
 
rtems_interval rtems_termios_tty::vtimeTicks
 
struct rtems_termios_rawbuf rtems_termios_tty::rawInBuf
 
bool rtems_termios_tty::rawInBufSemaphoreWait
 
rtems_interval rtems_termios_tty::rawInBufSemaphoreTimeout
 
rtems_interval rtems_termios_tty::rawInBufSemaphoreFirstTimeout
 
unsigned int rtems_termios_tty::rawInBufDropped
 
struct rtems_termios_rawbuf rtems_termios_tty::rawOutBuf
 
int rtems_termios_tty::t_dqlen
 
enum rtems_termios_tty:: { ... }  rtems_termios_tty::rawOutBufState
 
rtems_termios_callbacks rtems_termios_tty::device
 
rtems_termios_device_context rtems_termios_tty::legacy_device_context
 Context for legacy devices using the callbacks.
 
rtems_termios_device_handler rtems_termios_tty::handler
 The device handler.
 
rtems_termios_device_flow rtems_termios_tty::flow
 The device flow control handler.
 
volatile unsigned int rtems_termios_tty::flow_ctrl
 
unsigned int rtems_termios_tty::lowwater
 
unsigned int rtems_termios_tty::highwater
 
rtems_id rtems_termios_tty::rxTaskId
 
rtems_id rtems_termios_tty::txTaskId
 
int rtems_termios_tty::txTaskCharsDequeued
 
int rtems_termios_tty::t_line
 
void * rtems_termios_tty::t_sc
 
struct ttywakeup rtems_termios_tty::tty_snd
 
struct ttywakeup rtems_termios_tty::tty_rcv
 
bool rtems_termios_tty::tty_rcvwakeup
 
rtems_termios_device_nodertems_termios_tty::device_node
 Corresponding device node.
 
rtems_termios_device_contextrtems_termios_tty::device_context
 Context for device driver.
 
int(* rtems_termios_linesw::l_open )(struct rtems_termios_tty *tp)
 
int(* rtems_termios_linesw::l_close )(struct rtems_termios_tty *tp)
 
int(* rtems_termios_linesw::l_read )(struct rtems_termios_tty *tp, rtems_libio_rw_args_t *args)
 
int(* rtems_termios_linesw::l_write )(struct rtems_termios_tty *tp, rtems_libio_rw_args_t *args)
 
int(* rtems_termios_linesw::l_rint )(int c, struct rtems_termios_tty *tp)
 
int(* rtems_termios_linesw::l_start )(struct rtems_termios_tty *tp, int len)
 
int(* rtems_termios_linesw::l_ioctl )(struct rtems_termios_tty *tp, rtems_libio_ioctl_args_t *args)
 
int(* rtems_termios_linesw::l_modem )(struct rtems_termios_tty *tp, int flags)
 
struct rtems_termios_linesw rtems_termios_linesw []
 
int rtems_termios_nlinesw
 
const rtems_assoc_t rtems_termios_baud_table []
 RTEMS Termios Baud Table.
 

Detailed Description

This group contains the Termios Device Support provided by RTEMS.

Typedef Documentation

◆ rtems_termios_device_node

Termios device node for installed devices.

See also
rtems_termios_device_install().

Function Documentation

◆ rtems_termios_baud_to_number()

rtems_termios_baud_t rtems_termios_baud_to_number ( speed_t  baud)

Converts the baud flags to an integral baud value.

Return values
0Invalid baud value or a baud value of B0.
otherIntegral baud value.

◆ rtems_termios_device_install()

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.

The installed Termios device may be removed via unlink().

Parameters
[in]device_fileThe device file path.
[in]handlerThe device handler. It must be persistent throughout the installed time of the device.
[in]flowThe device flow control handler. The device flow control handler are optional and may be NULL. If present must be persistent throughout the installed time of the device.
[in]contextThe device context. It must be persistent throughout the installed time of the device.
Return values
RTEMS_SUCCESSFULSuccessful operation.
RTEMS_NO_MEMORYNot enough memory to create a device node.
RTEMS_UNSATISFIEDCreation of the device file failed.
RTEMS_INCORRECT_STATETermios is not initialized.
See also
rtems_termios_get_device_context().

◆ rtems_termios_kqfilter()

int rtems_termios_kqfilter ( rtems_libio_t iop,
struct knote *  kn 
)

Termios kqueue() filter filesystem node handler.

Real implementation is provided by libbsd.

◆ rtems_termios_mmap()

int rtems_termios_mmap ( rtems_libio_t iop,
void **  addr,
size_t  len,
int  prot,
off_t  off 
)

Termios mmap() filter filesystem node handler.

Real implementation is provided by libbsd.

◆ rtems_termios_number_to_baud()

speed_t rtems_termios_number_to_baud ( rtems_termios_baud_t  baud)

Converts the Integral Baud value baud to the Termios Control Flag Representation.

Return values
B0Invalid baud value or a baud value of 0.
otherBaud constant according to baud.

◆ rtems_termios_poll()

int rtems_termios_poll ( rtems_libio_t iop,
int  events 
)

Termios poll() filesystem node handler.

Real implementation is provided by libbsd.

◆ rtems_termios_set_best_baud()

void rtems_termios_set_best_baud ( struct termios *  term,
uint32_t  baud 
)

Sets the best baud value in the Termios control.

The valid Termios baud values are between 0 and 460800. The Termios baud value is chosen which minimizes the difference to the value specified.

Parameters
[in]termThe Termios attributes.
[in]baudThe current baud setting of the device.

◆ rtems_termios_set_initial_baud()

int rtems_termios_set_initial_baud ( struct rtems_termios_tty tty,
rtems_termios_baud_t  baud 
)

Sets the initial baud in the Termios context tty.

Return values
0Successful operation.
-1Invalid baud value.