forked from Imagelibrary/rtems
2000-10-18 Charles-Antoine Gauthier <charles.gauthier@nrc.ca>
* comm/uart.c (BSP_uart_init): Save more line state parameters.
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
|
|
||||||
|
* comm/uart.c (BSP_uart_init): Save more line state parameters.
|
||||||
|
|
||||||
|
2000-10-18 Charles-Antoine Gauthier <charles.gauthier@nrc.ca>
|
||||||
|
|
||||||
* comm/i386-stub-glue.c, comm/tty_drv.c, comm/uart.c, comm/uart.h:
|
* comm/i386-stub-glue.c, comm/tty_drv.c, comm/uart.c, comm/uart.h:
|
||||||
Add the ability to set parity, number of data bits and
|
Add the ability to set parity, number of data bits and
|
||||||
number of stop bits to the existing i386 serial drivers.
|
number of stop bits to the existing i386 serial drivers.
|
||||||
|
|||||||
@@ -157,14 +157,35 @@ BSP_uart_init
|
|||||||
tmp = uread(uart, MSR);
|
tmp = uread(uart, MSR);
|
||||||
|
|
||||||
/* Remember state */
|
/* Remember state */
|
||||||
uart_data[uart].hwFlow = hwFlow;
|
|
||||||
uart_data[uart].baud = baud;
|
uart_data[uart].baud = baud;
|
||||||
|
uart_data[uart].databits = databits;
|
||||||
|
uart_data[uart].parity = parity;
|
||||||
|
uart_data[uart].stopbits = stopbits;
|
||||||
|
uart_data[uart].hwFlow = hwFlow;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set baud
|
* Set baud
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
BSP_uart_set_baud(
|
||||||
|
int uart,
|
||||||
|
unsigned long baud
|
||||||
|
)
|
||||||
|
{
|
||||||
|
/* Sanity check */
|
||||||
|
assert(uart == BSP_UART_COM1 || uart == BSP_UART_COM2);
|
||||||
|
|
||||||
|
BSP_uart_set_attributes( uart, baud, uart_data[uart].databits,
|
||||||
|
uart_data[uart].parity, uart_data[uart].stopbits );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set all attributes
|
||||||
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
BSP_uart_set_attributes
|
BSP_uart_set_attributes
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user