mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 07:46:16 +08:00
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:
@@ -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
|
||||
****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user