aboutsummaryrefslogtreecommitdiff
path: root/src/sample_cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sample_cli.c')
-rw-r--r--src/sample_cli.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/sample_cli.c b/src/sample_cli.c
new file mode 100644
index 0000000..5236c23
--- /dev/null
+++ b/src/sample_cli.c
@@ -0,0 +1,19 @@
+#include<stdio.h>
+#include "razerdevice.h"
+#include "razerkbd_driver.h"
+
+int main(int argc, const char * argv[]) {
+ RazerDevices allDevices = getAllRazerDevices();
+ RazerDevice *razerDevices = allDevices.devices;
+
+ printf("%d Razer device(s) found:\n", allDevices.size);
+
+ for (int i = 0; i < allDevices.size; i++) {
+ RazerDevice device = razerDevices[i];
+ printf("%#06x\n", device.productId);
+ }
+
+ closeAllRazerDevices(allDevices);
+ return 0;
+
+}