You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
405 B
17 lines
405 B
// SPDX-FileCopyrightText: 2020 Foundation Devices, Inc. <hello@foundationdevices.com>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
//
|
|
// Utility functions
|
|
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
|
|
void dump_buf(uint8_t* buf, int len) {
|
|
for (int i=0; i<len; i++) {
|
|
printf("%02x ", buf[i]);
|
|
i++;
|
|
if ((i % 16 == 0) || (i == len - 1)) {
|
|
printf("\n");
|
|
}
|
|
}
|
|
}
|