avrcp_target.c (ab2445a0204a8deaee8d62e6d3fba1e51a226576) | avrcp_target.c (8b631c133ad1de27895b59950abcd1500898b447) |
---|---|
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 --- 1215 unchanged lines hidden (view full) --- 1224 break; 1225 default: 1226 log_info("AVRCP target: opcode 0x%02x not implemented", avrcp_cmd_opcode(packet,size)); 1227 break; 1228 } 1229} 1230 1231static void avrcp_target_notification_init(avrcp_connection_t * connection, avrcp_notification_event_id_t notification_id, uint8_t * value, uint16_t value_len){ | 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 --- 1215 unchanged lines hidden (view full) --- 1224 break; 1225 default: 1226 log_info("AVRCP target: opcode 0x%02x not implemented", avrcp_cmd_opcode(packet,size)); 1227 break; 1228 } 1229} 1230 1231static void avrcp_target_notification_init(avrcp_connection_t * connection, avrcp_notification_event_id_t notification_id, uint8_t * value, uint16_t value_len){ |
1232 btstack_assert(value_len + 1 < AVRCP_MAX_COMMAND_PARAMETER_LENGTH); |
|
1232 avrcp_target_vendor_dependent_response_data_init(connection, AVRCP_CTYPE_RESPONSE_CHANGED_STABLE, AVRCP_PDU_ID_REGISTER_NOTIFICATION); 1233 connection->transaction_id = avrcp_target_get_transaction_label_for_notification(connection, notification_id); 1234 1235 connection->data_len = 1 + value_len; 1236 connection->data[0] = notification_id; 1237 if (value != NULL){ 1238 (void)memcpy(connection->data + 1, value, value_len); 1239 } --- 169 unchanged lines hidden --- | 1233 avrcp_target_vendor_dependent_response_data_init(connection, AVRCP_CTYPE_RESPONSE_CHANGED_STABLE, AVRCP_PDU_ID_REGISTER_NOTIFICATION); 1234 connection->transaction_id = avrcp_target_get_transaction_label_for_notification(connection, notification_id); 1235 1236 connection->data_len = 1 + value_len; 1237 connection->data[0] = notification_id; 1238 if (value != NULL){ 1239 (void)memcpy(connection->data + 1, value, value_len); 1240 } --- 169 unchanged lines hidden --- |