byte access to PIR register
This commit is contained in:
parent
b145bae3d0
commit
3618e27553
1 changed files with 6 additions and 2 deletions
8
bus.cpp
8
bus.cpp
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue