You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

24 lines
805 B

  1. #ifndef rawhid_included_h__
  2. #define rawhid_included_h__
  3. // Raw HID, Basic API
  4. typedef void rawhid_t;
  5. rawhid_t * rawhid_open_only1(int vid, int pid, int usage_page, int usage);
  6. int rawhid_status(rawhid_t *hid);
  7. int rawhid_read(rawhid_t *h, void *buf, int bufsize, int timeout_ms);
  8. int rawhid_write(rawhid_t *hid, const void *buf, int len, int timeout_ms);
  9. void rawhid_close(rawhid_t *h);
  10. // Raw HID, Multiple Device API
  11. typedef void rawhid_list_t;
  12. rawhid_list_t * rawhid_list_open(int vid, int pid, int usage_page, int usage);
  13. int rawhid_list_count(rawhid_list_t *list);
  14. void rawhid_list_close(rawhid_list_t *list);
  15. int rawhid_list_indexof(rawhid_list_t *list, rawhid_t *hid);
  16. void rawhid_list_remove(rawhid_list_t *list, rawhid_t *hid);
  17. rawhid_t * rawhid_open(rawhid_list_t *list, int index);
  18. #endif