From 89cb870ed853d1a1245e86989fe422dd48daf057 Mon Sep 17 00:00:00 2001 From: Vladimir Efimov Date: Tue, 21 Apr 2026 12:44:07 +0200 Subject: [PATCH] added is_client_connected method to remote_bitbang class --- riscv/remote_bitbang.cc | 4 ++++ riscv/remote_bitbang.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/riscv/remote_bitbang.cc b/riscv/remote_bitbang.cc index 182b3713..32775f2a 100644 --- a/riscv/remote_bitbang.cc +++ b/riscv/remote_bitbang.cc @@ -184,3 +184,7 @@ void remote_bitbang_t::execute_commands() } } } + +bool remote_bitbang_t::is_client_connected() const{ + return client_fd != 0; +} \ No newline at end of file diff --git a/riscv/remote_bitbang.h b/riscv/remote_bitbang.h index b5b73bfd..e08d6458 100644 --- a/riscv/remote_bitbang.h +++ b/riscv/remote_bitbang.h @@ -15,6 +15,9 @@ public: // Do a bit of work. void tick(); + // Check if any client is connected + bool is_client_connected() const; + private: jtag_dtm_t *tap;