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 
9 #include "usb_aoa.h"
10 
11 struct usbh_aoa {
12     struct usbh_hubport *hport;
13     struct usb_endpoint_descriptor *bulkin;  /* Bulk IN endpoint */
14     struct usb_endpoint_descriptor *bulkout; /* Bulk OUT endpoint */
15 
16     struct usbh_urb bulkout_urb;
17     struct usbh_urb bulkin_urb;
18 
19     uint8_t intf;
20     uint8_t minor;
21 
22     void *user_data;
23 };
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 int usbh_aoa_switch(struct usbh_hubport *hport, struct aoa_string_info *info);
30 int usbh_aoa_register_hid(struct usbh_aoa *aoa_class, uint16_t id, uint8_t *report, uint32_t report_len);
31 int usbh_aoa_send_hid_event(struct usbh_aoa *aoa_class, uint16_t id, uint8_t *event, uint32_t event_len);
32 
33 void usbh_aoa_run(struct usbh_aoa *aoa_class);
34 void usbh_aoa_stop(struct usbh_aoa *aoa_class);
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 
40 #endif /* USBH_AOA_H */