mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-06 07:33:17 +00:00
Updated console driver to use new read routine conventions.
This commit is contained in:
@@ -59,10 +59,7 @@ void console_outbyte_polled(
|
|||||||
* This routine polls for a character.
|
* This routine polls for a character.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int console_inbyte_nonblocking(
|
int console_inbyte_nonblocking(int port)
|
||||||
int port,
|
|
||||||
char *c
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
rtems_unsigned32 control;
|
rtems_unsigned32 control;
|
||||||
rtems_unsigned32 data;
|
rtems_unsigned32 data;
|
||||||
@@ -79,10 +76,10 @@ int console_inbyte_nonblocking(
|
|||||||
|
|
||||||
Z8x30_READ_CONTROL( control, RR_0, rr_0 );
|
Z8x30_READ_CONTROL( control, RR_0, rr_0 );
|
||||||
if ( !(rr_0 & RR_0_RX_DATA_AVAILABLE) )
|
if ( !(rr_0 & RR_0_RX_DATA_AVAILABLE) )
|
||||||
return 0;
|
return -1;
|
||||||
|
|
||||||
Z8x30_READ_DATA( data, ch );
|
Z8x30_READ_DATA( data, ch );
|
||||||
return ch;
|
return (int) ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user