aboutsummaryrefslogtreecommitdiff
path: root/software/main/etc.cpp
diff options
context:
space:
mode:
authorMDC Service <michael.schmid@mdc-service.de>2022-05-26 10:33:41 +0200
committerGitHub <noreply@github.com>2022-05-26 10:33:41 +0200
commitc4a8a10ba463b77cc4c406d3d1fdd4892977a43f (patch)
tree8bfe3ed8db716e01d189f6555350f069209cbfa3 /software/main/etc.cpp
parent296e3a36d9616cfa039b768caf29e1a6ea394410 (diff)
Add files via upload
Diffstat (limited to 'software/main/etc.cpp')
-rw-r--r--software/main/etc.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/software/main/etc.cpp b/software/main/etc.cpp
new file mode 100644
index 0000000..99bcf20
--- /dev/null
+++ b/software/main/etc.cpp
@@ -0,0 +1,26 @@
+/*
+ * etc.cpp
+ *
+ * Created on: 26.02.2022
+ * Author: steffen
+ * SPDX-FileCopyrightText: 2022 MDC Service <info@mdc-service.de>
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+#include "etc.h"
+
+
+/**
+ * DumpBuf: helper function to dump a buffer
+ *
+ * @param buf the buffer to dump.
+ * @param len lenght of the buffer to dump.
+ */
+void DumpBuf(void *buf, int len) {
+ int i, c;
+ char *lb = (char*) buf;
+ for (i = 0; i < len; i++) {
+ c = (char) *lb++;
+ printf("%02X ", c);
+ }
+ printf("\n");
+}