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 232fca4dadSMilanka Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BLUEKITCHEN 242fca4dadSMilanka Ringwald * GMBH 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 38fe5a6c4eSMilanka Ringwald /** 39fe5a6c4eSMilanka Ringwald * @title HID Host 40fe5a6c4eSMilanka Ringwald * 41fe5a6c4eSMilanka Ringwald */ 42fe5a6c4eSMilanka Ringwald 4363bf37cdSMilanka Ringwald #ifndef HID_HOST_H 4463bf37cdSMilanka Ringwald #define HID_HOST_H 4563bf37cdSMilanka Ringwald 4663bf37cdSMilanka Ringwald #include <stdint.h> 4763bf37cdSMilanka Ringwald #include "btstack_defines.h" 4863bf37cdSMilanka Ringwald #include "bluetooth.h" 493cbedd43SMatthias Ringwald #include "btstack_hid.h" 5063bf37cdSMilanka Ringwald #include "btstack_hid_parser.h" 5163bf37cdSMilanka Ringwald 5263bf37cdSMilanka Ringwald #if defined __cplusplus 5363bf37cdSMilanka Ringwald extern "C" { 5463bf37cdSMilanka Ringwald #endif 5563bf37cdSMilanka Ringwald 5601977ed1SMilanka Ringwald 57fd7ba7a6SMilanka Ringwald typedef enum { 58fd7ba7a6SMilanka Ringwald HID_HOST_IDLE, 59fd7ba7a6SMilanka Ringwald HID_HOST_W2_SEND_SDP_QUERY, 60fd7ba7a6SMilanka Ringwald HID_HOST_W4_SDP_QUERY_RESULT, 61fd7ba7a6SMilanka Ringwald 62fd7ba7a6SMilanka Ringwald HID_HOST_W4_CONTROL_CONNECTION_ESTABLISHED, 63fd7ba7a6SMilanka Ringwald HID_HOST_CONTROL_CONNECTION_ESTABLISHED, 64fd7ba7a6SMilanka Ringwald 65fd7ba7a6SMilanka Ringwald HID_HOST_W4_SET_BOOT_MODE, 6601977ed1SMilanka Ringwald HID_HOST_W4_INCOMING_INTERRUPT_CONNECTION, 67fd7ba7a6SMilanka Ringwald HID_HOST_W4_INTERRUPT_CONNECTION_ESTABLISHED, 68fd7ba7a6SMilanka Ringwald HID_HOST_CONNECTION_ESTABLISHED, 69fd7ba7a6SMilanka Ringwald 70fd7ba7a6SMilanka Ringwald HID_HOST_W2_SEND_GET_REPORT, 71fd7ba7a6SMilanka Ringwald HID_HOST_W4_GET_REPORT_RESPONSE, 72fd7ba7a6SMilanka Ringwald HID_HOST_W2_SEND_SET_REPORT, 73fd7ba7a6SMilanka Ringwald HID_HOST_W4_SET_REPORT_RESPONSE, 74fd7ba7a6SMilanka Ringwald HID_HOST_W2_SEND_GET_PROTOCOL, 75fd7ba7a6SMilanka Ringwald HID_HOST_W4_GET_PROTOCOL_RESPONSE, 7601977ed1SMilanka Ringwald 77fd7ba7a6SMilanka Ringwald HID_HOST_W2_SEND_REPORT, 78ab30106eSMilanka Ringwald HID_HOST_W4_SEND_REPORT_RESPONSE, 79ab30106eSMilanka Ringwald 80ab30106eSMilanka Ringwald HID_HOST_W4_INTERRUPT_CONNECTION_DISCONNECTED, 81ab30106eSMilanka Ringwald HID_HOST_W4_CONTROL_CONNECTION_DISCONNECTED 82fd7ba7a6SMilanka Ringwald } hid_host_state_t; 83fd7ba7a6SMilanka Ringwald 84fd7ba7a6SMilanka Ringwald typedef struct { 85ab30106eSMilanka Ringwald btstack_linked_item_t item; 86ab30106eSMilanka Ringwald 87fd7ba7a6SMilanka Ringwald uint16_t hid_cid; 88fd7ba7a6SMilanka Ringwald hci_con_handle_t con_handle; 89fd7ba7a6SMilanka Ringwald 90fd7ba7a6SMilanka Ringwald bd_addr_t remote_addr; 91fd7ba7a6SMilanka Ringwald 92fd7ba7a6SMilanka Ringwald uint16_t control_cid; 93fd7ba7a6SMilanka Ringwald uint16_t control_psm; 94fd7ba7a6SMilanka Ringwald uint16_t interrupt_cid; 95fd7ba7a6SMilanka Ringwald uint16_t interrupt_psm; 96fd7ba7a6SMilanka Ringwald 97fd7ba7a6SMilanka Ringwald hid_host_state_t state; 9801977ed1SMilanka Ringwald bool incoming; 99fd7ba7a6SMilanka Ringwald hid_protocol_mode_t protocol_mode; 100fd7ba7a6SMilanka Ringwald 10101977ed1SMilanka Ringwald bool set_protocol; 10201977ed1SMilanka Ringwald bool w4_set_protocol_response; 10301977ed1SMilanka Ringwald hid_protocol_mode_t requested_protocol_mode; 10401977ed1SMilanka Ringwald 105580d6bb4SMilanka Ringwald uint16_t host_max_latency; 106580d6bb4SMilanka Ringwald uint16_t host_min_timeout; 107580d6bb4SMilanka Ringwald 108fd7ba7a6SMilanka Ringwald uint16_t hid_descriptor_offset; 109fd7ba7a6SMilanka Ringwald uint16_t hid_descriptor_len; 110fd7ba7a6SMilanka Ringwald uint16_t hid_descriptor_max_len; 11105439aa6SMilanka Ringwald uint8_t hid_descriptor_status; // ERROR_CODE_SUCCESS if descriptor available, 11205439aa6SMilanka Ringwald // ERROR_CODE_UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE if not, and 11305439aa6SMilanka Ringwald // ERROR_CODE_MEMORY_CAPACITY_EXCEEDED if descriptor is larger then the available space 114fd7ba7a6SMilanka Ringwald 115fd7ba7a6SMilanka Ringwald uint8_t user_request_can_send_now; 116fd7ba7a6SMilanka Ringwald 117fd7ba7a6SMilanka Ringwald // get report 118fd7ba7a6SMilanka Ringwald hid_report_type_t report_type; 119*14618ebfSMatthias Ringwald uint16_t report_id; 120fd7ba7a6SMilanka Ringwald 12159a2ea74SMilanka Ringwald // control message, bit mask: 12259a2ea74SMilanka Ringwald // SUSSPEND 1 12359a2ea74SMilanka Ringwald // EXIT_SUSSPEND 2 12459a2ea74SMilanka Ringwald // VIRTUAL_CABLE_UNPLUG 4 12559a2ea74SMilanka Ringwald uint8_t control_tasks; 12659a2ea74SMilanka Ringwald 127fd7ba7a6SMilanka Ringwald // set report 128a93a968fSMilanka Ringwald const uint8_t * report; 129fd7ba7a6SMilanka Ringwald uint16_t report_len; 130fd7ba7a6SMilanka Ringwald } hid_host_connection_t; 131fd7ba7a6SMilanka Ringwald 13263bf37cdSMilanka Ringwald /* API_START */ 1335f0d88b0SMilanka Ringwald 13463bf37cdSMilanka Ringwald /** 13563bf37cdSMilanka Ringwald * @brief Set up HID Host 13663bf37cdSMilanka Ringwald * @param hid_descriptor_storage 13763bf37cdSMilanka Ringwald * @param hid_descriptor_storage_len 13863bf37cdSMilanka Ringwald */ 139fd7ba7a6SMilanka Ringwald void hid_host_init(uint8_t * hid_descriptor_storage, uint16_t hid_descriptor_storage_len); 14063bf37cdSMilanka Ringwald 14163bf37cdSMilanka Ringwald /** 1425f0d88b0SMilanka Ringwald * @brief Register callback for the HID Host. 14363bf37cdSMilanka Ringwald * @param callback 14463bf37cdSMilanka Ringwald */ 14563bf37cdSMilanka Ringwald void hid_host_register_packet_handler(btstack_packet_handler_t callback); 14663bf37cdSMilanka Ringwald 1473eaa38a7SMatthias Ringwald /** 14805439aa6SMilanka Ringwald * @brief Create HID connection to HID Device and emit HID_SUBEVENT_CONNECTION_OPENED event with status code, 14905439aa6SMilanka Ringwald * followed by HID_SUBEVENT_DESCRIPTOR_AVAILABLE that informs if the HID Descriptor was found. In the case of incoming 15005439aa6SMilanka Ringwald * connection, i.e. HID Device initiating the connection, the HID_SUBEVENT_DESCRIPTOR_AVAILABLE is delayed, and the reports 15105439aa6SMilanka Ringwald * may already come via HID_SUBEVENT_REPORT event. It is up to the application code if 1527379ca3dSMilanka Ringwald * these reports should be buffered or ignored until the descriptor is available. 1535f0d88b0SMilanka Ringwald * @note HID_PROTOCOL_MODE_REPORT_WITH_FALLBACK_TO_BOOT will try ti set up REPORT mode, but fallback to BOOT mode if necessary. 15405439aa6SMilanka Ringwald * @note HID_SUBEVENT_DESCRIPTOR_AVAILABLE possible status values are: 15505439aa6SMilanka Ringwald * - ERROR_CODE_SUCCESS if descriptor available, 15605439aa6SMilanka Ringwald * - ERROR_CODE_UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE if not, and 15705439aa6SMilanka Ringwald * - ERROR_CODE_MEMORY_CAPACITY_EXCEEDED if descriptor is larger then the available space 158fd7ba7a6SMilanka Ringwald * @param remote_addr 1593cbedd43SMatthias Ringwald * @param protocol_mode see hid_protocol_mode_t in btstack_hid.h 16063bf37cdSMilanka Ringwald * @param hid_cid to use for other commands 1615f0d88b0SMilanka Ringwald * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_COMMAND_DISALLOWED, BTSTACK_MEMORY_ALLOC_FAILED 16263bf37cdSMilanka Ringwald */ 163fd7ba7a6SMilanka Ringwald uint8_t hid_host_connect(bd_addr_t remote_addr, hid_protocol_mode_t protocol_mode, uint16_t * hid_cid); 16463bf37cdSMilanka Ringwald 1655f0d88b0SMilanka Ringwald 1663eaa38a7SMatthias Ringwald /** 1675f0d88b0SMilanka Ringwald * @brief Accept incoming HID connection, this should be called upon receiving HID_SUBEVENT_INCOMING_CONNECTION event. 1685f0d88b0SMilanka Ringwald * @param hid_cid 1693cbedd43SMatthias Ringwald * @param protocol_mode see hid_protocol_mode_t in btstack_hid.h 1705f0d88b0SMilanka Ringwald * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED 1715f0d88b0SMilanka Ringwald */ 17201977ed1SMilanka Ringwald uint8_t hid_host_accept_connection(uint16_t hid_cid, hid_protocol_mode_t protocol_mode); 1735f0d88b0SMilanka Ringwald 1743eaa38a7SMatthias Ringwald /** 1755f0d88b0SMilanka Ringwald * @brief Decline incoming HID connection, this should be called upon receiving HID_SUBEVENT_INCOMING_CONNECTION event. 1765f0d88b0SMilanka Ringwald * @param hid_cid 1775f0d88b0SMilanka Ringwald * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED 1785f0d88b0SMilanka Ringwald */ 17959a2ea74SMilanka Ringwald uint8_t hid_host_decline_connection(uint16_t hid_cid); 18059a2ea74SMilanka Ringwald 1813eaa38a7SMatthias Ringwald /** 1825f0d88b0SMilanka Ringwald * @brief Disconnect from HID Device and emit HID_SUBEVENT_CONNECTION_CLOSED event. 18363bf37cdSMilanka Ringwald * @param hid_cid 18463bf37cdSMilanka Ringwald */ 18563bf37cdSMilanka Ringwald void hid_host_disconnect(uint16_t hid_cid); 18663bf37cdSMilanka Ringwald 18759a2ea74SMilanka Ringwald // Control messages: 1885f0d88b0SMilanka Ringwald 1893eaa38a7SMatthias Ringwald /** 1905f0d88b0SMilanka Ringwald * @brief Send SUSPEND control signal to connected HID Device. A Bluetooth HID Device which receives a SUSPEND control signal 1915f0d88b0SMilanka Ringwald * may optionally disconnect from 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_suspend(uint16_t hid_cid); 1965f0d88b0SMilanka Ringwald 1973eaa38a7SMatthias Ringwald /** 1985f0d88b0SMilanka Ringwald * @brief Order connected HID Device to exit suspend mode. 1995f0d88b0SMilanka Ringwald * The Bluetooth HID Device shall send a report to the Bluetooth HID Host. 2005f0d88b0SMilanka Ringwald * @param hid_cid 2015f0d88b0SMilanka Ringwald * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED 2025f0d88b0SMilanka Ringwald */ 20359a2ea74SMilanka Ringwald uint8_t hid_host_send_exit_suspend(uint16_t hid_cid); 2045f0d88b0SMilanka Ringwald 2053eaa38a7SMatthias Ringwald /** 2065f0d88b0SMilanka Ringwald * @brief Unplug connected HID Device. 2075f0d88b0SMilanka Ringwald * @note This is the only command that can be also received from HID Device. It will be indicated by receiving 2085f0d88b0SMilanka Ringwald * HID_SUBEVENT_VIRTUAL_CABLE_UNPLUG event, as well as disconnecting HID Host from device. 2095f0d88b0SMilanka Ringwald * @param hid_cid 2105f0d88b0SMilanka Ringwald * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED 2115f0d88b0SMilanka Ringwald */ 21259a2ea74SMilanka Ringwald uint8_t hid_host_send_virtual_cable_unplug(uint16_t hid_cid); 21363bf37cdSMilanka Ringwald 2143eaa38a7SMatthias Ringwald /** 2155f0d88b0SMilanka 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 2165f0d88b0SMilanka Ringwald * @param hid_cid 2173cbedd43SMatthias Ringwald * @param protocol_mode see hid_protocol_mode_t in btstack_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_set_protocol_mode(uint16_t hid_cid, hid_protocol_mode_t protocol_mode); 2215f0d88b0SMilanka Ringwald 2223eaa38a7SMatthias Ringwald /** 2235f0d88b0SMilanka 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 2245f0d88b0SMilanka Ringwald * @param hid_cid 2253cbedd43SMatthias Ringwald * @param protocol_mode see hid_protocol_mode_t in btstack_hid.h 2265f0d88b0SMilanka Ringwald * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED 2275f0d88b0SMilanka Ringwald */ 228fe493a7cSMilanka Ringwald uint8_t hid_host_send_get_protocol(uint16_t hid_cid); 229fe493a7cSMilanka Ringwald 2303eaa38a7SMatthias Ringwald /** 2315f0d88b0SMilanka 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. 2325f0d88b0SMilanka Ringwald * @param hid_cid 2333cbedd43SMatthias Ringwald * @param report_type see hid_report_type_t in btstack_hid.h 234*14618ebfSMatthias Ringwald * @param report_id or HID_REPORT_ID_UNDEFINED 2355f0d88b0SMilanka Ringwald * @param report 2365f0d88b0SMilanka Ringwald * @param report_len 2375f0d88b0SMilanka Ringwald * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED 2385f0d88b0SMilanka Ringwald */ 239*14618ebfSMatthias Ringwald uint8_t hid_host_send_set_report(uint16_t hid_cid, hid_report_type_t report_type, uint16_t report_id, const uint8_t * report, uint8_t report_len); 2405f0d88b0SMilanka Ringwald 2413eaa38a7SMatthias Ringwald /** 2425f0d88b0SMilanka 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. 2435f0d88b0SMilanka Ringwald * Polling Bluetooth HID Devices using the GET_REPORT transfer is costly in terms of time and overhead, 2445f0d88b0SMilanka Ringwald * and should be avoided whenever possible. The GET_REPORT transfer is typically only used by applications 2455f0d88b0SMilanka Ringwald * to determine the initial state of a Bluetooth HID Device. If the state of a report changes frequently, 2465f0d88b0SMilanka Ringwald * then the report should be reported over the more efficient Interrupt channel, see hid_host_send_report. 2475f0d88b0SMilanka Ringwald * @param hid_cid 2483cbedd43SMatthias Ringwald * @param report_type see hid_report_type_t in btstack_hid.h 249*14618ebfSMatthias Ringwald * @param report_id or HID_REPORT_ID_UNDEFINED 2505f0d88b0SMilanka Ringwald * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED 2515f0d88b0SMilanka Ringwald */ 252*14618ebfSMatthias Ringwald uint8_t hid_host_send_get_report(uint16_t hid_cid, hid_report_type_t report_type, uint16_t report_id); 253fe493a7cSMilanka Ringwald 25463bf37cdSMilanka Ringwald /** 2555f0d88b0SMilanka Ringwald * @brief Send HID output report on interrupt channel. 25663bf37cdSMilanka Ringwald * @param hid_cid 257*14618ebfSMatthias Ringwald * @param report_id or HID_REPORT_ID_UNDEFINED 2585f0d88b0SMilanka Ringwald * @param report 2595f0d88b0SMilanka Ringwald * @param report_len 2605f0d88b0SMilanka Ringwald * @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED 26163bf37cdSMilanka Ringwald */ 262*14618ebfSMatthias Ringwald uint8_t hid_host_send_report(uint16_t hid_cid, uint16_t report_id, const uint8_t * report, uint8_t report_len); 26363bf37cdSMilanka Ringwald 2643eaa38a7SMatthias Ringwald /** 2655f0d88b0SMilanka Ringwald * @brief Get descriptor data 2665f0d88b0SMilanka Ringwald * @param hid_cid 2675f0d88b0SMilanka Ringwald * @result data 2685f0d88b0SMilanka Ringwald */ 269a93a968fSMilanka Ringwald const uint8_t * hid_descriptor_storage_get_descriptor_data(uint16_t hid_cid); 2705f0d88b0SMilanka Ringwald 2713eaa38a7SMatthias Ringwald /** 2725f0d88b0SMilanka Ringwald * @brief Get descriptor length 2735f0d88b0SMilanka Ringwald * @param hid_cid 2745f0d88b0SMilanka Ringwald * @result length 2755f0d88b0SMilanka Ringwald */ 2762cfd07faSMatthias Ringwald uint16_t hid_descriptor_storage_get_descriptor_len(uint16_t hid_cid); 2775f0d88b0SMilanka Ringwald 278de81b46aSMatthias Ringwald /** 279de81b46aSMatthias Ringwald * @brief De-Init HID Device 280de81b46aSMatthias Ringwald */ 281de81b46aSMatthias Ringwald void hid_host_deinit(void); 282de81b46aSMatthias Ringwald 28363bf37cdSMilanka Ringwald /* API_END */ 28463bf37cdSMilanka Ringwald 28563bf37cdSMilanka Ringwald 28663bf37cdSMilanka Ringwald #if defined __cplusplus 28763bf37cdSMilanka Ringwald } 28863bf37cdSMilanka Ringwald #endif 28963bf37cdSMilanka Ringwald 29063bf37cdSMilanka Ringwald #endif 291