avrcp_browsing_target: fix compile

This commit is contained in:
Milanka Ringwald 2019-09-13 15:15:48 +02:00
parent 067de866b0
commit 69d0a1a709
2 changed files with 2 additions and 15 deletions

View File

@ -48,22 +48,9 @@
#define PSM_AVCTP_BROWSING 0x001b
static uint16_t avrcp_browsing_cid_counter = 0;
static void avrcp_browser_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size, avrcp_context_t * context);
static void avrcp_browsing_controller_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
static uint16_t avrcp_browsing_get_next_cid(avrcp_role_t role){
do {
if (avrcp_browsing_cid_counter == 0xffff) {
avrcp_browsing_cid_counter = 1;
} else {
avrcp_browsing_cid_counter++;
}
} while (get_avrcp_connection_for_browsing_l2cap_cid(role, avrcp_browsing_cid_counter) != NULL) ;
return avrcp_browsing_cid_counter;
}
static void avrcp_emit_browsing_connection_established(btstack_packet_handler_t callback, uint16_t browsing_cid, bd_addr_t addr, uint8_t status){
if (!callback) return;
uint8_t event[12];
@ -109,7 +96,7 @@ static avrcp_browsing_connection_t * avrcp_browsing_create_connection(avrcp_conn
avrcp_browsing_connection_t * connection = btstack_memory_avrcp_browsing_connection_get();
connection->state = AVCTP_CONNECTION_IDLE;
connection->transaction_label = 0xFF;
avrcp_connection->avrcp_browsing_cid = avrcp_browsing_get_next_cid(avrcp_connection->role);
avrcp_connection->avrcp_browsing_cid = avrcp_get_next_cid(avrcp_connection->role);
avrcp_connection->browsing_connection = connection;
return connection;
}

View File

@ -167,7 +167,7 @@ static avrcp_browsing_connection_t * avrcp_browsing_create_connection(avrcp_conn
avrcp_browsing_connection_t * connection = btstack_memory_avrcp_browsing_connection_get();
connection->state = AVCTP_CONNECTION_IDLE;
connection->transaction_label = 0xFF;
avrcp_connection->avrcp_browsing_cid = avrcp_get_next_cid();
avrcp_connection->avrcp_browsing_cid = avrcp_get_next_cid(avrcp_connection->role);
avrcp_connection->browsing_connection = connection;
return connection;
}