summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorJoshua Liu <joshua.liu@sourceobby.com>2025-06-22 21:43:37 -0400
committerJoshua Liu <joshua.liu@sourceobby.com>2025-06-22 21:43:37 -0400
commit61d4c68263ee989930421ffb631a1174c6638441 (patch)
treeb451dc437c81c0cd17eaa61c66d4f257159e1a83 /util.c
parent323609e742d0cdc39842907530f98048a62419eb (diff)
created the function declarations for die, set_data, parsestreamdeckdata and writestreamdeckdata, and implemented set_data and die
Diffstat (limited to 'util.c')
-rw-r--r--util.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/util.c b/util.c
index e69de29..84733b1 100644
--- a/util.c
+++ b/util.c
@@ -0,0 +1,18 @@
+#include "util.h"
+
+int
+die(const char* msg)
+{
+ fprintf_s(stderr, "%s\n", msg);
+ exit(-1);
+}
+
+int
+set_data(unsigned char* data)
+{
+ if (memset(data, 0x00, 17))
+ {
+ return -1;
+ }
+ return 0;
+}