From c4a8a10ba463b77cc4c406d3d1fdd4892977a43f Mon Sep 17 00:00:00 2001 From: MDC Service Date: Thu, 26 May 2022 10:33:41 +0200 Subject: Add files via upload --- software/main/etc.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 software/main/etc.cpp (limited to 'software/main/etc.cpp') 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 + * 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"); +} -- cgit v1.2.3