mirror of
https://github.com/3cky/mbusd.git
synced 2024-06-24 10:14:49 +02:00
Rename tty_(set|clr)_rts
to tty_set_(tx|rx)
This commit is contained in:
parent
b03d50b58c
commit
68f988051c
|
@ -251,7 +251,7 @@ conn_write(int d, void *buf, size_t nbytes, int istty)
|
|||
#ifdef TRXCTL
|
||||
if (istty && cfg.trxcntl != TRX_ADDC)
|
||||
{
|
||||
tty_set_rts(d);
|
||||
tty_set_tx(d);
|
||||
tty_delay(35000000l/cfg.ttyspeed);
|
||||
}
|
||||
#endif
|
||||
|
@ -267,7 +267,7 @@ conn_write(int d, void *buf, size_t nbytes, int istty)
|
|||
if (istty && cfg.trxcntl != TRX_ADDC )
|
||||
{
|
||||
tty_delay(DV(nbytes, tty.bpc, cfg.ttyspeed));
|
||||
tty_clr_rts(d);
|
||||
tty_set_rx(d);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
10
src/tty.c
10
src/tty.c
|
@ -189,7 +189,7 @@ tty_set_attr(ttydata_t *mod)
|
|||
return RC_ERR;
|
||||
tcflush(mod->fd, TCIOFLUSH);
|
||||
#ifdef TRXCTL
|
||||
tty_clr_rts(mod->fd);
|
||||
tty_set_rx(mod->fd);
|
||||
#endif
|
||||
#ifdef HAVE_TIOCRS485
|
||||
if (mod->rs485)
|
||||
|
@ -465,9 +465,9 @@ void sysfs_gpio_set(char *filename, char *value) {
|
|||
|
||||
}
|
||||
|
||||
/* Set RTS line to active state */
|
||||
/* Set tty device into transmit mode */
|
||||
void
|
||||
tty_set_rts(int fd)
|
||||
tty_set_tx(int fd)
|
||||
{
|
||||
if ( TRX_RTS_1 == cfg.trxcntl ) {
|
||||
int mstat = TIOCM_RTS;
|
||||
|
@ -482,9 +482,9 @@ tty_set_rts(int fd)
|
|||
}
|
||||
}
|
||||
|
||||
/* Set RTS line to passive state */
|
||||
/* Set tty device into receive mode */
|
||||
void
|
||||
tty_clr_rts(int fd)
|
||||
tty_set_rx(int fd)
|
||||
{
|
||||
if ( TRX_RTS_1 == cfg.trxcntl ) {
|
||||
int mstat = TIOCM_RTS;
|
||||
|
|
|
@ -128,8 +128,8 @@ int tty_set_attr(ttydata_t *mod);
|
|||
speed_t tty_transpeed(int speed);
|
||||
int tty_cooked(ttydata_t *mod);
|
||||
int tty_close(ttydata_t *mod);
|
||||
void tty_set_rts(int fd);
|
||||
void tty_clr_rts(int fd);
|
||||
void tty_set_tx(int fd);
|
||||
void tty_set_rx(int fd);
|
||||
void tty_delay(int usec);
|
||||
|
||||
#endif /* _TTY_H */
|
||||
|
|
Loading…
Reference in New Issue
Block a user