forked from Imagelibrary/rtems
2007-09-06 Daniel Hellstrom <daniel@gaisler.com>
* console/debugputs.c: Now works on multi-CPU systems.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2007-09-06 Daniel Hellstrom <daniel@gaisler.com>
|
||||
|
||||
* console/debugputs.c: Now works on multi-CPU systems.
|
||||
|
||||
2007-09-05 Daniel Hellstrom <daniel@gaisler.com>
|
||||
|
||||
* clock/ckinit.c, console/console.c, leon_greth/leon_greth.c,
|
||||
|
||||
@@ -35,8 +35,9 @@ void console_outbyte_polled(
|
||||
{
|
||||
if ((port >= 0) && (port <= CONFIGURE_NUMBER_OF_TERMIOS_PORTS))
|
||||
{
|
||||
while ( (LEON3_Console_Uart[port]->status & LEON_REG_UART_STATUS_THE) == 0 );
|
||||
LEON3_Console_Uart[port]->data = (unsigned int) ch;
|
||||
while ( (LEON3_Console_Uart[LEON3_Cpu_Index+port]->status &
|
||||
LEON_REG_UART_STATUS_THE) == 0 );
|
||||
LEON3_Console_Uart[LEON3_Cpu_Index+port]->data = (unsigned int) ch;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,13 +53,13 @@ int console_inbyte_nonblocking( int port )
|
||||
if ((port >=0) && (port < CONFIGURE_NUMBER_OF_TERMIOS_PORTS))
|
||||
{
|
||||
|
||||
if (LEON3_Console_Uart[port]->status & LEON_REG_UART_STATUS_ERR) {
|
||||
LEON3_Console_Uart[port]->status = ~LEON_REG_UART_STATUS_ERR;
|
||||
if (LEON3_Console_Uart[LEON3_Cpu_Index+port]->status & LEON_REG_UART_STATUS_ERR) {
|
||||
LEON3_Console_Uart[LEON3_Cpu_Index+port]->status = ~LEON_REG_UART_STATUS_ERR;
|
||||
}
|
||||
|
||||
if ((LEON3_Console_Uart[port]->status & LEON_REG_UART_STATUS_DR) == 0)
|
||||
if ((LEON3_Console_Uart[LEON3_Cpu_Index+port]->status & LEON_REG_UART_STATUS_DR) == 0)
|
||||
return -1;
|
||||
return (int) LEON3_Console_Uart[port]->data;
|
||||
return (int) LEON3_Console_Uart[LEON3_Cpu_Index+port]->data;
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user