linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* change HW flow-control
@ 2004-05-06 14:39 Michael Westermann
  0 siblings, 0 replies; only message in thread
From: Michael Westermann @ 2004-05-06 14:39 UTC (permalink / raw)
  To: linux-serial

Hello,

I work on a change for the serial driver, 
first for a i386 kernel 2.4.xx. Many POS printers and devices 
from different vendors use DTR/DSR flow control, not RTS/CTS. 

I think it's a good idea to change the serial.c module for flexible
flow control. My idea is to add one or two additional variables 
for the hw flow control.

info->modem_flow 	/* Modem lines  */ 
info->status_flow 	/* Status lines */

example: setting for ctrscts in serial.c not complete.

@@ -1751,6 +1751,8 @@
 		info->IER |= UART_IER_MSI;
 	if (cflag & CRTSCTS) {
 		info->flags |= ASYNC_CTS_FLOW;
+		info->status_flow = UART_MSR_CTS;
+		info->modem_flow  = UART_MCR_RTS;
 		info->IER |= UART_IER_MSI;
 	} else
 		info->flags &= ~ASYNC_CTS_FLOW;


With this change can we use few different flow-controls e.g.
CTS/DTR, DTR/DSR RTS/DSR .. DTR/CD. 

I think is a good idea to integrate the new settings in the termios flags.

/* c_lflag bits */
#define CHWFLOW	001000000000 

and set the hw stop and start bits in the  c_cc array.
either in the VSTART and VSTOP field or in the free field index 17 and 18.    	

Alternatively the new HW flow lines could be set with a new ioctl.
 
What is the best way to set status_flow and modem_flow?  

Michael

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-05-06 14:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-06 14:39 change HW flow-control Michael Westermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).