From 44a503a8cf3778cad5469c592e8ccbae58e44b97 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 1 Feb 2015 16:36:51 +0100 Subject: [PATCH] altos/stm: Add ability to delay STDIO usage for serial ports Bluetooth needs to delay adding the serial port to stdio until the link is up and running. The cc1111 serial driver had DELAY_SERIAL_*_STDIN bits which have been added to the STM serial driver. Signed-off-by: Keith Packard --- src/stm/ao_serial_stm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stm/ao_serial_stm.c b/src/stm/ao_serial_stm.c index e356b944..2568cf43 100644 --- a/src/stm/ao_serial_stm.c +++ b/src/stm/ao_serial_stm.c @@ -348,7 +348,7 @@ ao_serial_init(void) stm_nvic_set_enable(STM_ISR_USART1_POS); stm_nvic_set_priority(STM_ISR_USART1_POS, 4); -#if USE_SERIAL_1_STDIN +#if USE_SERIAL_1_STDIN && !DELAY_SERIAL_1_STDIN ao_add_stdio(_ao_serial1_pollchar, ao_serial1_putchar, NULL); @@ -395,7 +395,7 @@ ao_serial_init(void) stm_nvic_set_enable(STM_ISR_USART2_POS); stm_nvic_set_priority(STM_ISR_USART2_POS, 4); -#if USE_SERIAL_2_STDIN +#if USE_SERIAL_2_STDIN && !DELAY_SERIAL_2_STDIN ao_add_stdio(_ao_serial2_pollchar, ao_serial2_putchar, NULL); @@ -439,7 +439,7 @@ ao_serial_init(void) stm_nvic_set_enable(STM_ISR_USART3_POS); stm_nvic_set_priority(STM_ISR_USART3_POS, 4); -#if USE_SERIAL_3_STDIN +#if USE_SERIAL_3_STDIN && !DELAY_SERIAL_3_STDIN ao_add_stdio(_ao_serial3_pollchar, ao_serial3_putchar, NULL); -- 2.30.2