From: Keith Packard Date: Sun, 1 Feb 2015 15:36:51 +0000 (+0100) Subject: altos/stm: Add ability to delay STDIO usage for serial ports X-Git-Tag: 1.6~49 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=44a503a8cf3778cad5469c592e8ccbae58e44b97;hp=252211e9e54a1e6f4efe2df6382ce60c909de70c 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 --- 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);