forked from Imagelibrary/rtems
Conditionals for CONSOLE_USE_INTERRUPTS should have been "if" not
"if defined".
This commit is contained in:
@@ -103,7 +103,7 @@ int console_inbyte_nonblocking( int port )
|
|||||||
* Interrupt driven console IO
|
* Interrupt driven console IO
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONSOLE_USE_INTERRUPTS
|
#if (CONSOLE_USE_INTERRUPTS)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Buffers between task and ISRs
|
* Buffers between task and ISRs
|
||||||
@@ -359,7 +359,7 @@ int console_write_support (int minor, const char *buf, int len)
|
|||||||
int nwrite = 0;
|
int nwrite = 0;
|
||||||
|
|
||||||
while (nwrite < len) {
|
while (nwrite < len) {
|
||||||
#if defined(CONSOLE_USE_INTERRUPTS)
|
#if (CONSOLE_USE_INTERRUPTS)
|
||||||
console_outbyte_interrupt( minor, *buf++ );
|
console_outbyte_interrupt( minor, *buf++ );
|
||||||
#else
|
#else
|
||||||
console_outbyte_polled( minor, *buf++ );
|
console_outbyte_polled( minor, *buf++ );
|
||||||
@@ -407,7 +407,7 @@ rtems_device_driver console_initialize(
|
|||||||
* Initialize Hardware
|
* Initialize Hardware
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONSOLE_USE_INTERRUPTS
|
#if (CONSOLE_USE_INTERRUPTS)
|
||||||
console_initialize_interrupts();
|
console_initialize_interrupts();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -421,7 +421,7 @@ rtems_device_driver console_open(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
rtems_status_code sc;
|
rtems_status_code sc;
|
||||||
#if defined(CONSOLE_USE_INTERRUPTS)
|
#if (CONSOLE_USE_INTERRUPTS)
|
||||||
rtems_libio_open_close_args_t *args = arg;
|
rtems_libio_open_close_args_t *args = arg;
|
||||||
static const rtems_termios_callbacks intrCallbacks = {
|
static const rtems_termios_callbacks intrCallbacks = {
|
||||||
NULL, /* firstOpen */
|
NULL, /* firstOpen */
|
||||||
@@ -450,7 +450,7 @@ rtems_device_driver console_open(
|
|||||||
if ( minor > 2 )
|
if ( minor > 2 )
|
||||||
return RTEMS_INVALID_NUMBER;
|
return RTEMS_INVALID_NUMBER;
|
||||||
|
|
||||||
#if defined(CONSOLE_USE_INTERRUPTS)
|
#if (CONSOLE_USE_INTERRUPTS)
|
||||||
sc = rtems_termios_open (major, minor, arg, &intrCallbacks);
|
sc = rtems_termios_open (major, minor, arg, &intrCallbacks);
|
||||||
|
|
||||||
console_termios_data[ minor ] = args->iop->data1;
|
console_termios_data[ minor ] = args->iop->data1;
|
||||||
|
|||||||
Reference in New Issue
Block a user