MEGA65 / mega65-tools

Tools and Utilities for the MEGA65 Retro Computers
GNU General Public License v3.0
30 stars 31 forks source link

open_the_serial_port() calls mega65_peek() which violates Principle Of Least Surprise #102

Closed gardners closed 2 years ago

gardners commented 2 years ago

It tries to mega65_peek() which is bad if the code is re-used to talk to other serialports for other reasons, like JTAG or power control boards.

The following line should be moved to the caller that needs it:

  xemu_flag = mega65_peek(0xffd360f) & 0x20 ? 0 : 1;