Skip to content

A Hardware Hacking Tool with Web-Based CLI That Speaks Every Protocol

create specific device view for cardputer standalone that allows to use logic trace

Geo95a7f377b0b5
diff --git a/src/Views/CardputerDeviceView.cpp b/src/Views/CardputerDeviceView.cpp
new file mode 100644
index 00000000..0fda3e59
--- /dev/null
+++ b/src/Views/CardputerDeviceView.cpp
@@ -0,0 +1,10 @@
+#if defined(DEVICE_CARDPUTER)
+
+#include "CardputerDeviceView.h"
+
+// Reuse the M5DeviceView implementation
+void CardputerDeviceView::drawLogicTrace(uint8_t pin, const std::vector<uint8_t>& buffer) {
+ M5DeviceView::drawLogicTrace(pin, buffer);
+}
+
+#endif // DEVICE_CARDPUTER
diff --git a/src/Views/CardputerDeviceView.h b/src/Views/CardputerDeviceView.h
new file mode 100644
index 00000000..37b72965
--- /dev/null
+++ b/src/Views/CardputerDeviceView.h
@@ -0,0 +1,26 @@
+#ifdef DEVICE_CARDPUTER
+
+#pragma once
+
+#include "M5DeviceView.h"
+
+class CardputerDeviceView : public M5DeviceView {
+public:
+ // All disabled except drawLogicTrace
+ void initialize() override {}
+ SPIClass& getScreenSpiInstance() override { return *(SPIClass*)(nullptr); }
+ void welcome(TerminalTypeEnum& /*terminalType*/, std::string& /*terminalInfos*/) override {}
+ void logo() override {}
+ void show(PinoutConfig& /*config*/) override {}
+ void topBar(const std::string& /*title*/, bool /*submenu*/, bool /*searchBar*/) override {}
+ void horizontalSelection(const std::vector<std::string>& /*options*/,
+ uint16_t /*selectedIndex*/,
+ const std::string& /*description1*/,
+ const std::string& /*description2*/) override {}
+ void loading() override {}
+
+ // Only this one is implemented
+ void drawLogicTrace(uint8_t pin, const std::vector<uint8_t>& buffer) override;
+};
+
+#endif // DEVICE_CARDPUTER