avrcp_controller.c (8c79e1682c8591240edb782de78fd7fe6f074baa) | avrcp_controller.c (45a58b3093f5320b8ffda59b52081d2b540d3217) |
---|---|
1/* 2 * Copyright (C) 2016 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 --- 890 unchanged lines hidden (view full) --- 899 break; 900 } 901} 902 903void avrcp_controller_init(void){ 904 avrcp_controller_context.role = AVRCP_CONTROLLER; 905 avrcp_controller_context.connections = NULL; 906 avrcp_controller_context.packet_handler = avrcp_controller_packet_handler; | 1/* 2 * Copyright (C) 2016 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 --- 890 unchanged lines hidden (view full) --- 899 break; 900 } 901} 902 903void avrcp_controller_init(void){ 904 avrcp_controller_context.role = AVRCP_CONTROLLER; 905 avrcp_controller_context.connections = NULL; 906 avrcp_controller_context.packet_handler = avrcp_controller_packet_handler; |
907 l2cap_register_service(&avrcp_controller_packet_handler, BLUETOOTH_PROTOCOL_AVCTP, 0xffff, LEVEL_0); | 907 l2cap_register_service(&avrcp_controller_packet_handler, BLUETOOTH_PROTOCOL_AVCTP, 0xffff, LEVEL_2); |
908} 909 910void avrcp_controller_register_packet_handler(btstack_packet_handler_t callback){ 911 if (callback == NULL){ 912 log_error("avrcp_register_packet_handler called with NULL callback"); 913 return; 914 } 915 avrcp_controller_context.avrcp_callback = callback; --- 508 unchanged lines hidden --- | 908} 909 910void avrcp_controller_register_packet_handler(btstack_packet_handler_t callback){ 911 if (callback == NULL){ 912 log_error("avrcp_register_packet_handler called with NULL callback"); 913 return; 914 } 915 avrcp_controller_context.avrcp_callback = callback; --- 508 unchanged lines hidden --- |