forked from Imagelibrary/rtems
libio: Clean up usage of rtems_termios_device_mode
This cleans up outputUsesInterrupts usage with rtems_termios_device_mode enum values. The outputUsesInterrupts member was typed as an int, named as if it were a boolean value, and used as if it were a rtems_termios_device_mode enum. In this patch, values assigned to outputUsesInterrupts have been converted to the corresponding rtems_termios_device_mode enum value, conversions from deviceOutputUsesInterrupts have been made explicit, and uses of rtems_termios_device_mode enum values with deviceOutputUsesInterrupts have been converted to booleans.
This commit is contained in:
committed by
Joel Sherrill
parent
4092fbb2c0
commit
150dcf5e47
@@ -66,7 +66,7 @@ static void erc32_console_initialize(int minor);
|
||||
erc32_console_initialize, /* deviceInitialize */
|
||||
NULL, /* deviceWritePolled */
|
||||
NULL, /* deviceSetAttributes */
|
||||
TERMIOS_IRQ_DRIVEN /* deviceOutputUsesInterrupts */
|
||||
true /* deviceOutputUsesInterrupts */
|
||||
};
|
||||
#else
|
||||
const console_fns erc32_fns = {
|
||||
@@ -78,7 +78,7 @@ static void erc32_console_initialize(int minor);
|
||||
erc32_console_initialize, /* deviceInitialize */
|
||||
NULL, /* deviceWritePolled */
|
||||
NULL, /* deviceSetAttributes */
|
||||
TERMIOS_POLLED /* deviceOutputUsesInterrupts */
|
||||
false /* deviceOutputUsesInterrupts */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -327,7 +327,7 @@ rtems_device_driver console_open(
|
||||
NULL, /* setAttributes */
|
||||
NULL, /* stopRemoteTx */
|
||||
NULL, /* startRemoteTx */
|
||||
0 /* outputUsesInterrupts */
|
||||
TERMIOS_POLLED /* outputUsesInterrupts */
|
||||
};
|
||||
#else
|
||||
static const rtems_termios_callbacks pollCallbacks = {
|
||||
@@ -338,7 +338,7 @@ rtems_device_driver console_open(
|
||||
NULL, /* setAttributes */
|
||||
NULL, /* stopRemoteTx */
|
||||
NULL, /* startRemoteTx */
|
||||
0 /* outputUsesInterrupts */
|
||||
TERMIOS_POLLED /* outputUsesInterrupts */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user