usbh_hid.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /**
  2. * @file usbh_hid.h
  3. * @brief
  4. *
  5. * Copyright (c) 2022 sakumisu
  6. *
  7. * Licensed to the Apache Software Foundation (ASF) under one or more
  8. * contributor license agreements. See the NOTICE file distributed with
  9. * this work for additional information regarding copyright ownership. The
  10. * ASF licenses this file to you under the Apache License, Version 2.0 (the
  11. * "License"); you may not use this file except in compliance with the
  12. * License. You may obtain a copy of the License at
  13. *
  14. * http://www.apache.org/licenses/LICENSE-2.0
  15. *
  16. * Unless required by applicable law or agreed to in writing, software
  17. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  18. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  19. * License for the specific language governing permissions and limitations
  20. * under the License.
  21. *
  22. */
  23. #ifndef _USBH_HID_H
  24. #define _USBH_HID_H
  25. #include "usb_hid.h"
  26. struct usbh_hid {
  27. struct usbh_hubport *hport;
  28. uint8_t intf; /* interface number */
  29. uint8_t minor;
  30. usbh_epinfo_t intin; /* INTR IN endpoint */
  31. usbh_epinfo_t intout; /* INTR OUT endpoint */
  32. };
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36. int usbh_hid_set_idle(struct usbh_hid *hid_class, uint8_t report_id, uint8_t duration);
  37. int usbh_hid_get_idle(struct usbh_hid *hid_class, uint8_t *buffer);
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif