Module spectrusty_peripherals::serial
source · Expand description
Serial port related API and emulation of ZX Spectrum’s peripheral devices using serial communication.
The terminology regarding serial port pins/lines being used in ZX Spectrum’s technical documentation:
RxD
(Receive Data) Transmitted data from Spectrum to the remote device.CTS
(Clear to Send) Tells remote station that Spectrum wishes to send data.TxD
(Transmit Data) Received data from the remote device.DTR
(Data Terminal Ready) Tells Spectrum that the remote station wishes to send data.
Structs
Every key’s state is encoded as a single bit on this 20-bit flag type.
A serial port device that does nothing and provides a constant ControlState::Inactive signal
on the
DTR
line and a DataState::Mark signal on the TxD
line.The RS-232 serial port remote device.
The ZX Spectrum 128 extension keypad.
Enums
A type representing a state on one of the
CONTROL
lines: CTS
or DTR
.A type representing a state on one of the
DATA
lines: RxD
or TxD
.Constants
Spectrum’s BAUD RATES.
A default BAUD RATE used by Spectrum.
Traits
An interface for emulating communication between a ZX Spectrum’s hardware port and remote devices.