Select serial port for ThingSet via Kconfig

This commit is contained in:
Martin Jäger
2020-08-18 19:29:23 +02:00
parent 5e5f2c6680
commit b110918797
2 changed files with 15 additions and 0 deletions
+7
View File
@@ -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);