/Zephyr-latest/tests/bsim/bluetooth/host/iso/cis/src/ |
D | common.c | 16 struct bt_conn *default_conn; variable 26 if (default_conn == NULL) { in connected() 27 default_conn = bt_conn_ref(conn); in connected() 31 bt_conn_unref(default_conn); in connected() 32 default_conn = NULL; in connected() 47 if (conn != default_conn) { in disconnected() 55 bt_conn_unref(default_conn); in disconnected() 56 default_conn = NULL; in disconnected()
|
/Zephyr-latest/samples/bluetooth/central/src/ |
D | main.c | 24 static struct bt_conn *default_conn; variable 32 if (default_conn) { in device_found() 55 BT_LE_CONN_PARAM_DEFAULT, &default_conn); in device_found() 85 bt_conn_unref(default_conn); in connected() 86 default_conn = NULL; in connected() 92 if (conn != default_conn) { in connected() 105 if (conn != default_conn) { in disconnected() 113 bt_conn_unref(default_conn); in disconnected() 114 default_conn = NULL; in disconnected()
|
/Zephyr-latest/tests/bsim/bluetooth/host/att/eatt/src/ |
D | common.c | 12 struct bt_conn *default_conn; variable 28 if (default_conn) { in connected() 29 bt_conn_unref(default_conn); in connected() 30 default_conn = NULL; in connected() 37 if (!default_conn) { in connected() 38 default_conn = bt_conn_ref(conn); in connected() 53 bt_conn_unref(default_conn); in disconnected() 54 default_conn = NULL; in disconnected() 84 &default_conn); in device_found() 124 err = bt_conn_set_security(default_conn, BT_SECURITY_L2); in central_setup_and_connect() [all …]
|
D | main_collision.c | 25 err = bt_eatt_connect(default_conn, CONFIG_BT_EATT_MAX); in test_peripheral_main() 30 while (bt_eatt_count(default_conn) < CONFIG_BT_EATT_MAX) { in test_peripheral_main() 53 err = bt_eatt_connect(default_conn, CONFIG_BT_EATT_MAX); in test_central_main() 58 while (bt_eatt_count(default_conn) < CONFIG_BT_EATT_MAX) { in test_central_main()
|
/Zephyr-latest/tests/bsim/bluetooth/host/l2cap/send_on_connect/src/ |
D | main_l2cap_send_on_connect.c | 14 static struct bt_conn *default_conn; variable 101 err = bt_l2cap_ecred_chan_connect(default_conn, chans, server.psm); in connect_l2cap_channel() 106 err = bt_l2cap_chan_connect(default_conn, &channel.chan, server.psm); in connect_l2cap_channel() 128 bt_conn_unref(default_conn); in connected() 129 default_conn = NULL; in connected() 133 default_conn = bt_conn_ref(conn); in connected() 140 if (default_conn != conn) { in disconnected() 141 FAIL("Connection mismatch %p %p)\n", default_conn, conn); in disconnected() 145 bt_conn_unref(default_conn); in disconnected() 146 default_conn = NULL; in disconnected() [all …]
|
/Zephyr-latest/samples/bluetooth/tmap_central/src/ |
D | main.c | 31 static struct bt_conn *default_conn; variable 51 if (conn != default_conn) { in tmap_discovery_complete() 94 bt_conn_unref(default_conn); in connected() 95 default_conn = NULL; in connected() 101 if (conn != default_conn) { in connected() 113 if (conn != default_conn) { in disconnected() 121 bt_conn_unref(default_conn); in disconnected() 122 default_conn = NULL; in disconnected() 193 &default_conn); in check_audio_support_and_connect() 207 if (default_conn != NULL) { in scan_recv() [all …]
|
/Zephyr-latest/samples/bluetooth/tmap_peripheral/src/ |
D | mcp_ctlr.c | 20 static struct bt_conn *default_conn; variable 54 default_conn = bt_conn_ref(conn); in mcp_ctlr_init() 61 err = bt_mcc_discover_mcs(default_conn, true); in mcp_ctlr_init() 76 if (default_conn == NULL) { in mcp_send_cmd() 81 err = bt_mcc_send_cmd(default_conn, &cmd); in mcp_send_cmd()
|
D | main.c | 35 static struct bt_conn *default_conn; variable 83 if (conn != default_conn) { in tmap_discovery_complete() 111 default_conn = NULL; in connected() 116 default_conn = bt_conn_ref(conn); in connected() 124 if (conn != default_conn) { in disconnected() 132 bt_conn_unref(default_conn); in disconnected() 133 default_conn = NULL; in disconnected() 277 err = bt_tmap_discover(default_conn, &tmap_callbacks); in main() 283 err = ccp_call_ctrl_init(default_conn); in main() 289 err = mcp_ctlr_init(default_conn); in main()
|
/Zephyr-latest/tests/bsim/bluetooth/audio/src/ |
D | mcc_test.c | 578 err = bt_ots_client_select_id(NULL, default_conn, id); in test_select_obj_id() 584 err = bt_ots_client_select_id(bt_mcc_otc_inst(default_conn), NULL, id); in test_select_obj_id() 592 err = bt_ots_client_select_id(bt_mcc_otc_inst(default_conn), default_conn, invalid_id); in test_select_obj_id() 601 err = bt_ots_client_select_id(bt_mcc_otc_inst(default_conn), default_conn, invalid_id); in test_select_obj_id() 610 err = bt_ots_client_select_id(bt_mcc_otc_inst(default_conn), in test_select_obj_id() 611 default_conn, id); in test_select_obj_id() 635 err = bt_mcc_otc_read_object_metadata(default_conn); in test_read_object_meta() 657 err = bt_mcc_read_media_state(default_conn); in test_verify_media_state_wait_flags() 686 err = bt_mcc_read_opcodes_supported(default_conn); in test_read_supported_opcodes() 710 err = bt_mcc_send_cmd(default_conn, NULL); in test_invalid_send_cmd() [all …]
|
D | csip_notify_client_test.c | 75 err = bt_conn_set_security(default_conn, BT_SECURITY_L2); in test_main() 82 bt_csip_set_coordinator_discover(default_conn); in test_main() 90 bt_conn_disconnect(default_conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN); in test_main() 108 err = bt_conn_set_security(default_conn, BT_SECURITY_L2); in test_main() 115 bt_csip_set_coordinator_discover(default_conn); in test_main() 121 bt_conn_disconnect(default_conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN); in test_main()
|
/Zephyr-latest/samples/bluetooth/extended_adv/advertiser/src/ |
D | main.c | 12 static struct bt_conn *default_conn; variable 47 __ASSERT(!default_conn, "Attempting to override existing connection object!"); in connected_cb() 48 default_conn = bt_conn_ref(conn); in connected_cb() 57 __ASSERT(conn == default_conn, "Unexpected disconnected callback"); in disconnected_cb() 59 bt_conn_unref(default_conn); in disconnected_cb() 60 default_conn = NULL; in disconnected_cb() 144 bt_conn_disconnect(default_conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN); in main()
|
/Zephyr-latest/subsys/bluetooth/audio/shell/ |
D | mcc.c | 709 result = bt_mcc_discover_mcs(default_conn, (bool)subscribe); in cmd_mcc_discover_mcs() 721 result = bt_mcc_read_player_name(default_conn); in cmd_mcc_read_player_name() 734 result = bt_mcc_read_icon_obj_id(default_conn); in cmd_mcc_read_icon_obj_id() 748 result = bt_mcc_read_icon_url(default_conn); in cmd_mcc_read_icon_url() 762 result = bt_mcc_read_track_title(default_conn); in cmd_mcc_read_track_title() 776 result = bt_mcc_read_track_duration(default_conn); in cmd_mcc_read_track_duration() 790 result = bt_mcc_read_track_position(default_conn); in cmd_mcc_read_track_position() 818 result = bt_mcc_set_track_position(default_conn, pos); in cmd_mcc_set_track_position() 833 result = bt_mcc_read_playback_speed(default_conn); in cmd_mcc_read_playback_speed() 862 result = bt_mcc_set_playback_speed(default_conn, speed); in cmd_mcc_set_playback_speed() [all …]
|
/Zephyr-latest/tests/bsim/bluetooth/host/gatt/settings/src/ |
D | utils.c | 12 static struct bt_conn *default_conn; variable 34 __ASSERT_NO_MSG(default_conn == conn); in disconnected() 36 bt_conn_unref(default_conn); in disconnected() 37 default_conn = NULL; in disconnected() 56 __ASSERT_NO_MSG(default_conn == NULL); in connected() 57 default_conn = bt_conn_ref(conn); in connected() 60 __ASSERT_NO_MSG(default_conn != NULL); in connected() 102 &default_conn); in scan_connect_to_first_result_device_found() 143 return default_conn; in get_conn()
|
/Zephyr-latest/samples/bluetooth/mtu_update/peripheral/src/ |
D | peripheral_mtu_update.c | 34 static struct bt_conn *default_conn; variable 65 default_conn = bt_conn_ref(conn); in connected() 71 default_conn = NULL; in disconnected() 101 if (bt_gatt_get_uatt_mtu(default_conn) >= ATT_NTF_SIZE(notify_data_size)) { in run_peripheral_sample() 102 bt_gatt_notify(default_conn, notify_crch, notify_data, notify_data_size); in run_peripheral_sample() 107 bt_gatt_get_uatt_mtu(default_conn)); in run_peripheral_sample()
|
/Zephyr-latest/tests/bsim/bluetooth/host/l2cap/userdata/src/ |
D | main_l2cap_userdata.c | 14 static struct bt_conn *default_conn; variable 97 err = bt_l2cap_ecred_chan_connect(default_conn, chans, server.psm); in connect_l2cap_channel() 118 bt_conn_unref(default_conn); in connected() 119 default_conn = NULL; in connected() 123 default_conn = bt_conn_ref(conn); in connected() 130 if (default_conn != conn) { in disconnected() 131 FAIL("Connection mismatch %p %p)\n", default_conn, conn); in disconnected() 135 bt_conn_unref(default_conn); in disconnected() 136 default_conn = NULL; in disconnected() 158 err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, param, &default_conn); in device_found() [all …]
|
/Zephyr-latest/samples/bluetooth/direction_finding_central/src/ |
D | main.c | 36 static struct bt_conn *default_conn; variable 116 err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, &conn_params, &default_conn); in eir_found() 167 err = bt_df_conn_cte_rx_enable(default_conn, &cte_rx_params); in enable_cte_reqest() 175 err = bt_df_conn_cte_req_enable(default_conn, &cte_req_params); in enable_cte_reqest() 215 bt_conn_unref(default_conn); in connected() 216 default_conn = NULL; in connected() 224 if (conn == default_conn) { in connected() 237 if (default_conn != conn) { in disconnected() 241 bt_conn_unref(default_conn); in disconnected() 242 default_conn = NULL; in disconnected()
|
/Zephyr-latest/samples/bluetooth/mtu_update/central/src/ |
D | central_mtu_update.c | 34 static struct bt_conn *default_conn; variable 120 if (default_conn) { in device_found() 143 BT_LE_CONN_PARAM_DEFAULT, &default_conn); in device_found() 199 bt_conn_unref(default_conn); in connected() 200 default_conn = NULL; in connected() 210 if (conn == default_conn) { in connected() 218 err = bt_gatt_discover(default_conn, &discover_params); in connected() 230 if (conn != default_conn) { in disconnected() 238 bt_conn_unref(default_conn); in disconnected() 239 default_conn = NULL; in disconnected()
|
/Zephyr-latest/samples/boards/bbc/microbit/pong/src/ |
D | ble.c | 48 static struct bt_conn *default_conn; variable 102 if (!default_conn || !remote_ready) { in ble_send_ball() 109 err = bt_gatt_notify(default_conn, local_attr, &data, BALL_INFO_LEN); in ble_send_ball() 120 if (!default_conn || !remote_ready) { in ble_send_lost() 125 err = bt_gatt_notify(default_conn, local_attr, &lost, sizeof(lost)); in ble_send_lost() 142 if (default_conn) { in notify_func() 143 bt_conn_disconnect(default_conn, in notify_func() 245 if (!default_conn) { in connected() 246 default_conn = bt_conn_ref(conn); in connected() 264 if (default_conn) { in disconnected() [all …]
|
/Zephyr-latest/samples/bluetooth/iso_central/src/ |
D | main.c | 25 static struct bt_conn *default_conn; variable 100 if (default_conn) { in device_found() 122 err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, conn_param, &default_conn); in device_found() 187 bt_conn_unref(default_conn); in connected() 188 default_conn = NULL; in connected() 194 if (conn != default_conn) { in connected() 215 if (conn != default_conn) { in disconnected() 223 bt_conn_unref(default_conn); in disconnected() 224 default_conn = NULL; in disconnected()
|
/Zephyr-latest/samples/bluetooth/periodic_adv_conn/src/ |
D | main.c | 71 static struct bt_conn *default_conn; variable 86 if (default_conn) { in response_cb() 112 err = bt_conn_le_create_synced(adv, &synced_param, &conn_param, &default_conn); in response_cb() 127 __ASSERT(conn == default_conn, "Unexpected connected callback"); in connected_cb() 130 bt_conn_unref(default_conn); in connected_cb() 131 default_conn = NULL; in connected_cb() 139 __ASSERT(conn == default_conn, "Unexpected disconnected callback"); in disconnected_cb() 141 bt_conn_unref(default_conn); in disconnected_cb() 142 default_conn = NULL; in disconnected_cb()
|
/Zephyr-latest/samples/bluetooth/handsfree_ag/src/ |
D | main.c | 26 static struct bt_conn *default_conn; variable 151 if (default_conn != NULL) { in connected() 152 default_conn = NULL; in connected() 156 if (default_conn == conn) { in connected() 168 res = bt_sdp_discover(default_conn, &sdp_discover); in connected() 183 if (default_conn != conn) { in disconnected() 187 if (default_conn) { in disconnected() 188 default_conn = NULL; in disconnected() 267 default_conn = bt_conn_create_br(&results[i].addr, BT_BR_CONN_PARAM_DEFAULT); in discovery_timeout_cb() 269 if (default_conn == NULL) { in discovery_timeout_cb() [all …]
|
/Zephyr-latest/samples/bluetooth/central_hr/src/ |
D | main.c | 24 static struct bt_conn *default_conn; variable 142 &default_conn); in eir_found() 150 param, &default_conn); in eir_found() 222 bt_conn_unref(default_conn); in connected() 223 default_conn = NULL; in connected() 233 if (conn == default_conn) { in connected() 241 err = bt_gatt_discover(default_conn, &discover_params); in connected() 257 if (default_conn != conn) { in disconnected() 261 bt_conn_unref(default_conn); in disconnected() 262 default_conn = NULL; in disconnected()
|
/Zephyr-latest/tests/bsim/bluetooth/host/gatt/ccc_store/src/ |
D | central.c | 37 static struct bt_conn *default_conn; variable 89 err = bt_gatt_subscribe(default_conn, &subscribe_params); in ccc_subscribe() 113 &default_conn); in device_found() 133 if (conn == default_conn) { in connected() 148 if (default_conn != conn) { in disconnected() 152 bt_conn_unref(default_conn); in disconnected() 153 default_conn = NULL; in disconnected() 186 err = bt_conn_disconnect(default_conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN); in disconnect() 206 err = bt_conn_set_security(default_conn, BT_SECURITY_L2); in connect_pair_subscribe() 235 err = bt_conn_set_security(default_conn, BT_SECURITY_L2); in connect_restore_sec()
|
/Zephyr-latest/samples/bluetooth/peripheral_past/src/ |
D | main.c | 13 static struct bt_conn *default_conn; variable 81 if (default_conn == NULL) { in connected() 82 default_conn = bt_conn_ref(conn); in connected() 85 if (conn != default_conn) { in connected() 96 if (conn != default_conn) { in disconnected() 104 bt_conn_unref(default_conn); in disconnected() 105 default_conn = NULL; in disconnected()
|
/Zephyr-latest/tests/bsim/bluetooth/host/security/ccc_update/src/ |
D | central.c | 37 static struct bt_conn *default_conn; variable 88 err = gatt_write(default_conn, CCC_HANDLE, &buf, sizeof(buf)); in ccc_subscribe() 99 err = gatt_write(default_conn, CCC_HANDLE, &buf, sizeof(buf)); in ccc_unsubscribe() 121 &default_conn); in device_found() 141 if (conn == default_conn) { in connected() 156 if (default_conn != conn) { in disconnected() 160 bt_conn_unref(default_conn); in disconnected() 161 default_conn = NULL; in disconnected() 194 err = bt_conn_disconnect(default_conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN); in disconnect() 214 err = bt_conn_set_security(default_conn, BT_SECURITY_L2); in connect_pair_subscribe() [all …]
|