lkml.org 
[lkml]   [2002]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Controlling the serial port at kernel level
On Thu, 2 May 2002, antonelloderosa@inwind.it wrote:

> Hallo,
> I would find the way of controlling the serial port at kernel
> level; more precisely I want to set the DTR or RTS pin of the serial
> port whenever my host send or receive an udp packet.
>
> Can you help me?
>
> Please answer me as soon as possible!!!
>
> Thanks a lot !!

If this is just a hack and you don't care if it screws up
somebody else using the UART, just....
#define BASE 0x3f8 // For first UART
#define MCR 0x3fc
#define DTR 0x01
#define RTS 0x02
... read/write directly to the MCR port, saving the bits you don't
want to change... You use the outb(value, port); and inb(port);
instructions for ports.


Cheers,
Dick Johnson

Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).

Windows-2000/Professional isn't.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:25    [from the cache]
©2003-2011 Jasper Spaans