diff --git a/ESP32/console_esp32.cpp b/ESP32/console_esp32.cpp index 04928cb..df20bc1 100644 --- a/ESP32/console_esp32.cpp +++ b/ESP32/console_esp32.cpp @@ -10,8 +10,8 @@ #define NEOPIXELS_PIN 25 -console_esp32::console_esp32(std::atomic_bool *const terminate, std::atomic_bool *const interrupt_emulation, bus *const b) : - console(terminate, interrupt_emulation, b) +console_esp32::console_esp32(std::atomic_uint32_t *const stop_event, bus *const b) : + console(stop_event, b) { } diff --git a/ESP32/console_esp32.h b/ESP32/console_esp32.h index 8958c37..6197fa3 100644 --- a/ESP32/console_esp32.h +++ b/ESP32/console_esp32.h @@ -11,7 +11,7 @@ protected: void put_char_ll(const char c) override; public: - console_esp32(std::atomic_bool *const terminate, std::atomic_bool *const interrupt_emulation, bus *const b); + console_esp32(std::atomic_uint32_t *const stop_event, bus *const b); virtual ~console_esp32(); void put_string_lf(const std::string & what) override; diff --git a/ESP32/main.ino b/ESP32/main.ino index 6d79e78..629c576 100644 --- a/ESP32/main.ino +++ b/ESP32/main.ino @@ -14,6 +14,7 @@ #include "debugger.h" #include "error.h" #include "esp32.h" +#include "gen.h" #include "memory.h" #include "tty.h" #include "utils.h" @@ -24,20 +25,17 @@ cpu *c = nullptr; tty *tty_ = nullptr; console *cnsl = nullptr; -uint32_t event = 0; - uint16_t exec_addr = 0; uint32_t start_ts = 0; SdFat32 sd; -std::atomic_bool terminate { false }; -std::atomic_bool interrupt_emulation { false }; +std::atomic_uint32_t stop_event { EVENT_NONE }; -std::atomic_bool *running { nullptr }; +std::atomic_bool *running { nullptr }; -bool trace_output { false }; +bool trace_output { false }; // std::atomic_bool on_wifi { false }; @@ -182,7 +180,7 @@ void setup() { b = new bus(); Serial.println(F("Init CPU")); - c = new cpu(b, &event); + c = new cpu(b, &stop_event); Serial.println(F("Connect CPU to BUS")); b->add_cpu(c); @@ -190,7 +188,7 @@ void setup() { c->setEmulateMFPT(true); Serial.println(F("Init console")); - cnsl = new console_esp32(&terminate, &interrupt_emulation, b); + cnsl = new console_esp32(&stop_event, b); running = cnsl->get_running_flag(); @@ -232,7 +230,7 @@ void setup() { } void loop() { - debugger(cnsl, b, &interrupt_emulation, false); + debugger(cnsl, b, &stop_event, false); c->reset(); } diff --git a/ESP32/rl02.cpp b/ESP32/rl02.cpp new file mode 120000 index 0000000..1febf02 --- /dev/null +++ b/ESP32/rl02.cpp @@ -0,0 +1 @@ +../rl02.cpp \ No newline at end of file diff --git a/ESP32/rl02.h b/ESP32/rl02.h new file mode 120000 index 0000000..49b1e34 --- /dev/null +++ b/ESP32/rl02.h @@ -0,0 +1 @@ +../rl02.h \ No newline at end of file diff --git a/ESP32/rx02.cpp b/ESP32/rx02.cpp deleted file mode 120000 index cfba1c9..0000000 --- a/ESP32/rx02.cpp +++ /dev/null @@ -1 +0,0 @@ -../rx02.cpp \ No newline at end of file diff --git a/ESP32/rx02.h b/ESP32/rx02.h deleted file mode 120000 index 2761400..0000000 --- a/ESP32/rx02.h +++ /dev/null @@ -1 +0,0 @@ -../rx02.h \ No newline at end of file