Tie CTS signal from the serial port to the appropriate AVox pin.

Still TODO is actually implement this in the platform-specific serial code.
This commit is contained in:
Stephen Anthony 2020-07-30 13:33:22 -02:30
parent 53338ce6ef
commit c171783695
2 changed files with 11 additions and 2 deletions

View File

@ -51,8 +51,9 @@ bool AtariVox::read(DigitalPin pin)
{
// Pin 2: SpeakJet READY
case DigitalPin::Two:
// For now, we just assume the device is always ready
return setPin(pin, true);
{
return setPin(pin, mySerialPort->isCTS());
}
default:
return SaveKey::read(pin);

View File

@ -58,6 +58,14 @@ class SerialPort
*/
virtual bool writeByte(uInt8 data) { return false; }
/**
Test for 'Clear To Send' enabled. By default, assume it's always
OK to send more data.
@return True if CTS signal enabled, else false
*/
virtual bool isCTS() { return true; }
private:
// Following constructors and assignment operators not supported
SerialPort(const SerialPort&) = delete;