Use `Runtime.*` instead of `Kaleidoscope.*` in SimHarness.cpp

This means we can just include `Runtime.h` instead of all of `Kaleidoscope.h`,
as a way of narrowing header includes.

Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
pull/1162/head
Michael Richters 3 years ago
parent 7d08de5d23
commit 5cee5d7d2a
No known key found for this signature in database
GPG Key ID: 1288FD13E4EEF0C0

@ -31,7 +31,7 @@ void SimHarness::RunCycle() {
millis();
}
}
Kaleidoscope.loop();
kaleidoscope::Runtime.loop();
}
void SimHarness::RunCycles(size_t n) {
@ -39,20 +39,20 @@ void SimHarness::RunCycles(size_t n) {
}
void SimHarness::RunForMillis(size_t t) {
auto start_time = Kaleidoscope.millisAtCycleStart();
while (Kaleidoscope.millisAtCycleStart() - start_time < t) {
auto start_time = kaleidoscope::Runtime.millisAtCycleStart();
while (kaleidoscope::Runtime.millisAtCycleStart() - start_time < t) {
RunCycle();
}
}
void SimHarness::Press(KeyAddr key_addr) {
Kaleidoscope.device().keyScanner().setKeystate(
kaleidoscope::Runtime.device().keyScanner().setKeystate(
key_addr,
kaleidoscope::Device::Props::KeyScanner::KeyState::Pressed);
}
void SimHarness::Release(KeyAddr key_addr) {
Kaleidoscope.device().keyScanner().setKeystate(
kaleidoscope::Runtime.device().keyScanner().setKeystate(
key_addr,
kaleidoscope::Device::Props::KeyScanner::KeyState::NotPressed);
}

Loading…
Cancel
Save