xref: /btstack/src/classic/hid_host.h (revision 2cfd07fa7ffab8635d954b8a7e7720bdfa68ccad)
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"
4463bf37cdSMilanka Ringwald #include "btstack_hid_parser.h"
4563bf37cdSMilanka Ringwald #include "classic/hid.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 
100fd7ba7a6SMilanka Ringwald     uint16_t hid_descriptor_offset;
101fd7ba7a6SMilanka Ringwald     uint16_t hid_descriptor_len;
102fd7ba7a6SMilanka Ringwald     uint16_t hid_descriptor_max_len;
10305439aa6SMilanka Ringwald     uint8_t  hid_descriptor_status;     // ERROR_CODE_SUCCESS if descriptor available,
10405439aa6SMilanka Ringwald                                         // ERROR_CODE_UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE if not, and
10505439aa6SMilanka Ringwald                                         // ERROR_CODE_MEMORY_CAPACITY_EXCEEDED if descriptor is larger then the available space
106fd7ba7a6SMilanka Ringwald 
107fd7ba7a6SMilanka Ringwald     uint8_t   user_request_can_send_now;
108fd7ba7a6SMilanka Ringwald 
109fd7ba7a6SMilanka Ringwald     // get report
110fd7ba7a6SMilanka Ringwald     hid_report_type_t report_type;
111fd7ba7a6SMilanka Ringwald     uint8_t           report_id;
112fd7ba7a6SMilanka Ringwald 
11359a2ea74SMilanka Ringwald     // control message, bit mask:
11459a2ea74SMilanka Ringwald     // SUSSPEND             1
11559a2ea74SMilanka Ringwald     // EXIT_SUSSPEND        2
11659a2ea74SMilanka Ringwald     // VIRTUAL_CABLE_UNPLUG 4
11759a2ea74SMilanka Ringwald     uint8_t control_tasks;
11859a2ea74SMilanka Ringwald 
119fd7ba7a6SMilanka Ringwald     // set report
120a93a968fSMilanka Ringwald     const uint8_t * report;
121fd7ba7a6SMilanka Ringwald     uint16_t  report_len;
122fd7ba7a6SMilanka Ringwald } hid_host_connection_t;
123fd7ba7a6SMilanka Ringwald 
12463bf37cdSMilanka Ringwald /* API_START */
1255f0d88b0SMilanka Ringwald 
12663bf37cdSMilanka Ringwald /**
12763bf37cdSMilanka Ringwald  * @brief Set up HID Host
12863bf37cdSMilanka Ringwald  * @param hid_descriptor_storage
12963bf37cdSMilanka Ringwald  * @param hid_descriptor_storage_len
13063bf37cdSMilanka Ringwald  */
131fd7ba7a6SMilanka Ringwald void hid_host_init(uint8_t * hid_descriptor_storage, uint16_t hid_descriptor_storage_len);
13263bf37cdSMilanka Ringwald 
13363bf37cdSMilanka Ringwald /**
1345f0d88b0SMilanka Ringwald  * @brief Register callback for the HID Host.
13563bf37cdSMilanka Ringwald  * @param callback
13663bf37cdSMilanka Ringwald  */
13763bf37cdSMilanka Ringwald void hid_host_register_packet_handler(btstack_packet_handler_t callback);
13863bf37cdSMilanka Ringwald 
13963bf37cdSMilanka Ringwald /*
14005439aa6SMilanka Ringwald  * @brief Create HID connection to HID Device and emit HID_SUBEVENT_CONNECTION_OPENED event with status code,
14105439aa6SMilanka Ringwald  * followed by HID_SUBEVENT_DESCRIPTOR_AVAILABLE that informs if the HID Descriptor was found. In the case of incoming
14205439aa6SMilanka Ringwald  * connection, i.e. HID Device initiating the connection, the HID_SUBEVENT_DESCRIPTOR_AVAILABLE is delayed, and the reports
14305439aa6SMilanka Ringwald  * may already come via HID_SUBEVENT_REPORT event. It is up to the application code if
1447379ca3dSMilanka Ringwald  * these reports should be buffered or ignored until the descriptor is available.
1455f0d88b0SMilanka Ringwald  * @note  HID_PROTOCOL_MODE_REPORT_WITH_FALLBACK_TO_BOOT will try ti set up REPORT mode, but fallback to BOOT mode if necessary.
14605439aa6SMilanka Ringwald  * @note  HID_SUBEVENT_DESCRIPTOR_AVAILABLE possible status values are:
14705439aa6SMilanka Ringwald  * - ERROR_CODE_SUCCESS if descriptor available,
14805439aa6SMilanka Ringwald  * - ERROR_CODE_UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE if not, and
14905439aa6SMilanka Ringwald  * - ERROR_CODE_MEMORY_CAPACITY_EXCEEDED if descriptor is larger then the available space
150fd7ba7a6SMilanka Ringwald  * @param remote_addr
1515f0d88b0SMilanka Ringwald  * @param protocol_mode see hid_protocol_mode_t in hid.h
15263bf37cdSMilanka Ringwald  * @param hid_cid to use for other commands
1535f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_COMMAND_DISALLOWED, BTSTACK_MEMORY_ALLOC_FAILED
15463bf37cdSMilanka Ringwald  */
155fd7ba7a6SMilanka Ringwald uint8_t hid_host_connect(bd_addr_t remote_addr, hid_protocol_mode_t protocol_mode, uint16_t * hid_cid);
15663bf37cdSMilanka Ringwald 
1575f0d88b0SMilanka Ringwald 
1585f0d88b0SMilanka Ringwald /*
1595f0d88b0SMilanka Ringwald  * @brief Accept incoming HID connection, this should be called upon receiving HID_SUBEVENT_INCOMING_CONNECTION event.
1605f0d88b0SMilanka Ringwald  * @param hid_cid
1615f0d88b0SMilanka Ringwald  * @param protocol_mode see hid_protocol_mode_t in hid.h
1625f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
1635f0d88b0SMilanka Ringwald  */
16401977ed1SMilanka Ringwald uint8_t hid_host_accept_connection(uint16_t hid_cid, hid_protocol_mode_t protocol_mode);
1655f0d88b0SMilanka Ringwald 
1665f0d88b0SMilanka Ringwald /*
1675f0d88b0SMilanka Ringwald  * @brief Decline incoming HID connection, this should be called upon receiving HID_SUBEVENT_INCOMING_CONNECTION event.
1685f0d88b0SMilanka Ringwald  * @param hid_cid
1695f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
1705f0d88b0SMilanka Ringwald  */
17159a2ea74SMilanka Ringwald uint8_t hid_host_decline_connection(uint16_t hid_cid);
17259a2ea74SMilanka Ringwald 
17363bf37cdSMilanka Ringwald /*
1745f0d88b0SMilanka Ringwald  * @brief Disconnect from HID Device and emit HID_SUBEVENT_CONNECTION_CLOSED event.
17563bf37cdSMilanka Ringwald  * @param hid_cid
17663bf37cdSMilanka Ringwald  */
17763bf37cdSMilanka Ringwald void hid_host_disconnect(uint16_t hid_cid);
17863bf37cdSMilanka Ringwald 
17959a2ea74SMilanka Ringwald // Control messages:
1805f0d88b0SMilanka Ringwald 
1815f0d88b0SMilanka Ringwald /*
1825f0d88b0SMilanka Ringwald  * @brief Send SUSPEND control signal to connected HID Device. A Bluetooth HID Device which receives a SUSPEND control signal
1835f0d88b0SMilanka Ringwald  * may optionally disconnect from the Bluetooth HID Host.
1845f0d88b0SMilanka Ringwald  * @param hid_cid
1855f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
1865f0d88b0SMilanka Ringwald  */
18759a2ea74SMilanka Ringwald uint8_t hid_host_send_suspend(uint16_t hid_cid);
1885f0d88b0SMilanka Ringwald 
1895f0d88b0SMilanka Ringwald /*
1905f0d88b0SMilanka Ringwald  * @brief Order connected HID Device to exit suspend mode.
1915f0d88b0SMilanka Ringwald  * The Bluetooth HID Device shall send a report to the Bluetooth HID Host.
1925f0d88b0SMilanka Ringwald  * @param hid_cid
1935f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
1945f0d88b0SMilanka Ringwald  */
19559a2ea74SMilanka Ringwald uint8_t hid_host_send_exit_suspend(uint16_t hid_cid);
1965f0d88b0SMilanka Ringwald 
1975f0d88b0SMilanka Ringwald /*
1985f0d88b0SMilanka Ringwald  * @brief Unplug connected HID Device.
1995f0d88b0SMilanka Ringwald  * @note This is the only command that can be also received from HID Device. It will be indicated by receiving
2005f0d88b0SMilanka Ringwald  * HID_SUBEVENT_VIRTUAL_CABLE_UNPLUG event, as well as disconnecting HID Host from device.
2015f0d88b0SMilanka Ringwald  * @param hid_cid
2025f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
2035f0d88b0SMilanka Ringwald  */
20459a2ea74SMilanka Ringwald uint8_t hid_host_send_virtual_cable_unplug(uint16_t hid_cid);
20563bf37cdSMilanka Ringwald 
2065f0d88b0SMilanka Ringwald /*
2075f0d88b0SMilanka 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
2085f0d88b0SMilanka Ringwald  * @param hid_cid
2095f0d88b0SMilanka Ringwald  * @param protocol_mode see hid_protocol_mode_t in hid.h
2105f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
2115f0d88b0SMilanka Ringwald  */
212fe493a7cSMilanka Ringwald uint8_t hid_host_send_set_protocol_mode(uint16_t hid_cid, hid_protocol_mode_t protocol_mode);
2135f0d88b0SMilanka Ringwald 
2145f0d88b0SMilanka Ringwald /*
2155f0d88b0SMilanka 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
2165f0d88b0SMilanka Ringwald  * @param hid_cid
2175f0d88b0SMilanka Ringwald  * @param protocol_mode see hid_protocol_mode_t in hid.h
2185f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
2195f0d88b0SMilanka Ringwald  */
220fe493a7cSMilanka Ringwald uint8_t hid_host_send_get_protocol(uint16_t hid_cid);
221fe493a7cSMilanka Ringwald 
2225f0d88b0SMilanka Ringwald /*
2235f0d88b0SMilanka Ringwald 
2245f0d88b0SMilanka 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.
2255f0d88b0SMilanka Ringwald  * @param hid_cid
2265f0d88b0SMilanka Ringwald  * @param report_type see hid_report_type_t in hid.h
2275f0d88b0SMilanka Ringwald  * @param report_id
2285f0d88b0SMilanka Ringwald  * @param report
2295f0d88b0SMilanka Ringwald  * @param report_len
2305f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
2315f0d88b0SMilanka Ringwald  */
232fe493a7cSMilanka 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);
2335f0d88b0SMilanka Ringwald 
2345f0d88b0SMilanka Ringwald /*
2355f0d88b0SMilanka 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.
2365f0d88b0SMilanka Ringwald  * Polling Bluetooth HID Devices using the GET_REPORT transfer is costly in terms of time and overhead,
2375f0d88b0SMilanka Ringwald  * and should be avoided whenever possible. The GET_REPORT transfer is typically only used by applications
2385f0d88b0SMilanka Ringwald  * to determine the initial state of a Bluetooth HID Device. If the state of a report changes frequently,
2395f0d88b0SMilanka Ringwald  * then the report should be reported over the more efficient Interrupt channel, see hid_host_send_report.
2405f0d88b0SMilanka Ringwald  * @param hid_cid
2415f0d88b0SMilanka Ringwald  * @param report_type see hid_report_type_t in hid.h
2425f0d88b0SMilanka Ringwald  * @param report_id
2435f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
2445f0d88b0SMilanka Ringwald  */
245fe493a7cSMilanka Ringwald uint8_t hid_host_send_get_report(uint16_t hid_cid, hid_report_type_t report_type, uint8_t report_id);
246fe493a7cSMilanka Ringwald 
24763bf37cdSMilanka Ringwald /**
2485f0d88b0SMilanka Ringwald  * @brief Send HID output report on interrupt channel.
24963bf37cdSMilanka Ringwald  * @param hid_cid
2505f0d88b0SMilanka Ringwald  * @param report_id
2515f0d88b0SMilanka Ringwald  * @param report
2525f0d88b0SMilanka Ringwald  * @param report_len
2535f0d88b0SMilanka Ringwald  * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
25463bf37cdSMilanka Ringwald  */
255fe493a7cSMilanka Ringwald uint8_t hid_host_send_report(uint16_t hid_cid, uint8_t report_id, const uint8_t * report, uint8_t report_len);
25663bf37cdSMilanka Ringwald 
2575f0d88b0SMilanka Ringwald /*
2585f0d88b0SMilanka Ringwald  * @brief Get descriptor data
2595f0d88b0SMilanka Ringwald  * @param hid_cid
2605f0d88b0SMilanka Ringwald  * @result data
2615f0d88b0SMilanka Ringwald  */
262a93a968fSMilanka Ringwald const uint8_t * hid_descriptor_storage_get_descriptor_data(uint16_t hid_cid);
2635f0d88b0SMilanka Ringwald 
2645f0d88b0SMilanka Ringwald /*
2655f0d88b0SMilanka Ringwald  * @brief Get descriptor length
2665f0d88b0SMilanka Ringwald  * @param hid_cid
2675f0d88b0SMilanka Ringwald  * @result length
2685f0d88b0SMilanka Ringwald  */
269*2cfd07faSMatthias Ringwald uint16_t hid_descriptor_storage_get_descriptor_len(uint16_t hid_cid);
2705f0d88b0SMilanka Ringwald 
27163bf37cdSMilanka Ringwald /* API_END */
27263bf37cdSMilanka Ringwald 
27363bf37cdSMilanka Ringwald 
27463bf37cdSMilanka Ringwald #if defined __cplusplus
27563bf37cdSMilanka Ringwald }
27663bf37cdSMilanka Ringwald #endif
27763bf37cdSMilanka Ringwald 
27863bf37cdSMilanka Ringwald #endif
279