diff options
author | Joshua Liu <joshua.liu@sourceobby.com> | 2025-09-20 18:46:55 -0400 |
---|---|---|
committer | Joshua Liu <joshua.liu@sourceobby.com> | 2025-09-20 18:46:55 -0400 |
commit | aaa199a4b9750700d5ea3463615272e30bb98fa3 (patch) | |
tree | 31d01b6419c49fe9022f55a6088c39eb5605ae60 | |
parent | 70a66e53ddc07c71da684303782193b13051b68f (diff) |
feat: new test filetesting
-rw-r--r-- | test.c | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -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; +} |