mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 13:20:39 +00:00
example/a2dp_sink_demo: fix compile without stdin support
This commit is contained in:
parent
0e0bba862c
commit
f5850b3b4e
@ -913,15 +913,17 @@ static void a2dp_sink_packet_handler(uint8_t packet_type, uint16_t channel, uint
|
||||
case A2DP_SUBEVENT_STREAM_ESTABLISHED:
|
||||
a2dp_subevent_stream_established_get_bd_addr(packet, address);
|
||||
status = a2dp_subevent_stream_established_get_status(packet);
|
||||
|
||||
if (status){
|
||||
printf("A2DP Sink : Streaming connection failed, status 0x%02x\n", status);
|
||||
break;
|
||||
}
|
||||
|
||||
a2dp_cid = a2dp_subevent_stream_established_get_a2dp_cid(packet);
|
||||
memcpy(device_addr, address, 6);
|
||||
printf("A2DP Sink : Streaming connection is established, address %s, cid 0x%02X, local seid %d\n", bd_addr_to_str(address), a2dp_cid, a2dp_local_seid);
|
||||
#ifdef HAVE_BTSTACK_STDIN
|
||||
// use address for outgoing connections
|
||||
memcpy(device_addr, address, 6);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case A2DP_SUBEVENT_STREAM_STARTED:
|
||||
@ -1161,4 +1163,4 @@ int btstack_main(int argc, const char * argv[]){
|
||||
hci_power_control(HCI_POWER_ON);
|
||||
return 0;
|
||||
}
|
||||
/* EXAMPLE_END */
|
||||
/* EXAMPLE_END */
|
||||
|
Loading…
x
Reference in New Issue
Block a user