termios support
Eric Norum
eric at skatter.USask.Ca
Mon May 4 20:59:39 UTC 1998
Following-up my previous note about termios support.
I think that the device-dependent output code for an
interrupt-per-transmitted-character device like a standard UART could
be as simple as the following two routines.
=============================================================
void
device_write_routine (int minor, char *buf, int count)
{
UART->output_register = *buf;
UART->control_register |= UART_TRANSMIT_INTERRUPT_ENABLE;
}
void
device_transmit_interrupt_routine (int vector)
{
UART->control_register &= ~UART_TRANSMIT_INTERRUPT_ENABLE;
rtems_termios_dequeue_characters (device_ttyp, 1);
}
=============================================================
I hope this pseudo-code is understandable......
---
Eric Norum eric at skatter.usask.ca
Saskatchewan Accelerator Laboratory Phone: (306) 966-6308
University of Saskatchewan FAX: (306) 966-6058
Saskatoon, Canada.
More information about the users
mailing list