[En-Nut-Discussion] New UART driver

Dave Smart Dave at Smart-Family.net
Sun Nov 30 18:55:20 CET 2003


Hi Harald,

I'd like to put in my request for the synchronous mode in the new
driver. I had implemented it into the 2.52 source, and posted the source
to the mailing list. I'm finally on the verge of moving up to the 3.x
release, and will again need the sync uart. So, if it were already
there, that would be great ;)

Dave Smart


-----Original Message-----
From: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Harald Kipp
Sent: Sunday, November 30, 2003 10:51 AM
To: en-nut-discussion at egnite.de
Subject: [En-Nut-Discussion] New UART driver


I'm currently working on a new UART driver. It should
support:

1. Hardware (RTS/CTS) and software (XON/XOFF) handshake
2. Half duplex mode (used by RS485)
3. Interface de-initialization
4. Adding Brett Abbott's 9-bit mode
5. More complete implementation of ioctls
6. Several optimizations
7. Configurable buffer sizes

The existing driver will be marked deprecated, but should
still work for some time.

The new driver will be split in a hardware dependent and independent
part, making it easier to implement new devices.

dev/usart.c: Hardware independant part.
dev/usart0avr.c: Hardware dependant part for AVR U(S)ART0.
dev/usart1avr.c: Hardware dependant part for AVR U(S)ART1.

An enhanced USARTDCB structure will be used to link both
parts by including a jump table

     int dcb_init()
     int dcb_deinit()
     u_long dcb_get_speed()
     int dcb_set_speed()
     u_char dcb_get_data_bits()
     int dcb_set_data_bits()
     u_char dcb_get_parity()
     int dcb_set_parity()
     u_char dcb_get_stop_bits()
     int dcb_set_stop_bits()

...etc. Additionally the IFSTREAM structure will not be
used anymore. The buffers and queues will be moved to the USARTDCB
structure, which simplifies interrupt handling.

The existing driver uses the tx complete interrupt, while
the new driver will use this interrupt in half duplex mode
only and use the data register empty interrupt for full
duplex communication.

Harald

_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion




More information about the En-Nut-Discussion mailing list