mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-22 18:27:52 +08:00
bsps/noelv: Fix using console in polled mode
Before, the console driver needed `BSP_CONSOLE_USE_INTERRUPTS` to be defined or it would not build. The intent was to use polled mode if the macro was equal to zero. This change makes it so interrupt mode is used if the macro is defined and polled mode is used if the macro is not defined.
This commit is contained in:
committed by
Kinsey Moore
parent
af8c087fb0
commit
5e0a68d3ab
@@ -181,11 +181,14 @@ rtems_status_code console_initialize(
|
||||
|
||||
rtems_termios_initialize();
|
||||
|
||||
const rtems_termios_device_handler *handler = &apbuart_handler_polled;
|
||||
const rtems_termios_device_handler *handler;
|
||||
|
||||
if (BSP_CONSOLE_USE_INTERRUPTS) {
|
||||
#ifdef BSP_CONSOLE_USE_INTERRUPTS
|
||||
handler = &apbuart_handler_interrupt;
|
||||
}
|
||||
#else
|
||||
handler = &apbuart_handler_polled;
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < apbuart_devices; ++i) {
|
||||
struct apbuart_context *ctx;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user