Browse Source

update

master
zhaohe 2 years ago
parent
commit
22d7d685c4
  1. 5
      hal/zuart.cpp

5
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;

Loading…
Cancel
Save