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:
Matteo Concas
2025-06-26 02:40:05 +00:00
committed by Kinsey Moore
parent af8c087fb0
commit 5e0a68d3ab
+6 -3
View File
@@ -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;