mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-16 16:20:50 +00:00
hid: prefix hid.h and hid.c with btstack_
This commit is contained in:
parent
fd39e93aa9
commit
3cbedd4337
@ -64,6 +64,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- Examples: use `btstack_event.h` getters instead of direct array access, use enum to compare status codes
|
||||
- HCI Transport: extract convenience function declaration for h4, h5, em9304_spi, and usb into separate hci_transport_{type}.h
|
||||
- GATT Client: Use ATT_READ_REQUEST for first blob of Read Long Characteristic
|
||||
- HID: Move `src/classic/hid.h` into `src` and prefix with `btstack_` to use it with BLE and avoid name clashes
|
||||
|
||||
## Release v1.3.2
|
||||
|
||||
|
@ -328,7 +328,8 @@ hog_mouse_demo: hog_mouse_demo.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SER
|
||||
hog_boot_host_demo: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} hog_boot_host_demo.c
|
||||
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
||||
|
||||
hog_host_demo: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} btstack_hid_parser.o hid.o hog_host_demo.c
|
||||
hog_host_demo: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} btstack_hid_parser.o btstack_hid.o hog_host_demo.c
|
||||
hog_host_demo: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} btstack_hid_parser.o btstack_hid.o hog_host_demo.c
|
||||
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
||||
|
||||
sm_pairing_peripheral: sm_pairing_peripheral.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${GATT_CLIENT_OBJ} sm_pairing_peripheral.c
|
||||
|
@ -295,7 +295,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
|
||||
// There is an incoming connection: we can accept it or decline it.
|
||||
// The hid_host_report_mode in the hid_host_accept_connection function
|
||||
// allows the application to request a protocol mode.
|
||||
// For available protocol modes, see hid_protocol_mode_t in hid.h file.
|
||||
// For available protocol modes, see hid_protocol_mode_t in btstack_hid.h file.
|
||||
hid_host_accept_connection(hid_subevent_incoming_connection_get_hid_cid(packet), hid_host_report_mode);
|
||||
break;
|
||||
|
||||
|
@ -43,8 +43,8 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "hid.h"
|
||||
#include "btstack_defines.h"
|
||||
#include "btstack_hid.h"
|
||||
#include "bluetooth.h"
|
||||
#include "btstack_linked_list.h"
|
||||
#include "ble/gatt_client.h"
|
||||
@ -211,7 +211,7 @@ void hids_client_init(uint8_t * hid_descriptor_storage, uint16_t hid_descriptor_
|
||||
*
|
||||
* @param con_handle
|
||||
* @param packet_handler
|
||||
* @param protocol_mode see hid_protocol_mode_t in hid.h
|
||||
* @param protocol_mode see hid_protocol_mode_t in btstack_hid.h
|
||||
* @param hids_cid
|
||||
* @return status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_COMMAND_DISALLOWED if there is already a client associated with con_handle, or BTSTACK_MEMORY_ALLOC_FAILED
|
||||
*/
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include "btstack_debug.h"
|
||||
#include "btstack_defines.h"
|
||||
#include "btstack_event.h"
|
||||
#include "btstack_hid.h"
|
||||
#include "btstack_hid_parser.h"
|
||||
#include "btstack_linked_list.h"
|
||||
#include "btstack_memory.h"
|
||||
@ -72,7 +73,6 @@
|
||||
#include "hci_cmd.h"
|
||||
#include "hci_dump.h"
|
||||
#include "hci_transport.h"
|
||||
#include "hid.h"
|
||||
#include "l2cap.h"
|
||||
#include "l2cap_signaling.h"
|
||||
|
||||
|
@ -42,7 +42,6 @@
|
||||
|
||||
#ifndef BTSTACK_DEFINES_H
|
||||
#define BTSTACK_DEFINES_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "btstack_linked_list.h"
|
||||
@ -3249,7 +3248,7 @@ typedef uint8_t sm_key_t[16];
|
||||
* @param subevent_code
|
||||
* @param hids_cid
|
||||
* @param service_index
|
||||
* @param protocol_mode see hid_protocol_mode_t in hid.h
|
||||
* @param protocol_mode see hid_protocol_mode_t in btstack_hid.h
|
||||
*/
|
||||
#define GATTSERVICE_SUBEVENT_HID_PROTOCOL_MODE 0x16
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hid.h"
|
||||
#include "btstack_hid.h"
|
||||
|
||||
|
||||
// from USB HID Specification 1.1, Appendix B.1
|
@ -45,7 +45,7 @@
|
||||
#define BTSTACK_HID_PARSER_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "hid.h"
|
||||
#include "btstack_hid.h"
|
||||
|
||||
#if defined __cplusplus
|
||||
extern "C" {
|
||||
|
@ -41,8 +41,8 @@
|
||||
#include <stdint.h>
|
||||
#include "btstack_defines.h"
|
||||
#include "bluetooth.h"
|
||||
#include "btstack_hid.h"
|
||||
#include "btstack_hid_parser.h"
|
||||
#include "hid.h"
|
||||
|
||||
#if defined __cplusplus
|
||||
extern "C" {
|
||||
|
@ -44,9 +44,9 @@
|
||||
#include "bluetooth_sdp.h"
|
||||
#include "btstack_debug.h"
|
||||
#include "btstack_event.h"
|
||||
#include "btstack_hid.h"
|
||||
#include "btstack_hid_parser.h"
|
||||
#include "btstack_memory.h"
|
||||
#include "hid.h"
|
||||
#include "l2cap.h"
|
||||
|
||||
#include "classic/hid_host.h"
|
||||
|
@ -41,8 +41,8 @@
|
||||
#include <stdint.h>
|
||||
#include "btstack_defines.h"
|
||||
#include "bluetooth.h"
|
||||
#include "btstack_hid.h"
|
||||
#include "btstack_hid_parser.h"
|
||||
#include "hid.h"
|
||||
|
||||
#if defined __cplusplus
|
||||
extern "C" {
|
||||
@ -148,7 +148,7 @@ void hid_host_register_packet_handler(btstack_packet_handler_t callback);
|
||||
* - ERROR_CODE_UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE if not, and
|
||||
* - ERROR_CODE_MEMORY_CAPACITY_EXCEEDED if descriptor is larger then the available space
|
||||
* @param remote_addr
|
||||
* @param protocol_mode see hid_protocol_mode_t in hid.h
|
||||
* @param protocol_mode see hid_protocol_mode_t in btstack_hid.h
|
||||
* @param hid_cid to use for other commands
|
||||
* @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_COMMAND_DISALLOWED, BTSTACK_MEMORY_ALLOC_FAILED
|
||||
*/
|
||||
@ -158,7 +158,7 @@ uint8_t hid_host_connect(bd_addr_t remote_addr, hid_protocol_mode_t protocol_mod
|
||||
/*
|
||||
* @brief Accept incoming HID connection, this should be called upon receiving HID_SUBEVENT_INCOMING_CONNECTION event.
|
||||
* @param hid_cid
|
||||
* @param protocol_mode see hid_protocol_mode_t in hid.h
|
||||
* @param protocol_mode see hid_protocol_mode_t in btstack_hid.h
|
||||
* @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
|
||||
*/
|
||||
uint8_t hid_host_accept_connection(uint16_t hid_cid, hid_protocol_mode_t protocol_mode);
|
||||
@ -206,7 +206,7 @@ uint8_t hid_host_send_virtual_cable_unplug(uint16_t hid_cid);
|
||||
/*
|
||||
* @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
|
||||
* @param hid_cid
|
||||
* @param protocol_mode see hid_protocol_mode_t in hid.h
|
||||
* @param protocol_mode see hid_protocol_mode_t in btstack_hid.h
|
||||
* @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
|
||||
*/
|
||||
uint8_t hid_host_send_set_protocol_mode(uint16_t hid_cid, hid_protocol_mode_t protocol_mode);
|
||||
@ -214,7 +214,7 @@ uint8_t hid_host_send_set_protocol_mode(uint16_t hid_cid, hid_protocol_mode_t pr
|
||||
/*
|
||||
* @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
|
||||
* @param hid_cid
|
||||
* @param protocol_mode see hid_protocol_mode_t in hid.h
|
||||
* @param protocol_mode see hid_protocol_mode_t in btstack_hid.h
|
||||
* @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
|
||||
*/
|
||||
uint8_t hid_host_send_get_protocol(uint16_t hid_cid);
|
||||
@ -223,7 +223,7 @@ uint8_t hid_host_send_get_protocol(uint16_t hid_cid);
|
||||
|
||||
* @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.
|
||||
* @param hid_cid
|
||||
* @param report_type see hid_report_type_t in hid.h
|
||||
* @param report_type see hid_report_type_t in btstack_hid.h
|
||||
* @param report_id
|
||||
* @param report
|
||||
* @param report_len
|
||||
@ -238,7 +238,7 @@ uint8_t hid_host_send_set_report(uint16_t hid_cid, hid_report_type_t report_type
|
||||
* to determine the initial state of a Bluetooth HID Device. If the state of a report changes frequently,
|
||||
* then the report should be reported over the more efficient Interrupt channel, see hid_host_send_report.
|
||||
* @param hid_cid
|
||||
* @param report_type see hid_report_type_t in hid.h
|
||||
* @param report_type see hid_report_type_t in btstack_hid.h
|
||||
* @param report_id
|
||||
* @result status ERROR_CODE_SUCCESS on success, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, ERROR_CODE_COMMAND_DISALLOWED
|
||||
*/
|
||||
|
@ -176,7 +176,7 @@ hid_device_test: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} btstack_
|
||||
hog_demo_test: hog_demo_test.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} ${SRC_BLE_GATT_SERVICE_FILES_OBJ} gatt_client.o btstack_ring_buffer.o hog_demo_test.c
|
||||
${CC} $(filter-out hog_demo_test.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
|
||||
|
||||
hog_host_test: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_OBJ} btstack_hid_parser.o hid.o hog_host_test.c
|
||||
hog_host_test: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_OBJ} btstack_hid_parser.o btstack_hid.o hog_host_test.c
|
||||
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
||||
|
||||
hrp_server_test.h: hrp_server_test.gatt
|
||||
|
Loading…
x
Reference in New Issue
Block a user