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

Loading…
Cancel
Save