Skip to content

Commit

Permalink
Correct example including hidapi.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Youw committed Aug 17, 2021
1 parent 8741697 commit f75adc3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hidtest/test.c
Expand Up @@ -18,7 +18,8 @@
#include <wchar.h>
#include <string.h>
#include <stdlib.h>
#include "hidapi.h"

#include <hidapi.h>

// Headers needed for sleeping.
#ifdef _WIN32
Expand Down Expand Up @@ -175,7 +176,7 @@ int main(int argc, char* argv[])
printf("waiting...\n");
if (res < 0)
printf("Unable to read()\n");
#ifdef WIN32
#ifdef _WIN32
Sleep(500);
#else
usleep(500*1000);
Expand All @@ -193,7 +194,7 @@ int main(int argc, char* argv[])
/* Free static HIDAPI objects. */
hid_exit();

#ifdef WIN32
#ifdef _WIN32
system("pause");
#endif

Expand Down

0 comments on commit f75adc3

Please sign in to comment.