diff --git a/example/hid_keyboard_demo.c b/example/hid_keyboard_demo.c index 443d8174e..8b4f9ff6a 100644 --- a/example/hid_keyboard_demo.c +++ b/example/hid_keyboard_demo.c @@ -173,6 +173,7 @@ static const char hid_device_name[] = "BTstack HID Keyboard"; static btstack_packet_callback_registration_t hci_event_callback_registration; static uint16_t hid_cid; static bd_addr_t device_addr; +static uint8_t hid_boot_device = 0; #ifdef HAVE_BTSTACK_STDIN static const char * device_addr_string = "BC:EC:5D:E6:15:03"; @@ -393,7 +394,7 @@ int btstack_main(int argc, const char * argv[]){ sdp_init(); memset(hid_service_buffer, 0, sizeof(hid_service_buffer)); // hid sevice subclass 2540 Keyboard, hid counntry code 33 US, hid virtual cable off, hid reconnect initiate off, hid boot device off - hid_create_sdp_record(hid_service_buffer, 0x10001, 0x2540, 33, 0, 0, 0, hid_descriptor_keyboard_boot_mode, sizeof(hid_descriptor_keyboard_boot_mode), hid_device_name); + hid_create_sdp_record(hid_service_buffer, 0x10001, 0x2540, 33, 0, 0, hid_boot_device, hid_descriptor_keyboard_boot_mode, sizeof(hid_descriptor_keyboard_boot_mode), hid_device_name); printf("HID service record size: %u\n", de_get_len( hid_service_buffer)); sdp_register_service(hid_service_buffer); @@ -404,7 +405,7 @@ int btstack_main(int argc, const char * argv[]){ sdp_register_service(device_id_sdp_service_buffer); // HID Device - hid_device_init(); + hid_device_init(hid_boot_device); // register for HCI events hci_event_callback_registration.callback = &packet_handler; diff --git a/example/hid_mouse_demo.c b/example/hid_mouse_demo.c index 40eb4b044..aba7707a7 100644 --- a/example/hid_mouse_demo.c +++ b/example/hid_mouse_demo.c @@ -113,6 +113,7 @@ static void send_report(uint8_t buttons, int8_t dx, int8_t dy){ static int dx; static int dy; static uint8_t buttons; +static int hid_boot_device = 0; static void mousing_can_send_now(void){ send_report(buttons, dx, dy); @@ -295,12 +296,12 @@ int btstack_main(int argc, const char * argv[]){ sdp_init(); memset(hid_service_buffer, 0, sizeof(hid_service_buffer)); // hid sevice subclass 2540 Keyboard, hid counntry code 33 US, hid virtual cable off, hid reconnect initiate off, hid boot device off - hid_create_sdp_record(hid_service_buffer, 0x10001, 0x2540, 33, 0, 0, 0, hid_descriptor_mouse_boot_mode, sizeof(hid_descriptor_mouse_boot_mode), hid_device_name); + hid_create_sdp_record(hid_service_buffer, 0x10001, 0x2540, 33, 0, 0, hid_boot_device, hid_descriptor_mouse_boot_mode, sizeof(hid_descriptor_mouse_boot_mode), hid_device_name); printf("SDP service record size: %u\n", de_get_len( hid_service_buffer)); sdp_register_service(hid_service_buffer); // HID Device - hid_device_init(); + hid_device_init(hid_boot_device); // register for HCI events hci_event_callback_registration.callback = &packet_handler;