usbh_aoa.h 939 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) 2024, sakumisu
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #ifndef USBH_AOA_H
  7. #define USBH_AOA_H
  8. #include "usb_aoa.h"
  9. struct usbh_aoa {
  10. struct usbh_hubport *hport;
  11. struct usb_endpoint_descriptor *bulkin; /* Bulk IN endpoint */
  12. struct usb_endpoint_descriptor *bulkout; /* Bulk OUT endpoint */
  13. struct usbh_urb bulkout_urb;
  14. struct usbh_urb bulkin_urb;
  15. uint8_t intf;
  16. uint8_t minor;
  17. void *user_data;
  18. };
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. int usbh_aoa_switch(struct usbh_hubport *hport, struct aoa_string_info *info);
  23. int usbh_aoa_register_hid(struct usbh_aoa *aoa_class, uint16_t id, uint8_t *report, uint32_t report_len);
  24. int usbh_aoa_send_hid_event(struct usbh_aoa *aoa_class, uint16_t id, uint8_t *event, uint32_t event_len);
  25. void usbh_aoa_run(struct usbh_aoa *aoa_class);
  26. void usbh_aoa_stop(struct usbh_aoa *aoa_class);
  27. #ifdef __cplusplus
  28. }
  29. #endif
  30. #endif /* USBH_AOA_H */