Loading...
Searching...
No Matches
serial.h
Go to the documentation of this file.
/****************************************************************************
** serial.c ****************************************************************
****************************************************************************
*
* common routines for hardware that uses the standard serial port driver
* @ingroup private_api
*
* Copyright (C) 1999 Christoph Bartelmus <lirc@bartelmus.de>
*
*/
#ifndef _SERIAL_H
#define _SERIAL_H
#ifdef __cplusplus
extern "C" {
#endif
int tty_reset(int fd);
int tty_setrtscts(int fd, int enable);
int tty_setdtr(int fd, int enable);
int tty_setbaud(int fd, int baud);
int tty_setcsize(int fd, int csize);
int tty_create_lock(const char* name);
int tty_delete_lock(void);
int tty_set(int fd, int rts, int dtr);
int tty_clear(int fd, int rts, int dtr);
int tty_write(int fd, char byte);
int tty_read(int fd, char* byte);
int tty_write_echo(int fd, char byte);
#ifdef __cplusplus
}
#endif
#endif
tty_write
int tty_write(int fd, char byte)
Write a single byte to serial device.
Definition serial.c:539
tty_set
int tty_set(int fd, int rts, int dtr)
Set RTS and DTR control lines.
Definition serial.c:511
tty_reset
int tty_reset(int fd)
Set the cfmakeraw termio options.
Definition serial.c:54
tty_setbaud
int tty_setbaud(int fd, int baud)
Set the speed a.
Definition serial.c:120
tty_read
int tty_read(int fd, char *byte)
Read a single byte from serial device.
Definition serial.c:557
tty_setdtr
int tty_setdtr(int fd, int enable)
Set/clear DTR control line.
Definition serial.c:93
tty_write_echo
int tty_write_echo(int fd, char byte)
Write a single byte and check the echo from remote party.
Definition serial.c:577
tty_delete_lock
int tty_delete_lock(void)
Delete any legacy lock(s) owned by this process.
Definition serial.c:445
tty_create_lock
int tty_create_lock(const char *name)
Creates a lock file of the type /var/local/LCK.
Definition serial.c:302
tty_clear
int tty_clear(int fd, int rts, int dtr)
Clear RTS and DTR control lines.
Definition serial.c:525
tty_setrtscts
int tty_setrtscts(int fd, int enable)
Set/clear CTS control line.
Definition serial.c:72
tty_setcsize
int tty_setcsize(int fd, int csize)
Set the character size.
Definition serial.c:265