xref: /btstack/src/classic/hid_host.h (revision 580d6bb47e8f6c9a7712424b72529dae638436c3)
163bf37cdSMilanka Ringwald /*
263bf37cdSMilanka Ringwald  * Copyright (C) 2020 BlueKitchen GmbH
363bf37cdSMilanka Ringwald  *
463bf37cdSMilanka Ringwald  * Redistribution and use in source and binary forms, with or without
563bf37cdSMilanka Ringwald  * modification, are permitted provided that the following conditions
663bf37cdSMilanka Ringwald  * are met:
763bf37cdSMilanka Ringwald  *
863bf37cdSMilanka Ringwald  * 1. Redistributions of source code must retain the above copyright
963bf37cdSMilanka Ringwald  *    notice, this list of conditions and the following disclaimer.
1063bf37cdSMilanka Ringwald  * 2. Redistributions in binary form must reproduce the above copyright
1163bf37cdSMilanka Ringwald  *    notice, this list of conditions and the following disclaimer in the
1263bf37cdSMilanka Ringwald  *    documentation and/or other materials provided with the distribution.
1363bf37cdSMilanka Ringwald  * 3. Neither the name of the copyright holders nor the names of
1463bf37cdSMilanka Ringwald  *    contributors may be used to endorse or promote products derived
1563bf37cdSMilanka Ringwald  *    from this software without specific prior written permission.
1663bf37cdSMilanka Ringwald  * 4. Any redistribution, use, or modification is done solely for
1763bf37cdSMilanka Ringwald  *    personal benefit and not for any commercial purpose or for
1863bf37cdSMilanka Ringwald  *    monetary gain.
1963bf37cdSMilanka Ringwald  *
2063bf37cdSMilanka Ringwald  * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
2163bf37cdSMilanka Ringwald  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2263bf37cdSMilanka Ringwald  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
2363bf37cdSMilanka Ringwald  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
2463bf37cdSMilanka Ringwald  * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
2563bf37cdSMilanka Ringwald  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
2663bf37cdSMilanka Ringwald  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
2763bf37cdSMilanka Ringwald  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
2863bf37cdSMilanka Ringwald  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2963bf37cdSMilanka Ringwald  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
3063bf37cdSMilanka Ringwald  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3163bf37cdSMilanka Ringwald  * SUCH DAMAGE.
3263bf37cdSMilanka Ringwald  *
3363bf37cdSMilanka Ringwald  * Please inquire about commercial licensing options at
3463bf37cdSMilanka Ringwald  * [email protected]
3563bf37cdSMilanka Ringwald  *
3663bf37cdSMilanka Ringwald  */
3763bf37cdSMilanka Ringwald 
3863bf37cdSMilanka Ringwald #ifndef HID_HOST_H
3963bf37cdSMilanka Ringwald #define HID_HOST_H
4063bf37cdSMilanka Ringwald 
4163bf37cdSMilanka Ringwald #include <stdint.h>
4263bf37cdSMilanka Ringwald #include "btstack_defines.h"
4363bf37cdSMilanka Ringwald #include "bluetooth.h"
443cbedd43SMatthias Ringwald #include "btstack_hid.h"
4563bf37cdSMilanka Ringwald #include "btstack_hid_parser.h"
4663bf37cdSMilanka Ringwald 
4763bf37cdSMilanka Ringwald #if defined __cplusplus
4863bf37cdSMilanka Ringwald extern "C" {
4963bf37cdSMilanka Ringwald #endif
5063bf37cdSMilanka Ringwald 
5101977ed1SMilanka Ringwald 
52fd7ba7a6SMilanka Ringwald typedef enum {
53fd7ba7a6SMilanka Ringwald     HID_HOST_IDLE,
54fd7ba7a6SMilanka Ringwald     HID_HOST_W2_SEND_SDP_QUERY,
55fd7ba7a6SMilanka Ringwald     HID_HOST_W4_SDP_QUERY_RESULT,
56fd7ba7a6SMilanka Ringwald 
57fd7ba7a6SMilanka Ringwald     HID_HOST_W4_CONTROL_CONNECTION_ESTABLISHED,
58fd7ba7a6SMilanka Ringwald     HID_HOST_CONTROL_CONNECTION_ESTABLISHED,
59fd7ba7a6SMilanka Ringwald 
60fd7ba7a6SMilanka Ringwald     HID_HOST_W4_SET_BOOT_MODE,
6101977ed1SMilanka Ringwald     HID_HOST_W4_INCOMING_INTERRUPT_CONNECTION,
62fd7ba7a6SMilanka Ringwald     HID_HOST_W4_INTERRUPT_CONNECTION_ESTABLISHED,
63fd7ba7a6SMilanka Ringwald     HID_HOST_CONNECTION_ESTABLISHED,
64fd7ba7a6SMilanka Ringwald 
65fd7ba7a6SMilanka Ringwald     HID_HOST_W2_SEND_GET_REPORT,
66fd7ba7a6SMilanka Ringwald     HID_HOST_W4_GET_REPORT_RESPONSE,
67fd7ba7a6SMilanka Ringwald     HID_HOST_W2_SEND_SET_REPORT,
68fd7ba7a6SMilanka Ringwald     HID_HOST_W4_SET_REPORT_RESPONSE,
69fd7ba7a6SMilanka Ringwald     HID_HOST_W2_SEND_GET_PROTOCOL,
70fd7ba7a6SMilanka Ringwald     HID_HOST_W4_GET_PROTOCOL_RESPONSE,
7101977ed1SMilanka Ringwald 
72fd7ba7a6SMilanka Ringwald     HID_HOST_W2_SEND_REPORT,
73ab30106eSMilanka Ringwald     HID_HOST_W4_SEND_REPORT_RESPONSE,
74ab30106eSMilanka Ringwald 
75ab30106eSMilanka Ringwald     HID_HOST_W4_INTERRUPT_CONNECTION_DISCONNECTED,
76ab30106eSMilanka Ringwald     HID_HOST_W4_CONTROL_CONNECTION_DISCONNECTED
77fd7ba7a6SMilanka Ringwald } hid_host_state_t;
78fd7ba7a6SMilanka Ringwald 
79fd7ba7a6SMilanka Ringwald typedef struct {
80ab30106eSMilanka Ringwald     btstack_linked_item_t item;
81ab30106eSMilanka Ringwald 
82fd7ba7a6SMilanka Ringwald     uint16_t  hid_cid;
83fd7ba7a6SMilanka Ringwald     hci_con_handle_t con_handle;
84fd7ba7a6SMilanka Ringwald 
85fd7ba7a6SMilanka Ringwald     bd_addr_t remote_addr;
86fd7ba7a6SMilanka Ringwald 
87fd7ba7a6SMilanka Ringwald     uint16_t  control_cid;
88fd7ba7a6SMilanka Ringwald     uint16_t  control_psm;
89fd7ba7a6SMilanka Ringwald     uint16_t  interrupt_cid;
90fd7ba7a6SMilanka Ringwald     uint16_t  interrupt_psm;
91fd7ba7a6SMilanka Ringwald 
92fd7ba7a6SMilanka Ringwald     hid_host_state_t state;
9301977ed1SMilanka Ringwald     bool incoming;
94fd7ba7a6SMilanka Ringwald     hid_protocol_mode_t protocol_mode;
95fd7ba7a6SMilanka Ringwald 
9601977ed1SMilanka Ringwald     bool set_protocol;
9701977ed1SMilanka Ringwald     bool w4_set_protocol_response;
9801977ed1SMilanka Ringwald     hid_protocol_mode_t requested_protocol_mode;
9901977ed1SMilanka Ringwald 
100*580d6bb4SMilanka Ringwald     uint16_t host_max_latency;
101*580d6bb4SMilanka Ringwald     uint16_t host_min_timeout;
102*580d6bb4SMilanka Ringwald 
103fd7ba7a6SMilanka Ringwald     uint16_t hid_descriptor_offset;
104fd7ba7a6SMilanka Ringwald     uint16_t hid_descriptor_len;
105fd7ba7a6SMilanka Ringwald     uint16_t hid_descriptor_max_len;
10605439aa6SMilanka Ringwald     uint8_t  hid_descriptor_status;     // ERROR_CODE_SUCCESS if descriptor available,
10705439aa6SMilanka Ringwald                                         // ERROR_CODE_UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE if not, and
10805439aa6SMilanka Ringwald                                         // ERROR_CODE_MEMORY_CAPACITY_EXCEEDED if descriptor is larger then the available space
109fd7ba7a6SMilanka Ringwald 
110fd7ba7a6SMilanka Ringwald     uint8_t   user_request_can_send_now;
111fd7ba7a6SMilanka Ringwald 
112fd7ba7a6SMilanka Ringwald     // get report
113fd7ba7a6SMilanka Ringwald     hid_report_type_t report_type;
114fd7ba7a6SMilanka Ringwald     uint8_t           report_id;
115fd7ba7a6SMilanka Ringwald 
11659a2ea74SMilanka Ringwald     // control message, bit mask:
11759a2ea74SMilanka Ringwald     // SUSSPEND             1
11859a2ea74SMilanka Ringwald     // EXIT_SUSSPEND        2
11959a2ea74SMilanka Ringwald     // VIRTUAL_CABLE_UNPLUG 4
12059a2ea74SMilanka Ringwald     uint8_t control_tasks;
12159a2ea74SMilanka Ringwald 
122fd7ba7a6SMilanka Ringwald     // set report
123a93a968fSMilanka Ringwald     const uint8_t * report;
124fd7ba7a6SMilanka Ringwald     uint16_t  report_len;
125fd7ba7a6SMilanka Ringwald } hid_host_connection_t;
126fd7ba7a6SMilanka Ringwald 
12763bf37cdSMilanka Ringwald /* API_START */
1285f0d88b0SMilanka Ringwald 
12963bf37cdSMilanka Ringwald /**
13063bf37cdSMilanka Ringwald  * @brief Set up HID Host
13163bf37cdSMilanka Ringwald  * @param hid_descriptor_storage
13263bf37cdSMilanka Ringwald  * @param hid_descriptor_storage_len
13363bf37cdSMilanka Ringwald  */
134fd7ba7a6SMilanka Ringwald void hid_host_init(uint8_t * hid_descriptor_storage, uint16_t hid_descriptor_storage_len);
13563bf37cdSMilanka Ringwald 
13663bf37cdSMilanka Ringwald /**
1375f0d88b0SMilanka Ringwald  * @brief Register callback for the HID Host.
13863bf37cdSMilanka Ringwald  * @param callback
13963bf37cdSMilanka Ringwald  */
14063bf37cdSMilanka Ringwald void hid_host_register_packet_handler(btstack_packet_handler_t callback);
14163bf37cdSMilanka Ringwald 
14263bf37cdSMilanka Ringwald /*
14305439aa6SMilanka Ringwald  * @brief Create HID connection to HID Device and emit HID_SUBEVENT_CONNECTION_OPENED event with status code,
14405439aa6SMilanka Ringwald  * followed by HID_SUBEVENT_DESCRIPTOR_AVAILABLE that informs if the HID Descriptor was found. In the case of incoming
14505439aa6SMilanka Ringwald  * connection, i.e. HID Device initiating the connection, the HID_SUBEVENT_DESCRIPTOR_AVAILABLE is delayed, and the reports
14605439aa6SMilanka Ringwald  * may already come via HID_SUBEVENT_REPORT event. It is up to the application code if
1477379ca3dSMilanka Ringwald  * these reports should be buffered or ignored until the descriptor is available.
1485f0d88b0SMilanka Ringwald  * @note  HID_PROTOCOL_MODE_REPORT_WITH_FALLBACK_TO_BOOT will try ti set up REPORT mode, but fallback to BOOT mode if necessary.
14905439aa6SMilanka Ringwald  * @note  HID_SUBEVENT_DESCRIPTOR_AVAILABLE possible status values are:
15005439aa6SMilanka Ringwald  * - ERROR_CODE_SUCCESS if descriptor available,
15105439aa6SMilanka Ringwald  * - ERROR_CODE_UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE if not, and
15205439aa6SMilanka Ringwald  * - ERROR_CODE_MEMORY_CAPACITY_EXCEEDED if descriptor is larger then the available space
153fd7ba7a6SMilanka Ringwald  * @param remote_addr
1543cbedd43SMatthias Ringwald  * @param protocol_mode see hid_protocol_mode_t in btstack_hid.h
15563bf37cdSMilanka Ringwald  * @param hid_cid to use for other commands
1565f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_COMMAND_DISALLOWED, BTSTACK_MEMORY_ALLOC_FAILED
15763bf37cdSMilanka Ringwald  */
158fd7ba7a6SMilanka Ringwald uint8_t hid_host_connect(bd_addr_t remote_addr, hid_protocol_mode_t protocol_mode, uint16_t * hid_cid);
15963bf37cdSMilanka Ringwald 
1605f0d88b0SMilanka Ringwald 
1615f0d88b0SMilanka Ringwald /*
1625f0d88b0SMilanka Ringwald  * @brief Accept incoming HID connection, this should be called upon receiving HID_SUBEVENT_INCOMING_CONNECTION event.
1635f0d88b0SMilanka Ringwald  * @param hid_cid
1643cbedd43SMatthias Ringwald  * @param protocol_mode see hid_protocol_mode_t in btstack_hid.h
1655f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
1665f0d88b0SMilanka Ringwald  */
16701977ed1SMilanka Ringwald uint8_t hid_host_accept_connection(uint16_t hid_cid, hid_protocol_mode_t protocol_mode);
1685f0d88b0SMilanka Ringwald 
1695f0d88b0SMilanka Ringwald /*
1705f0d88b0SMilanka Ringwald  * @brief Decline incoming HID connection, this should be called upon receiving HID_SUBEVENT_INCOMING_CONNECTION event.
1715f0d88b0SMilanka Ringwald  * @param hid_cid
1725f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
1735f0d88b0SMilanka Ringwald  */
17459a2ea74SMilanka Ringwald uint8_t hid_host_decline_connection(uint16_t hid_cid);
17559a2ea74SMilanka Ringwald 
17663bf37cdSMilanka Ringwald /*
1775f0d88b0SMilanka Ringwald  * @brief Disconnect from HID Device and emit HID_SUBEVENT_CONNECTION_CLOSED event.
17863bf37cdSMilanka Ringwald  * @param hid_cid
17963bf37cdSMilanka Ringwald  */
18063bf37cdSMilanka Ringwald void hid_host_disconnect(uint16_t hid_cid);
18163bf37cdSMilanka Ringwald 
18259a2ea74SMilanka Ringwald // Control messages:
1835f0d88b0SMilanka Ringwald 
1845f0d88b0SMilanka Ringwald /*
1855f0d88b0SMilanka Ringwald  * @brief Send SUSPEND control signal to connected HID Device. A Bluetooth HID Device which receives a SUSPEND control signal
1865f0d88b0SMilanka Ringwald  * may optionally disconnect from the Bluetooth HID Host.
1875f0d88b0SMilanka Ringwald  * @param hid_cid
1885f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
1895f0d88b0SMilanka Ringwald  */
19059a2ea74SMilanka Ringwald uint8_t hid_host_send_suspend(uint16_t hid_cid);
1915f0d88b0SMilanka Ringwald 
1925f0d88b0SMilanka Ringwald /*
1935f0d88b0SMilanka Ringwald  * @brief Order connected HID Device to exit suspend mode.
1945f0d88b0SMilanka Ringwald  * The Bluetooth HID Device shall send a report to the Bluetooth HID Host.
1955f0d88b0SMilanka Ringwald  * @param hid_cid
1965f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
1975f0d88b0SMilanka Ringwald  */
19859a2ea74SMilanka Ringwald uint8_t hid_host_send_exit_suspend(uint16_t hid_cid);
1995f0d88b0SMilanka Ringwald 
2005f0d88b0SMilanka Ringwald /*
2015f0d88b0SMilanka Ringwald  * @brief Unplug connected HID Device.
2025f0d88b0SMilanka Ringwald  * @note This is the only command that can be also received from HID Device. It will be indicated by receiving
2035f0d88b0SMilanka Ringwald  * HID_SUBEVENT_VIRTUAL_CABLE_UNPLUG event, as well as disconnecting HID Host from device.
2045f0d88b0SMilanka Ringwald  * @param hid_cid
2055f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
2065f0d88b0SMilanka Ringwald  */
20759a2ea74SMilanka Ringwald uint8_t hid_host_send_virtual_cable_unplug(uint16_t hid_cid);
20863bf37cdSMilanka Ringwald 
2095f0d88b0SMilanka Ringwald /*
2105f0d88b0SMilanka Ringwald  * @brief Set Protocol Mode on the Bluetooth HID Device and emit HID_SUBEVENT_SET_PROTOCOL_RESPONSE event with handshake_status, see hid_handshake_param_type_t
2115f0d88b0SMilanka Ringwald  * @param hid_cid
2123cbedd43SMatthias Ringwald  * @param protocol_mode see hid_protocol_mode_t in btstack_hid.h
2135f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
2145f0d88b0SMilanka Ringwald  */
215fe493a7cSMilanka Ringwald uint8_t hid_host_send_set_protocol_mode(uint16_t hid_cid, hid_protocol_mode_t protocol_mode);
2165f0d88b0SMilanka Ringwald 
2175f0d88b0SMilanka Ringwald /*
2185f0d88b0SMilanka Ringwald  * @brief Retrieve the Protocol Mode of the Bluetooth HID Device and emit HID_SUBEVENT_GET_PROTOCOL_RESPONSE with handshake_status, see hid_handshake_param_type_t
2195f0d88b0SMilanka Ringwald  * @param hid_cid
2203cbedd43SMatthias Ringwald  * @param protocol_mode see hid_protocol_mode_t in btstack_hid.h
2215f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
2225f0d88b0SMilanka Ringwald  */
223fe493a7cSMilanka Ringwald uint8_t hid_host_send_get_protocol(uint16_t hid_cid);
224fe493a7cSMilanka Ringwald 
2255f0d88b0SMilanka Ringwald /*
2265f0d88b0SMilanka Ringwald 
2275f0d88b0SMilanka Ringwald  * @brief Send report to a Bluetooth HID Device and emit HID_SUBEVENT_SET_REPORT_RESPONSE with handshake_status, see hid_handshake_param_type_t. The Bluetooth HID Host shall send complete reports.
2285f0d88b0SMilanka Ringwald  * @param hid_cid
2293cbedd43SMatthias Ringwald  * @param report_type see hid_report_type_t in btstack_hid.h
2305f0d88b0SMilanka Ringwald  * @param report_id
2315f0d88b0SMilanka Ringwald  * @param report
2325f0d88b0SMilanka Ringwald  * @param report_len
2335f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
2345f0d88b0SMilanka Ringwald  */
235fe493a7cSMilanka Ringwald uint8_t hid_host_send_set_report(uint16_t hid_cid, hid_report_type_t report_type, uint8_t report_id, const uint8_t * report, uint8_t report_len);
2365f0d88b0SMilanka Ringwald 
2375f0d88b0SMilanka Ringwald /*
2385f0d88b0SMilanka Ringwald  * @brief Request a HID report from the Bluetooth HID Device and emit HID_SUBEVENT_GET_REPORT_RESPONSE event with with handshake_status, see hid_handshake_param_type_t.
2395f0d88b0SMilanka Ringwald  * Polling Bluetooth HID Devices using the GET_REPORT transfer is costly in terms of time and overhead,
2405f0d88b0SMilanka Ringwald  * and should be avoided whenever possible. The GET_REPORT transfer is typically only used by applications
2415f0d88b0SMilanka Ringwald  * to determine the initial state of a Bluetooth HID Device. If the state of a report changes frequently,
2425f0d88b0SMilanka Ringwald  * then the report should be reported over the more efficient Interrupt channel, see hid_host_send_report.
2435f0d88b0SMilanka Ringwald  * @param hid_cid
2443cbedd43SMatthias Ringwald  * @param report_type see hid_report_type_t in btstack_hid.h
2455f0d88b0SMilanka Ringwald  * @param report_id
2465f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
2475f0d88b0SMilanka Ringwald  */
248fe493a7cSMilanka Ringwald uint8_t hid_host_send_get_report(uint16_t hid_cid, hid_report_type_t report_type, uint8_t report_id);
249fe493a7cSMilanka Ringwald 
25063bf37cdSMilanka Ringwald /**
2515f0d88b0SMilanka Ringwald  * @brief Send HID output report on interrupt channel.
25263bf37cdSMilanka Ringwald  * @param hid_cid
2535f0d88b0SMilanka Ringwald  * @param report_id
2545f0d88b0SMilanka Ringwald  * @param report
2555f0d88b0SMilanka Ringwald  * @param report_len
2565f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
25763bf37cdSMilanka Ringwald  */
258fe493a7cSMilanka Ringwald uint8_t hid_host_send_report(uint16_t hid_cid, uint8_t report_id, const uint8_t * report, uint8_t report_len);
25963bf37cdSMilanka Ringwald 
2605f0d88b0SMilanka Ringwald /*
2615f0d88b0SMilanka Ringwald  * @brief Get descriptor data
2625f0d88b0SMilanka Ringwald  * @param hid_cid
2635f0d88b0SMilanka Ringwald  * @result data
2645f0d88b0SMilanka Ringwald  */
265a93a968fSMilanka Ringwald const uint8_t * hid_descriptor_storage_get_descriptor_data(uint16_t hid_cid);
2665f0d88b0SMilanka Ringwald 
2675f0d88b0SMilanka Ringwald /*
2685f0d88b0SMilanka Ringwald  * @brief Get descriptor length
2695f0d88b0SMilanka Ringwald  * @param hid_cid
2705f0d88b0SMilanka Ringwald  * @result length
2715f0d88b0SMilanka Ringwald  */
2722cfd07faSMatthias Ringwald uint16_t hid_descriptor_storage_get_descriptor_len(uint16_t hid_cid);
2735f0d88b0SMilanka Ringwald 
27463bf37cdSMilanka Ringwald /* API_END */
27563bf37cdSMilanka Ringwald 
27663bf37cdSMilanka Ringwald 
27763bf37cdSMilanka Ringwald #if defined __cplusplus
27863bf37cdSMilanka Ringwald }
27963bf37cdSMilanka Ringwald #endif
28063bf37cdSMilanka Ringwald 
28163bf37cdSMilanka Ringwald #endif
282