summaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
authorJoshua Liu <joshua.liu@sourceobby.com>2025-09-20 18:46:55 -0400
committerJoshua Liu <joshua.liu@sourceobby.com>2025-09-20 18:46:55 -0400
commitaaa199a4b9750700d5ea3463615272e30bb98fa3 (patch)
tree31d01b6419c49fe9022f55a6088c39eb5605ae60 /test.c
parent70a66e53ddc07c71da684303782193b13051b68f (diff)
feat: new test filetesting
Diffstat (limited to 'test.c')
-rw-r--r--test.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/test.c b/test.c
new file mode 100644
index 0000000..3fc5a04
--- /dev/null
+++ b/test.c
@@ -0,0 +1,29 @@
+#include "streamdeck.h"
+#include <hidapi/hidapi.h>
+#include <unistd.h>
+#include <stdio.h>
+
+/* The point of this file is to test the backend */
+int main() {
+ if (init ())
+ {
+ return -1;
+ }
+ // handler* streamdeck_handler = create_hid_handler ();
+ streamdeck* mini = connect();
+ if (!mini)
+ {
+ return -2;
+ }
+ reset(mini->hid_handle);
+ sleep (10);
+ printf("butterdog\n");
+ if (set_brightness(mini, 10) == -1)
+ printf("failed\n");
+ sleep (3);
+ set_brightness(mini, 100);
+ destroy_streamdeck(mini);
+ printf("done!\n");
+ clean_exit();
+ return 0;
+}