File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,12 @@ enum term_modes {
33
33
MODE_COUNT /* Counter of term_modes */
34
34
};
35
35
36
+ #define AT_HOST_UART_DEV_GET () \
37
+ DEVICE_DT_GET(COND_CODE_1(DT_HAS_CHOSEN(ncs_at_host_uart), \
38
+ (DT_CHOSEN(ncs_at_host_uart)), (DT_NODELABEL(uart0))))
39
+
36
40
static enum term_modes term_mode ;
37
- #if DT_HAS_CHOSEN (ncs_at_host_uart )
38
- static const struct device * const uart_dev = DEVICE_DT_GET (DT_CHOSEN (ncs_at_host_uart ));
39
- #else
40
- static const struct device * const uart_dev = DEVICE_DT_GET (DT_NODELABEL (uart0 ));
41
- #endif
41
+ static const struct device * const uart_dev = AT_HOST_UART_DEV_GET ();
42
42
static bool at_buf_busy ; /* Guards at_buf while processing a command */
43
43
static char at_buf [AT_BUF_SIZE ]; /* AT command and modem response buffer */
44
44
static struct k_work_q at_host_work_q ;
You can’t perform that action at this time.
0 commit comments