targets/TARGET_STMBLUE/Periph_Driver/src/BlueNRG1_uart.c
void UART_RXTimeoutConfig(uint32_t UART_TimeoutMS)
{
  uint32_t timeout_val;
  uint32_t tmp32;

  tmp32 = (UART->IBRD)<<4;
  if (UART->CR_b.OVSFACT == 0)
    timeout_val = (UART_TimeoutMS * 16 * 16000) / (((UART->FBRD)>>2) + tmp32);
  else
    timeout_val = (UART_TimeoutMS *  8 * 16000) / (((UART->FBRD)>>3) + tmp32);

  /* Set the timeout value */
  if(IS_UART_TIMEOUT(timeout_val)) {
    UART->TIMEOUT = timeout_val;
  }
  else {
    UART->TIMEOUT = UART_MAX_RX_TIMEOUT;
  }
}
/**
  * @brief  UART RX timeout.
  *         The RX timeout interrupt is asserted when
  *         the RX FIFO is not empty and no further data is received
  *         over a programmed timeout period.
  * @param  UART_TimeoutMS: is the timeout in milliseconds.
  * @retval None
  */
@brief  UART RX timeout.
The RX timeout interrupt is asserted when
the RX FIFO is not empty and no further data is received
over a programmed timeout period.
@param  UART_TimeoutMS: is the timeout in milliseconds.
@retval None
@brief UART RX timeout . The RX timeout interrupt is asserted when the RX FIFO is not empty and no further data is received over a programmed timeout period . @param UART_TimeoutMS : is the timeout in milliseconds . @retval None
void UART_RXTimeoutConfig(uint32_t UART_TimeoutMS)
{
  uint32_t timeout_val;
  uint32_t tmp32;
  tmp32 = (UART->IBRD)<<4;
  if (UART->CR_b.OVSFACT == 0)
    timeout_val = (UART_TimeoutMS * 16 * 16000) / (((UART->FBRD)>>2) + tmp32);
  else
    timeout_val = (UART_TimeoutMS *  8 * 16000) / (((UART->FBRD)>>3) + tmp32);
  if(IS_UART_TIMEOUT(timeout_val)) {
    UART->TIMEOUT = timeout_val;
  }
  else {
    UART->TIMEOUT = UART_MAX_RX_TIMEOUT;
  }
}
void UART_RXTimeoutConfig ( uint32_t UART_TimeoutMS ) { uint32_t timeout_val ; uint32_t tmp32 ; tmp32 = ( UART -> IBRD ) << 4 ; if ( UART -> CR_b . OVSFACT == 0 ) timeout_val = ( UART_TimeoutMS * 16 * 16000 ) / ( ( ( UART -> FBRD ) >> 2 ) + tmp32 ) ; else timeout_val = ( UART_TimeoutMS * 8 * 16000 ) / ( ( ( UART -> FBRD ) >> 3 ) + tmp32 ) ; if ( IS_UART_TIMEOUT ( timeout_val ) ) { UART -> TIMEOUT = timeout_val ; } else { UART -> TIMEOUT = UART_MAX_RX_TIMEOUT ; } }
@brief  UART RX timeout.
@brief UART RX timeout .
/* Set the timeout value */