Skip to content

Commit 53880bd

Browse files
Rodolfo Giometticristibirsan
authored andcommitted
tty: add bits to manage multidrop mode
Multidrop mode differentiates the data characters and the address characters. Data is transmitted with the parity bit to 0 and addresses are transmitted with the parity bit to 1. However this usually slow down communication by adding a delay between the first byte and the others. This patch defines two non-stadard bits PARMD (that enables multidrop) and SENDA (that marks the next transmitted byte as address) that can be used to completely remove the delay during transmission by correctly managing the parity bit generation in hardware. Signed-off-by: Rodolfo Giometti <giometti@linux.it> Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com> [change SENDA/PARMD to use bits 23 and 24]
1 parent fecd3cb commit 53880bd

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

include/linux/tty.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ struct tty_bufhead {
167167
#define C_CIBAUD(tty) _C_FLAG((tty), CIBAUD)
168168
#define C_CRTSCTS(tty) _C_FLAG((tty), CRTSCTS)
169169
#define C_CMSPAR(tty) _C_FLAG((tty), CMSPAR)
170+
#define C_PARMD(tty) _C_FLAG((tty), PARMD)
171+
#define C_SENDA(tty) _C_FLAG((tty), SENDA)
170172

171173
#define L_ISIG(tty) _L_FLAG((tty), ISIG)
172174
#define L_ICANON(tty) _L_FLAG((tty), ICANON)

include/uapi/asm-generic/termbits.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ struct ktermios {
141141
#define HUPCL 0002000
142142
#define CLOCAL 0004000
143143
#define CBAUDEX 0010000
144+
#define PARMD 040000000
145+
#define SENDA 0100000000
144146
#define BOTHER 0010000
145147
#define B57600 0010001
146148
#define B115200 0010002

0 commit comments

Comments
 (0)