mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-31 09:32:57 +00:00
remove Remove Ctrl-C from usage
This commit is contained in:
parent
c03fe772bb
commit
8c0f36353f
@ -475,7 +475,6 @@ static void media_processing_close(void){
|
||||
}
|
||||
|
||||
static void handle_l2cap_media_data_packet(avdtp_stream_endpoint_t * stream_endpoint, uint8_t *packet, uint16_t size){
|
||||
|
||||
UNUSED(stream_endpoint);
|
||||
|
||||
int pos = 0;
|
||||
@ -793,8 +792,6 @@ static void show_usage(void){
|
||||
printf("X - disable repeat mode\n");
|
||||
printf("z - shuffle all tracks\n");
|
||||
printf("Z - disable shuffle mode\n");
|
||||
|
||||
printf("Ctrl-c - exit\n");
|
||||
printf("---\n");
|
||||
}
|
||||
#endif
|
||||
|
@ -437,7 +437,6 @@ static void show_usage(void){
|
||||
printf("p - pause streaming\n");
|
||||
|
||||
printf("\n--- Bluetooth AVRCP Target Commands %s ---\n", bd_addr_to_str(iut_address));
|
||||
printf("Ctrl-c - exit\n");
|
||||
printf("---\n");
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,6 @@ static void ancs_callback(uint8_t packet_type, uint16_t channel, uint8_t *packet
|
||||
|
||||
int btstack_main(int argc, const char * argv[]);
|
||||
int btstack_main(int argc, const char * argv[]){
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
|
@ -169,9 +169,6 @@ static void show_usage(void){
|
||||
printf("w - put incoming call on hold (Response and Hold)\n");
|
||||
printf("x - accept held incoming call (Response and Hold)\n");
|
||||
printf("X - reject held incoming call (Response and Hold)\n");
|
||||
|
||||
printf("---\n");
|
||||
printf("Ctrl-c - exit\n");
|
||||
printf("---\n");
|
||||
}
|
||||
|
||||
|
@ -152,9 +152,7 @@ static void show_usage(void){
|
||||
printf("{ - Accept held call(RHH 1) | } - Reject held call(RHH 2)\n");
|
||||
printf("? - Query Subscriber Number (NUM)\n");
|
||||
printf("! - Update HF indicator with assigned number 1 (HFI)\n");
|
||||
printf("---\n");
|
||||
printf("Ctrl-c - exit\n");
|
||||
printf("---\n");
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
static void stdin_process(char c){
|
||||
@ -430,7 +428,6 @@ static void stdin_process(char c){
|
||||
printf("Update HF indicator with assigned number 1 (HFI)\n");
|
||||
hfp_hf_set_hf_indicator(acl_handle, 1, 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
show_usage();
|
||||
break;
|
||||
|
@ -115,9 +115,7 @@ static void show_usage(void){
|
||||
printf("S - set speaker gain 15\n");
|
||||
printf("r - start ringing\n");
|
||||
printf("t - stop ringing\n");
|
||||
printf("---\n");
|
||||
printf("Ctrl-c - exit\n");
|
||||
printf("---\n");
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
#ifdef HAVE_BTSTACK_STDIN
|
||||
@ -170,7 +168,6 @@ static void stdin_process(char c){
|
||||
default:
|
||||
show_usage();
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -115,9 +115,7 @@ static void show_usage(void){
|
||||
printf("o - set speaker gain 0\n");
|
||||
printf("s - set speaker gain 8\n");
|
||||
printf("S - set speaker gain 15\n");
|
||||
printf("---\n");
|
||||
printf("Ctrl-c - exit\n");
|
||||
printf("---\n");
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
#ifdef HAVE_BTSTACK_STDIN
|
||||
|
@ -83,9 +83,7 @@ static void show_usage(void){
|
||||
printf("c - set phonebook '/SIM1/telecom/pb'\n");
|
||||
printf("d - pull phonebook\n");
|
||||
printf("e - disconnnect\n");
|
||||
printf("---\n");
|
||||
printf("Ctrl-c - exit\n");
|
||||
printf("---\n");
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
static void stdin_process(char c){
|
||||
|
@ -291,6 +291,11 @@ static void stream_endpoint_state_machine(avdtp_connection_t * connection, avdtp
|
||||
uint8_t status;
|
||||
bd_addr_t address;
|
||||
|
||||
if (!connection){
|
||||
log_error("avdtp: connection does not exist.");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (packet_type){
|
||||
case L2CAP_DATA_PACKET:{
|
||||
int offset = avdtp_read_signaling_header(&connection->signaling_packet, packet, size);
|
||||
@ -302,6 +307,11 @@ static void stream_endpoint_state_machine(avdtp_connection_t * connection, avdtp
|
||||
break;
|
||||
}
|
||||
case HCI_EVENT_PACKET:
|
||||
if (!stream_endpoint){
|
||||
log_error("avdtp: stream_endpoint does not exist.");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (event){
|
||||
case L2CAP_EVENT_CHANNEL_OPENED:
|
||||
l2cap_event_channel_opened_get_address(packet, address);
|
||||
@ -333,7 +343,7 @@ static void stream_endpoint_state_machine(avdtp_connection_t * connection, avdtp
|
||||
case L2CAP_EVENT_CHANNEL_CLOSED:
|
||||
local_cid = l2cap_event_channel_closed_get_local_cid(packet);
|
||||
if (stream_endpoint->l2cap_media_cid == local_cid){
|
||||
avdtp_streaming_emit_connection_released(context->avdtp_callback, stream_endpoint->connection->avdtp_cid, avdtp_local_seid(stream_endpoint));
|
||||
avdtp_streaming_emit_connection_released(context->avdtp_callback, connection->avdtp_cid, avdtp_local_seid(stream_endpoint));
|
||||
stream_endpoint->l2cap_media_cid = 0;
|
||||
stream_endpoint->state = AVDTP_STREAM_ENDPOINT_IDLE;
|
||||
stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_STREAM_CONFIG_IDLE;
|
||||
@ -502,9 +512,11 @@ void avdtp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet
|
||||
break;
|
||||
}
|
||||
|
||||
if (channel == stream_endpoint->connection->l2cap_signaling_cid){
|
||||
stream_endpoint_state_machine(stream_endpoint->connection, stream_endpoint, L2CAP_DATA_PACKET, 0, packet, size, context);
|
||||
break;
|
||||
if (stream_endpoint->connection){
|
||||
if (channel == stream_endpoint->connection->l2cap_signaling_cid){
|
||||
stream_endpoint_state_machine(stream_endpoint->connection, stream_endpoint, L2CAP_DATA_PACKET, 0, packet, size, context);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (channel == stream_endpoint->l2cap_media_cid){
|
||||
@ -599,7 +611,8 @@ void avdtp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet
|
||||
connection = avdtp_connection_for_l2cap_signaling_cid(local_cid, context);
|
||||
stream_endpoint = avdtp_stream_endpoint_for_l2cap_cid(local_cid, context);
|
||||
|
||||
if (stream_endpoint){
|
||||
if (stream_endpoint){
|
||||
printf("stream_endpoint %p, connection %p, se con %p \n", stream_endpoint, connection, stream_endpoint->connection);
|
||||
stream_endpoint_state_machine(connection, stream_endpoint, HCI_EVENT_PACKET, L2CAP_EVENT_CHANNEL_CLOSED, packet, size, context);
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user