aboutsummaryrefslogtreecommitdiff
path: root/experiments/conv/bin2h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-05 00:08:43 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-05 00:08:43 +0200
commitc6fcdf6d65b3f9c6693cdc4bf971083c7ced687d (patch)
tree3d85dfed5a1d1d997c921a12f548b85fbf2ab66c /experiments/conv/bin2h
parent2128ad182721b25ec349afd8dbe124d68f8aaee3 (diff)
add bin2h and crop
Diffstat (limited to 'experiments/conv/bin2h')
-rwxr-xr-xexperiments/conv/bin2h11
1 files changed, 11 insertions, 0 deletions
diff --git a/experiments/conv/bin2h b/experiments/conv/bin2h
new file mode 100755
index 0000000..9123848
--- /dev/null
+++ b/experiments/conv/bin2h
@@ -0,0 +1,11 @@
+#!/bin/sh
+input_file="$1"
+cat <<EOF
+#pragma once
+const unsigned int VSR_PC_MSG_DATA_LEN = $(wc -c < "$input_file");
+const unsigned char VSR_PC_MSG_DATA[] = {
+$(xxd -include < "$input_file")
+};
+
+EOF
+