• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022, sakumisu
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 #ifndef USBH_HID_H
7 #define USBH_HID_H
8 
9 #include "usb_hid.h"
10 
11 struct usbh_hid {
12     struct usbh_hubport *hport;
13 
14     uint8_t report_desc[128];
15     uint8_t intf; /* interface number */
16     uint8_t minor;
17     usbh_pipe_t intin;  /* INTR IN endpoint */
18     usbh_pipe_t intout; /* INTR OUT endpoint */
19 };
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 int usbh_hid_set_idle(struct usbh_hid *hid_class, uint8_t report_id, uint8_t duration);
26 int usbh_hid_get_idle(struct usbh_hid *hid_class, uint8_t *buffer);
27 
28 void usbh_hid_run(struct usbh_hid *hid_class);
29 void usbh_hid_stop(struct usbh_hid *hid_class);
30 
31 #ifdef __cplusplus
32 }
33 #endif
34 
35 #endif /* USBH_HID_H */
36