git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9716 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
10dd7c5f02
commit
94ab7ac7e9
|
@ -315,7 +315,6 @@ typedef enum {
|
|||
(uartp)->config->rxchar_cb(uartp, (uartp)->rxbuf); \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Timeout ISR code for receiver.
|
||||
* @details This code handles the portable part of the ISR code:
|
||||
|
|
|
@ -243,7 +243,7 @@ static void usart_start(UARTDriver *uartp) {
|
|||
cr1 = USART_CR1_UE | USART_CR1_PEIE | USART_CR1_TE | USART_CR1_RE;
|
||||
u->CR1 = uartp->config->cr1 | cr1;
|
||||
|
||||
/* Set receive timeout and check it appliance */
|
||||
/* Set receive timeout and checks if it is really applied.*/
|
||||
if (tmo > 0) {
|
||||
osalDbgAssert(tmo <= USART_RTOR_RTO, "Timeout overflow");
|
||||
u->RTOR = tmo;
|
||||
|
@ -334,7 +334,9 @@ static void serve_usart_irq(UARTDriver *uartp) {
|
|||
_uart_tx2_isr_code(uartp);
|
||||
}
|
||||
|
||||
if ((isr & USART_ISR_IDLE) || (isr & USART_ISR_RTOF)) {
|
||||
/* Timeout interrupt sources are only checked if enabled in CR1.*/
|
||||
if (((cr1 & USART_CR1_IDLEIE) && (isr & USART_ISR_IDLE)) ||
|
||||
((cr1 & USART_CR1_RTOIE) && (isr & USART_ISR_RTOF))) {
|
||||
_uart_timeout_isr_code(uartp);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -352,6 +352,8 @@ size_t uartStopReceiveI(UARTDriver *uartp) {
|
|||
* sent to the UART or on timeout.
|
||||
* @note The buffers are organized as uint8_t arrays for data sizes below
|
||||
* or equal to 8 bits else it is organized as uint16_t arrays.
|
||||
* @note This function implements a software timeout, it does not use
|
||||
* any underlying HW timeout mechanism.
|
||||
*
|
||||
* @param[in] uartp pointer to the @p UARTDriver object
|
||||
* @param[in,out] np number of data frames to transmit, on exit the number
|
||||
|
@ -395,6 +397,8 @@ msg_t uartSendTimeout(UARTDriver *uartp, size_t *np,
|
|||
* physically transmitted or on timeout.
|
||||
* @note The buffers are organized as uint8_t arrays for data sizes below
|
||||
* or equal to 8 bits else it is organized as uint16_t arrays.
|
||||
* @note This function implements a software timeout, it does not use
|
||||
* any underlying HW timeout mechanism.
|
||||
*
|
||||
* @param[in] uartp pointer to the @p UARTDriver object
|
||||
* @param[in,out] np number of data frames to transmit, on exit the number
|
||||
|
@ -438,6 +442,8 @@ msg_t uartSendFullTimeout(UARTDriver *uartp, size_t *np,
|
|||
* received or on error/timeout.
|
||||
* @note The buffers are organized as uint8_t arrays for data sizes below
|
||||
* or equal to 8 bits else it is organized as uint16_t arrays.
|
||||
* @note This function implements a software timeout, it does not use
|
||||
* any underlying HW timeout mechanism.
|
||||
*
|
||||
* @param[in] uartp pointer to the @p UARTDriver object
|
||||
* @param[in,out] np number of data frames to receive, on exit the number
|
||||
|
|
Loading…
Reference in New Issue