diff --git a/firmware/console/console_io.cpp b/firmware/console/console_io.cpp index 2050536fa1..2136c2e7af 100644 --- a/firmware/console/console_io.cpp +++ b/firmware/console/console_io.cpp @@ -221,7 +221,16 @@ bool isUsbSerial(BaseChannel * channel) { #endif } +ts_channel_s primaryChannel; + BaseChannel * getConsoleChannel(void) { +#if PRIMARY_UART_DMA_MODE + if (primaryChannel.uartp != nullptr) { + // primary channel is in DMA mode - we do not have a stream implementation for this. + return nullptr; + } +#endif + #if defined(EFI_CONSOLE_SERIAL_DEVICE) return (BaseChannel *) EFI_CONSOLE_SERIAL_DEVICE; #endif /* EFI_CONSOLE_SERIAL_DEVICE */ @@ -244,8 +253,6 @@ bool isCommandLineConsoleReady(void) { #if !defined(EFI_CONSOLE_NO_THREAD) -ts_channel_s primaryChannel; - static THD_WORKING_AREA(consoleThreadStack, 3 * UTILITY_THREAD_STACK_SIZE); static THD_FUNCTION(consoleThreadEntryPoint, arg) { (void) arg;