diff --git a/hal/zuart.cpp b/hal/zuart.cpp index da13c58..48dff00 100644 --- a/hal/zuart.cpp +++ b/hal/zuart.cpp @@ -144,6 +144,11 @@ bool ZUART::dataIsReady() { if (m_dataIsReady) { return true; } + + if (!(HAL_UART_GetState(m_huart) & (0x01 << 1))) { + HAL_UART_Receive_IT(m_huart, &onebyte, 1); + } + if (!m_dataIsReady && m_rxBufferPos != 0) { if (ifly_has_passedms(m_lastRxTime) > (uint32_t)m_rxovertime_ms) { m_dataIsReady = true;