Skip to content

Commit 40de5a6

Browse files
committed
README: add hid_close() to the code sample
1 parent 1750cc8 commit 40de5a6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ int main(int argc, char* argv[])
135135
for (i = 0; i < 4; i++)
136136
printf("buf[%d]: %d\n", i, buf[i]);
137137

138+
// Close the device
139+
hid_close(handle);
140+
138141
// Finalize the hidapi library
139142
res = hid_exit();
140143

0 commit comments

Comments
 (0)