LIRC libraries
Linux Infrared Remote Control
Loading...
Searching...
No Matches
serial.h
Go to the documentation of this file.
1/****************************************************************************
2** serial.c ****************************************************************
3****************************************************************************
4*
5* common routines for hardware that uses the standard serial port driver
6* @ingroup private_api
7*
8* Copyright (C) 1999 Christoph Bartelmus <lirc@bartelmus.de>
9*
10*/
11
27#ifndef _SERIAL_H
28#define _SERIAL_H
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
40int tty_reset(int fd);
41
48int tty_setrtscts(int fd, int enable);
49
57int tty_setdtr(int fd, int enable);
58
67int tty_setbaud(int fd, int baud);
68
76int tty_setcsize(int fd, int csize);
77
84int tty_create_lock(const char* name);
85
91int tty_delete_lock(void);
92
101int tty_set(int fd, int rts, int dtr);
102
111int tty_clear(int fd, int rts, int dtr);
112
120int tty_write(int fd, char byte);
121
129int tty_read(int fd, char* byte);
130
131
141int tty_write_echo(int fd, char byte);
142
145#ifdef __cplusplus
146}
147#endif
148
149#endif
int tty_write(int fd, char byte)
Write a single byte to serial device.
Definition serial.c:539
int tty_set(int fd, int rts, int dtr)
Set RTS and DTR control lines.
Definition serial.c:511
int tty_reset(int fd)
Set the cfmakeraw termio options.
Definition serial.c:54
int tty_setbaud(int fd, int baud)
Set the speed a.
Definition serial.c:120
int tty_read(int fd, char *byte)
Read a single byte from serial device.
Definition serial.c:557
int tty_setdtr(int fd, int enable)
Set/clear DTR control line.
Definition serial.c:93
int tty_write_echo(int fd, char byte)
Write a single byte and check the echo from remote party.
Definition serial.c:577
int tty_delete_lock(void)
Delete any legacy lock(s) owned by this process.
Definition serial.c:445
int tty_create_lock(const char *name)
Creates a lock file of the type /var/local/LCK.
Definition serial.c:302
int tty_clear(int fd, int rts, int dtr)
Clear RTS and DTR control lines.
Definition serial.c:525
int tty_setrtscts(int fd, int enable)
Set/clear CTS control line.
Definition serial.c:72
int tty_setcsize(int fd, int csize)
Set the character size.
Definition serial.c:265