diff --git a/devices/serial/escc.cpp b/devices/serial/escc.cpp index 0418d41..f72df40 100644 --- a/devices/serial/escc.cpp +++ b/devices/serial/escc.cpp @@ -331,7 +331,9 @@ uint8_t EsccChannel::read_reg(int reg_num) switch (reg_num) { case RR0: if (this->chario->rcv_char_available()) { - this->read_regs[RR0] |= RR0_RX_CHARACTER_AVAILABLE; + return this->read_regs[RR0] |= RR0_RX_CHARACTER_AVAILABLE; + } else { + return this->read_regs[RR0] &= ~RR0_RX_CHARACTER_AVAILABLE; } break; case RR8: