drivers/drivers_initialize.c: check if only one console is selected

Check if only one driver is used as console to avoid a non-working console
because a different one is selected and has higher priority than the one we wanted
This commit is contained in:
raiden00pl 2024-07-25 14:39:11 +02:00 committed by Xiang Xiao
parent 98f5d6adc5
commit 2bcba4d85e

View File

@ -49,6 +49,21 @@
#include <nuttx/virtio/virtio.h>
#include <nuttx/drivers/optee.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Check if only one console device is selected.
* If you get this errro, search your .config file for CONSOLE_XXX_CONSOLE
* options and remove what is not needed.
*/
#if (defined(CONFIG_LWL_CONSOLE) + defined(CONFIG_SERIAL_CONSOLE) + \
defined(CONFIG_CDCACM_CONSOLE) + defined(CONFIG_PL2303_CONSOLE) + \
defined(CONFIG_SERIAL_RTT_CONSOLE) + defined(CONFIG_RPMSG_UART_CONSOLE)) > 1
# error More than one console driver selected. Check your configuration !
#endif
/****************************************************************************
* Public Functions
****************************************************************************/