MYNEWT-671 UART support in sim Add second UART to native BSP.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/4cf2e74f Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/4cf2e74f Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/4cf2e74f Branch: refs/heads/nrf_cputime Commit: 4cf2e74fb964af23b6b2fc2d82dd183b3a243006 Parents: 653a697 Author: Christopher Collins <[email protected]> Authored: Wed Mar 15 11:43:52 2017 -0700 Committer: Christopher Collins <[email protected]> Committed: Wed Mar 15 11:43:52 2017 -0700 ---------------------------------------------------------------------- hw/bsp/native/src/hal_bsp.c | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/4cf2e74f/hw/bsp/native/src/hal_bsp.c ---------------------------------------------------------------------- diff --git a/hw/bsp/native/src/hal_bsp.c b/hw/bsp/native/src/hal_bsp.c index 5f14e1e..b03d1fa 100644 --- a/hw/bsp/native/src/hal_bsp.c +++ b/hw/bsp/native/src/hal_bsp.c @@ -32,6 +32,7 @@ #include "mcu/mcu_hal.h" static struct uart_dev os_bsp_uart0; +static struct uart_dev os_bsp_uart1; const struct hal_flash * hal_bsp_flash_dev(uint8_t id) @@ -59,4 +60,8 @@ 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); }
