byte access to PIR register

This commit is contained in:
folkert van heusden 2023-03-24 15:36:07 +01:00
parent b145bae3d0
commit 3618e27553
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1

View file

@ -182,9 +182,13 @@ uint16_t bus::read(const uint16_t a, const bool word_mode, const bool use_prev,
return 128;
}
if (a == ADDR_PIR) { // PIR
if (a == ADDR_PIR || a == ADDR_PIR + 1) { // PIR
if (!peek_only) DOLOG(debug, false, "read PIR");
return PIR;
if (word_mode == false)
return PIR;
return a == ADDR_PIR ? PIR & 255 : PIR >> 8;
}
if (a == ADDR_SYSTEM_ID) {