1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-30 22:56:03 +00:00

Properly conforms to GPIP input/output blending.

This commit is contained in:
Thomas Harte 2019-10-28 22:37:11 -04:00
parent 1135576a3a
commit 553f3b6d8b

View File

@ -20,8 +20,8 @@ uint8_t MFP68901::read(int address) {
address &= 0x1f;
switch(address) {
case 0x00:
LOG("Read: general purpose IO " << PADHEX(2) << int(gpip_input_ | gpip_direction_));
return gpip_input_ | gpip_direction_;
LOG("Read: general purpose IO " << PADHEX(2) << ((gpip_input_ & ~gpip_direction_) | (gpip_output_ & gpip_direction_)));
return (gpip_input_ & ~gpip_direction_) | (gpip_output_ & gpip_direction_);
case 0x01:
LOG("Read: active edge " << PADHEX(2) << int(gpip_active_edge_));
return gpip_active_edge_;