Skip to content

Commit

Permalink
Implement SerialLink CTS
Browse files Browse the repository at this point in the history
  • Loading branch information
tomm committed Feb 29, 2024
1 parent 76d786a commit c390a76
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
members = ["agon-light-emulator-debugger"]

[workspace.package]
version = "0.9.32"
version = "0.9.33"
edition = "2021"
authors = ["Tom Morton <[email protected]>"]
license = "GPL-3.0"
Expand Down Expand Up @@ -41,4 +41,4 @@ raw_tty = "0.1.0"

[workspace.dependencies]
#agon-cpu-emulator = { path = "../agon-cpu-emulator" }
agon-cpu-emulator = { git = "https://github.com/tomm/agon-cpu-emulator.git", rev="6ac7dd0696c6a24c2aa29433ed513f7d77bee14e"}
agon-cpu-emulator = { git = "https://github.com/tomm/agon-cpu-emulator.git", rev="2cd16d251be608d2a0f2dae8cc3e930f216cedf2"}
5 changes: 5 additions & 0 deletions src/ez80_serial_links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ impl SerialLink for DummySerialLink {
println!("{}_send: 0x{:02x}", self.name, byte);
}
fn recv(&mut self) -> Option<u8> { None }
fn read_clear_to_send(&mut self) -> bool { true }
}

pub struct Ez80ToVdpSerialLink {
Expand All @@ -30,6 +31,7 @@ impl SerialLink for Ez80ToVdpSerialLink {
}
}
}
fn read_clear_to_send(&mut self) -> bool { true }
}

pub struct Ez80ToHostSerialLink {
Expand Down Expand Up @@ -71,4 +73,7 @@ impl SerialLink for Ez80ToHostSerialLink {
Err(_) => None
}
}
fn read_clear_to_send(&mut self) -> bool {
self.port.read_clear_to_send().unwrap_or(false)
}
}

0 comments on commit c390a76

Please sign in to comment.