14 #include <linux/serial.h>
15 #include <sys/ioctl.h>
17 #define SER_RS422_ENABLED (SER_RS485_ENABLED << 5)
44 inline static int termios_get(
int _fd,
struct termios &_termios) {
45 return( tcgetattr( _fd, &_termios)); }
46 inline static int termios_set(
int _fd,
struct termios &_termios) {
47 return( tcsetattr( _fd, TCSANOW, &_termios)); }
55 static void mode_def(
struct serial_rs485 &_c, CuartMode_t _m);
61 inline static int mode_set(
int _fd,
struct serial_rs485 &_c) {
62 return( ioctl( _fd, TIOCSRS485, &_c)); }
63 inline static int mode_get(
int _fd,
struct serial_rs485 &_c) {
64 return( ioctl( _fd, TIOCGRS485, &_c)); }
static void mode_def(struct serial_rs485 &_c, CuartMode_t _m)
Helps to define struct serial_rs485 fields for mode ...
static int termios_get(int _fd, struct termios &_termios)
Definition: Cuart.h:44
static void termios_def(struct termios &_termios)
static int mode_set(int _fd, struct serial_rs485 &_c)
Definition: Cuart.h:61
UART base setup functions.
Definition: Cuart.h:26