From 1084fdb1581672310eec4b936952c57fa1fd88f2 Mon Sep 17 00:00:00 2001 From: Andrzej Kaczmarek Date: Wed, 16 Feb 2022 11:09:12 +0100 Subject: [PATCH] babblesim: Add uart1 This allows to have e.g. console and ble_monitor enabled at the same time. --- babblesim/hw/bsp/nrf52_bsim/src/hal_bsp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/babblesim/hw/bsp/nrf52_bsim/src/hal_bsp.c b/babblesim/hw/bsp/nrf52_bsim/src/hal_bsp.c index 821e9ed27..502f9a927 100644 --- a/babblesim/hw/bsp/nrf52_bsim/src/hal_bsp.c +++ b/babblesim/hw/bsp/nrf52_bsim/src/hal_bsp.c @@ -132,6 +132,7 @@ nrf52_periph_create_timers(void) } static struct uart_dev os_bsp_uart0; +static struct uart_dev os_bsp_uart1; void hal_bsp_init(void) @@ -148,6 +149,9 @@ hal_bsp_init(void) rc = os_dev_create((struct os_dev *) &os_bsp_uart0, "uart0", OS_DEV_INIT_PRIMARY, 0, uart_hal_init, (void *) NULL); assert(rc == 0); + rc = os_dev_create((struct os_dev *) &os_bsp_uart1, "uart1", + OS_DEV_INIT_PRIMARY, 0, uart_hal_init, (void *) NULL); + assert(rc == 0); } void