Select serial port for ThingSet via Kconfig
This commit is contained in:
@@ -17,7 +17,14 @@
|
||||
#include "hardware.h"
|
||||
#include "data_nodes.h"
|
||||
|
||||
#if CONFIG_UEXT_SERIAL_THINGSET
|
||||
#define UART_DEVICE_NAME DT_LABEL(DT_ALIAS(uart_uext))
|
||||
#elif DT_NODE_EXISTS(DT_ALIAS(uart_dbg))
|
||||
#define UART_DEVICE_NAME DT_LABEL(DT_ALIAS(uart_dbg))
|
||||
#else
|
||||
// cppcheck-suppress preprocessorErrorDirective
|
||||
#error "No UART for ThingSet serial defined."
|
||||
#endif
|
||||
|
||||
struct device *uart_dev = device_get_binding(UART_DEVICE_NAME);
|
||||
|
||||
|
||||
@@ -161,6 +161,14 @@ config EXT_OLED_BRIGHTNESS
|
||||
range 1 255
|
||||
default 1
|
||||
|
||||
config UEXT_SERIAL_THINGSET
|
||||
depends on THINGSET_SERIAL
|
||||
bool "Use UEXT serial for ThingSet interface"
|
||||
default n
|
||||
help
|
||||
If the ThingSet interface is not attached to the serial port in the UEXT connector, the
|
||||
debug serial connector is used (if existing).
|
||||
|
||||
endmenu # UEXT port
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user