projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Add one-byte SPI output routine for LPC and STM cores
[fw/altos]
/
src
/
stm
/
ao_serial_stm.c
diff --git
a/src/stm/ao_serial_stm.c
b/src/stm/ao_serial_stm.c
index e356b9441c3e4bce2381e07ee1b88556534bf63e..88f2d0299ecf65f1b350dde44e0ede1d744c7c1f 100644
(file)
--- a/
src/stm/ao_serial_stm.c
+++ b/
src/stm/ao_serial_stm.c
@@
-86,9
+86,9
@@
ao_usart_getchar(struct ao_stm_usart *usart)
}
static inline uint8_t
}
static inline uint8_t
-_ao_usart_sleep
(struct ao_stm_usart *usar
t)
+_ao_usart_sleep
_for(struct ao_stm_usart *usart, uint16_t timeou
t)
{
{
- return ao_sleep
(&usart->rx_fifo
);
+ return ao_sleep
_for(&usart->rx_fifo, timeout
);
}
void
}
void
@@
-217,9
+217,9
@@
_ao_serial1_pollchar(void)
}
uint8_t
}
uint8_t
-_ao_serial1_sleep
(void
)
+_ao_serial1_sleep
_for(uint16_t timeout
)
{
{
- return _ao_usart_sleep
(&ao_stm_usart1
);
+ return _ao_usart_sleep
_for(&ao_stm_usart1, timeout
);
}
void
}
void
@@
-260,9
+260,9
@@
_ao_serial2_pollchar(void)
}
uint8_t
}
uint8_t
-_ao_serial2_sleep
(void
)
+_ao_serial2_sleep
_for(uint16_t timeout
)
{
{
- return _ao_usart_sleep
(&ao_stm_usart2
);
+ return _ao_usart_sleep
_for(&ao_stm_usart2, timeout
);
}
void
}
void
@@
-303,9
+303,9
@@
_ao_serial3_pollchar(void)
}
uint8_t
}
uint8_t
-_ao_serial3_sleep
(void
)
+_ao_serial3_sleep
_for(uint16_t timeout
)
{
{
- return _ao_usart_sleep
(&ao_stm_usart3
);
+ return _ao_usart_sleep
_for(&ao_stm_usart3, timeout
);
}
void
}
void
@@
-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);
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);
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);
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);
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);
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);
ao_add_stdio(_ao_serial3_pollchar,
ao_serial3_putchar,
NULL);