aboutsummaryrefslogtreecommitdiff
path: root/software/main/etc.cpp
blob: 99bcf2031ebf305583c37e4a9bd2154ef2dc18f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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");
}