hid_device.c (6535961a1f105e850ecdf294c128b9fc982ee05a) hid_device.c (78315a58573f370dd679856042aa32fba14bc84a)
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 837 unchanged lines hidden (view full) ---

846void hid_device_init(uint8_t boot_protocol_mode_supported, uint16_t descriptor_len, const uint8_t * descriptor){
847 hid_boot_protocol_mode_supported = boot_protocol_mode_supported;
848 hid_descriptor = descriptor;
849 hid_descriptor_len = descriptor_len;
850 hci_device_get_report = dummy_write_report;
851 hci_device_set_report = dummy_set_report;
852 hci_device_report_data = dummy_report_data;
853
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 837 unchanged lines hidden (view full) ---

846void hid_device_init(uint8_t boot_protocol_mode_supported, uint16_t descriptor_len, const uint8_t * descriptor){
847 hid_boot_protocol_mode_supported = boot_protocol_mode_supported;
848 hid_descriptor = descriptor;
849 hid_descriptor_len = descriptor_len;
850 hci_device_get_report = dummy_write_report;
851 hci_device_set_report = dummy_set_report;
852 hci_device_report_data = dummy_report_data;
853
854 l2cap_register_service(packet_handler, PSM_HID_INTERRUPT, 100, LEVEL_2);
855 l2cap_register_service(packet_handler, PSM_HID_CONTROL, 100, LEVEL_2);
854 l2cap_register_service(packet_handler, PSM_HID_INTERRUPT, 100, gap_get_security_level());
855 l2cap_register_service(packet_handler, PSM_HID_CONTROL, 100, gap_get_security_level());
856}
857
858/**
859 * @brief Register callback for the HID Device client.
860 * @param callback
861 */
862void hid_device_register_packet_handler(btstack_packet_handler_t callback){
863 hid_callback = callback;

--- 149 unchanged lines hidden ---
856}
857
858/**
859 * @brief Register callback for the HID Device client.
860 * @param callback
861 */
862void hid_device_register_packet_handler(btstack_packet_handler_t callback){
863 hid_callback = callback;

--- 149 unchanged lines hidden ---