avrcp_target.c (355a220f69a53913841897efabfbd64f82397d09) | avrcp_target.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 --- 1222 unchanged lines hidden (view full) --- 1231 break; 1232 } 1233} 1234 1235void avrcp_target_init(void){ 1236 avrcp_target_context.role = AVRCP_TARGET; 1237 avrcp_target_context.connections = NULL; 1238 avrcp_target_context.packet_handler = avrcp_target_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 --- 1222 unchanged lines hidden (view full) --- 1231 break; 1232 } 1233} 1234 1235void avrcp_target_init(void){ 1236 avrcp_target_context.role = AVRCP_TARGET; 1237 avrcp_target_context.connections = NULL; 1238 avrcp_target_context.packet_handler = avrcp_target_packet_handler; |
1239 l2cap_register_service(&avrcp_target_packet_handler, BLUETOOTH_PROTOCOL_AVCTP, 0xffff, LEVEL_0); | 1239 l2cap_register_service(&avrcp_target_packet_handler, BLUETOOTH_PROTOCOL_AVCTP, 0xffff, LEVEL_2); |
1240} 1241 1242void avrcp_target_register_packet_handler(btstack_packet_handler_t callback){ 1243 if (callback == NULL){ 1244 log_error("avrcp_register_packet_handler called with NULL callback"); 1245 return; 1246 } 1247 avrcp_target_context.avrcp_callback = callback; --- 17 unchanged lines hidden --- | 1240} 1241 1242void avrcp_target_register_packet_handler(btstack_packet_handler_t callback){ 1243 if (callback == NULL){ 1244 log_error("avrcp_register_packet_handler called with NULL callback"); 1245 return; 1246 } 1247 avrcp_target_context.avrcp_callback = callback; --- 17 unchanged lines hidden --- |