@@ -62,7 +62,7 @@ typedef struct
62
62
// Interface API
63
63
//--------------------------------------------------------------------+
64
64
65
- // Get the number of mounted HID interfaces of a device
65
+ // Get the total number of mounted HID interfaces of a device
66
66
uint8_t tuh_hid_itf_get_count (uint8_t dev_addr );
67
67
68
68
// Get all mounted interfaces across devices
@@ -109,14 +109,17 @@ bool tuh_hid_set_report(uint8_t dev_addr, uint8_t idx, uint8_t report_id, uint8_
109
109
// Interrupt Endpoint API
110
110
//--------------------------------------------------------------------+
111
111
112
- // Check if the interface is ready to use
113
- // bool tuh_n_hid_n_ready (uint8_t dev_addr, uint8_t idx);
112
+ // Check if HID interface is ready to receive report
113
+ bool tuh_hid_receive_ready (uint8_t dev_addr , uint8_t idx );
114
114
115
115
// Try to receive next report on Interrupt Endpoint. Immediately return
116
116
// - true If succeeded, tuh_hid_report_received_cb() callback will be invoked when report is available
117
117
// - false if failed to queue the transfer e.g endpoint is busy
118
118
bool tuh_hid_receive_report (uint8_t dev_addr , uint8_t idx );
119
119
120
+ // Check if HID interface is ready to send report
121
+ bool tuh_hid_send_ready (uint8_t dev_addr , uint8_t idx );
122
+
120
123
// Send report using interrupt endpoint
121
124
// If report_id > 0 (composite), it will be sent as 1st byte, then report contents. Otherwise only report content is sent.
122
125
bool tuh_hid_send_report (uint8_t dev_addr , uint8_t idx , uint8_t report_id , const void * report , uint16_t len );
0 commit comments