2022-01-10 23:00:58 -05:00
|
|
|
// Copyright Terence J. Boldt (c)2021-2022
|
2021-10-30 09:50:00 -04:00
|
|
|
// Use of this source code is governed by an MIT
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
// This file defines the interface for communicating with the Apple II via
|
|
|
|
// the Raspberry Pi GPIO ports but can also be mocked out for tests or
|
|
|
|
// passed input to the user for interactive testing
|
2021-11-03 05:33:09 -04:00
|
|
|
|
2021-05-30 07:18:39 -04:00
|
|
|
package a2io
|
|
|
|
|
2021-11-03 05:33:09 -04:00
|
|
|
// A2Io provides an interface to send and receive data to the Apple II
|
2021-10-30 07:03:18 -04:00
|
|
|
type A2Io interface {
|
|
|
|
Init()
|
|
|
|
WriteByte(data byte) error
|
|
|
|
WriteString(outString string) error
|
|
|
|
WriteBlock(buffer []byte) error
|
|
|
|
WriteBuffer(buffer []byte) error
|
|
|
|
ReadByte() (byte, error)
|
|
|
|
ReadString() (string, error)
|
|
|
|
ReadBlock(buffer []byte) error
|
2021-11-10 21:44:28 -05:00
|
|
|
SendCharacter(character byte)
|
2021-11-25 18:45:56 -05:00
|
|
|
ReadCharacter() (string, error)
|
2021-10-30 07:03:18 -04:00
|
|
|
}
|