mirror of
https://github.com/stupidcomputer/jsfw.git
synced 2025-01-13 11:47:37 -06:00
18 lines
314 B
C
18 lines
314 B
C
|
#include <stdlib.h>
|
||
|
#include <dirent.h>
|
||
|
#include <stdio.h>
|
||
|
|
||
|
void hid_main() {
|
||
|
DIR *d;
|
||
|
struct dirent *dir;
|
||
|
d = opendir("/sys/class/hidraw");
|
||
|
if(d) {
|
||
|
while ((dir = readdir(d)) != NULL) {
|
||
|
if(dir->d_type != DT_LNK) continue;
|
||
|
printf("%s\n", dir->d_ino);
|
||
|
}
|
||
|
closedir(d);
|
||
|
}
|
||
|
exit(0);
|
||
|
}
|