class
Crybus::Connector
- Crybus::Connector
- Reference
- Object
Overview
A handler for data being sent to and received from the bus
Defined in:
cry-bus/connector.crConstructors
-
.new(bus : Bus)
Creates a new connector and auto connects a bus
-
.new
Creates a new connector with no bus
Instance Method Summary
-
#bus : Bus | Nil
The bus this connector is attached to
-
#bus=(bus : Bus | Nil)
The bus this connector is attached to
-
#read(address : UInt32) : UInt8
Read from the bus this connector is connected to.
If not connected, returns a garbage value. -
#segments : Array(Segment)
An array of segments (address spaces this connector uses)
-
#write(address : UInt32, data : UInt8)
Writes to the buss this connector is connected to.
If not connected, does nothing.
Constructor Detail
Instance Method Detail
def read(address : UInt32) : UInt8
#
Read from the bus this connector is connected to.
If not connected, returns a garbage value.
An array of segments (address spaces this connector uses)
def write(address : UInt32, data : UInt8)
#
Writes to the buss this connector is connected to.
If not connected, does nothing.