Calculate the number of data to process in RX/TX ISR.
750 uint8_t rx_fifo_depth;
751 uint8_t tx_fifo_depth;
752 uint8_t rx_fifo_threshold;
753 uint8_t tx_fifo_threshold;
754 uint8_t numerator[] = {1U, 1U, 1U, 3U, 7U, 1U, 0U, 0U};
755 uint8_t denominator[] = {8U, 4U, 2U, 4U, 8U, 1U, 1U, 1U};
757 if (huart->
FifoMode == UART_FIFOMODE_DISABLE)
764 rx_fifo_depth = RX_FIFO_DEPTH;
765 tx_fifo_depth = TX_FIFO_DEPTH;
766 rx_fifo_threshold = (uint8_t)(READ_BIT(huart->
Instance->CR3, USART_CR3_RXFTCFG) >> USART_CR3_RXFTCFG_Pos);
767 tx_fifo_threshold = (uint8_t)(READ_BIT(huart->
Instance->CR3, USART_CR3_TXFTCFG) >> USART_CR3_TXFTCFG_Pos);
768 huart->
NbTxDataToProcess = ((uint16_t)tx_fifo_depth * numerator[tx_fifo_threshold]) / (uint16_t)denominator[tx_fifo_threshold];
769 huart->
NbRxDataToProcess = ((uint16_t)rx_fifo_depth * numerator[rx_fifo_threshold]) / (uint16_t)denominator[rx_fifo_threshold];
uint16_t NbTxDataToProcess
uint16_t NbRxDataToProcess