escc: Update RR0 if no character is available.

The RR0_RX_CHARACTER_AVAILABLE bit is cleared after the character is read in receive_byte, but clear it anyway in read_reg when there's no character available just in case a character that was available somehow becomes unavailable.
This commit is contained in:
joevt 2024-04-26 20:33:27 -07:00 committed by dingusdev
parent a18658fc16
commit 226c097b81

View File

@ -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: