avrcp_target.c (fda344fc0dd430a9c36aa60bde7e2e326811a122) avrcp_target.c (f0af2234e6fbab0b8742ba30f1ae8aa909a18e9b)
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

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

523 connection->subunit_type = AVRCP_SUBUNIT_TYPE_UNIT; //vendor unique
524 connection->subunit_id = AVRCP_SUBUNIT_ID_IGNORE;
525
526 uint8_t page = offset / 4;
527 uint8_t extension_code = 7;
528 connection->cmd_operands_length = 5;
529 connection->cmd_operands[0] = (page << 4) | extension_code;
530
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

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

523 connection->subunit_type = AVRCP_SUBUNIT_TYPE_UNIT; //vendor unique
524 connection->subunit_id = AVRCP_SUBUNIT_ID_IGNORE;
525
526 uint8_t page = offset / 4;
527 uint8_t extension_code = 7;
528 connection->cmd_operands_length = 5;
529 connection->cmd_operands[0] = (page << 4) | extension_code;
530
531 // mark non-existant entry with 0xff
531 // mark non-existent entries with 0xff
532 memset(&connection->cmd_operands[1], 0xff, 4);
533 if ((connection->subunit_info_data != NULL) && (offset < connection->subunit_info_data_size)){
534 uint8_t bytes_to_copy = btstack_min(connection->subunit_info_data_size - offset, 4);
535 memcpy(&connection->cmd_operands[1], &connection->subunit_info_data[offset], bytes_to_copy);
536 }
537
538 connection->state = AVCTP_W2_SEND_RESPONSE;
539 avrcp_request_can_send_now(connection, connection->l2cap_signaling_cid);

--- 680 unchanged lines hidden ---
532 memset(&connection->cmd_operands[1], 0xff, 4);
533 if ((connection->subunit_info_data != NULL) && (offset < connection->subunit_info_data_size)){
534 uint8_t bytes_to_copy = btstack_min(connection->subunit_info_data_size - offset, 4);
535 memcpy(&connection->cmd_operands[1], &connection->subunit_info_data[offset], bytes_to_copy);
536 }
537
538 connection->state = AVCTP_W2_SEND_RESPONSE;
539 avrcp_request_can_send_now(connection, connection->l2cap_signaling_cid);

--- 680 unchanged lines hidden ---