/Zephyr-Core-3.5.0/subsys/bluetooth/shell/ |
D | hci.c | 31 struct bt_hci_cp_mesh_advertise *cp; in cmd_mesh_adv() local 35 sizeof(*cp)); in cmd_mesh_adv() 43 cp = net_buf_add(buf, sizeof(*cp)); in cmd_mesh_adv() 44 cp->adv_slot = 0U; in cmd_mesh_adv() 45 cp->own_addr_type = 0x01; in cmd_mesh_adv() 46 memset(&cp->random_addr, 0, sizeof(bt_addr_t)); in cmd_mesh_adv() 47 cp->ch_map = 0x07; in cmd_mesh_adv() 48 cp->tx_power = 0; in cmd_mesh_adv() 49 cp->min_tx_delay = 0U; in cmd_mesh_adv() 50 cp->max_tx_delay = 0x32; in cmd_mesh_adv() [all …]
|
/Zephyr-Core-3.5.0/tests/bluetooth/tester/src/ |
D | btp_mesh.c | 798 const struct btp_priv_beacon_get_cmd *cp = cmd; in priv_beacon_get() local 803 err = bt_mesh_priv_beacon_cli_get(net.net_idx, cp->dst, &val); in priv_beacon_get() 816 const struct btp_priv_beacon_set_cmd *cp = cmd; in priv_beacon_set() local 820 val.enabled = cp->enabled; in priv_beacon_set() 821 val.rand_interval = cp->rand_interval; in priv_beacon_set() 823 err = bt_mesh_priv_beacon_cli_set(net.net_idx, cp->dst, &val); in priv_beacon_set() 835 const struct btp_priv_gatt_proxy_get_cmd *cp = cmd; in priv_gatt_proxy_get() local 840 err = bt_mesh_priv_beacon_cli_gatt_proxy_get(net.net_idx, cp->dst, &state); in priv_gatt_proxy_get() 853 const struct btp_priv_gatt_proxy_set_cmd *cp = cmd; in priv_gatt_proxy_set() local 858 state = cp->state; in priv_gatt_proxy_set() [all …]
|
D | btp_has.c | 35 const struct btp_has_set_active_index_cmd *cp = cmd; in has_set_active_index() local 36 int err = bt_has_preset_active_set(cp->index); in has_set_active_index() 47 const struct btp_has_set_preset_name_cmd *cp = cmd; in has_set_preset_name() local 48 const uint16_t fixed_size = sizeof(*cp); in has_set_preset_name() 51 if (cmd_len >= fixed_size && cmd_len >= (fixed_size + cp->length)) { in has_set_preset_name() 52 int name_len = MIN(cp->length, BT_HAS_PRESET_NAME_MAX); in has_set_preset_name() 54 memcpy(temp_name, cp->name, name_len); in has_set_preset_name() 56 err = bt_has_preset_name_change(cp->index, temp_name); in has_set_preset_name() 64 const struct btp_has_remove_preset_cmd *cp = cmd; in has_remove_preset() local 67 if (cp->index == BT_HAS_PRESET_INDEX_NONE) { in has_remove_preset() [all …]
|
D | btp_gatt.c | 291 const struct btp_gatt_add_service_cmd *cp = cmd; in add_service() local 297 if ((cmd_len < sizeof(*cp)) || in add_service() 298 (cmd_len != sizeof(*cp) + cp->uuid_length)) { in add_service() 302 if (btp2bt_uuid(cp->uuid, cp->uuid_length, &uuid.uuid)) { in add_service() 318 switch (cp->type) { in add_service() 496 const struct btp_gatt_add_characteristic_cmd *cp = cmd; in add_characteristic() local 501 if ((cmd_len < sizeof(*cp)) || in add_characteristic() 502 (cmd_len != sizeof(*cp) + cp->uuid_length)) { in add_characteristic() 508 cmd_data.permissions = cp->permissions; in add_characteristic() 509 cmd_data.properties = cp->properties; in add_characteristic() [all …]
|
D | btp_l2cap.c | 197 const struct btp_l2cap_connect_cmd *cp = cmd; in connect() local 202 uint16_t mtu = sys_le16_to_cpu(cp->mtu); in connect() 203 uint16_t psm = sys_le16_to_cpu(cp->psm); in connect() 205 bool ecfc = cp->options & BTP_L2CAP_CONNECT_OPT_ECFC; in connect() 208 if (cp->num == 0 || cp->num > CHANNELS || mtu > DATA_MTU_INITIAL) { in connect() 212 conn = bt_conn_lookup_addr_le(BT_ID_DEFAULT, &cp->address); in connect() 217 for (i = 0U; i < cp->num; i++) { in connect() 227 chan->hold_credit = cp->options & BTP_L2CAP_CONNECT_OPT_HOLD_CREDIT; in connect() 230 if (cp->num == 1 && !ecfc) { in connect() 250 rp->num = cp->num; in connect() [all …]
|
D | btp_gap.c | 433 const struct btp_gap_oob_sc_set_remote_data_cmd *cp = cmd; in set_oob_sc_remote_data() local 441 memcpy(&oob_sc_remote.le_sc_data.r[0], cp->rand, in set_oob_sc_remote_data() 443 memcpy(&oob_sc_remote.le_sc_data.c[0], cp->conf, in set_oob_sc_remote_data() 453 const struct btp_gap_set_connectable_cmd *cp = cmd; in set_connectable() local 456 if (cp->connectable) { in set_connectable() 519 const struct btp_gap_set_discoverable_cmd *cp = cmd; in set_discoverable() local 522 switch (cp->discoverable) { in set_discoverable() 550 const struct btp_gap_set_bondable_cmd *cp = cmd; in set_bondable() local 553 LOG_DBG("bondable: %d", cp->bondable); in set_bondable() 555 if (cp->bondable) { in set_bondable() [all …]
|
D | btp_aics.c | 154 const struct btp_aics_set_gain_cmd *cp = cmd; in aics_set_gain() local 156 LOG_DBG("AICS set gain %d", cp->gain); in aics_set_gain() 158 if (!bt_addr_le_eq(&cp->address, BT_ADDR_LE_ANY)) { in aics_set_gain() 159 if (bt_aics_gain_set(aics_client_instance.aics[0], cp->gain) != 0) { in aics_set_gain() 164 if (bt_aics_gain_set(aics_server_instance.aics[i], cp->gain) != 0) { in aics_set_gain() 175 const struct btp_aics_unmute_cmd *cp = cmd; in aics_unmute() local 179 if (!bt_addr_le_eq(&cp->address, BT_ADDR_LE_ANY)) { in aics_unmute() 196 const struct btp_aics_mute_cmd *cp = cmd; in aics_mute() local 200 if (!bt_addr_le_eq(&cp->address, BT_ADDR_LE_ANY)) { in aics_mute() 217 const struct btp_aics_state_cmd *cp = cmd; in aics_state_get() local [all …]
|
D | btp_ccp.c | 218 const struct btp_ccp_discover_tbs_cmd *cp = cmd; in ccp_discover_tbs() local 222 conn = bt_conn_lookup_addr_le(BT_ID_DEFAULT, &cp->address); in ccp_discover_tbs() 234 const struct btp_ccp_accept_call_cmd *cp = cmd; in ccp_accept_call() local 238 conn = bt_conn_lookup_addr_le(BT_ID_DEFAULT, &cp->address); in ccp_accept_call() 239 err = (conn) ? bt_tbs_client_accept_call(conn, cp->inst_index, cp->call_id) : -ENOTCONN; in ccp_accept_call() 250 const struct btp_ccp_terminate_call_cmd *cp = cmd; in ccp_terminate_call() local 254 conn = bt_conn_lookup_addr_le(BT_ID_DEFAULT, &cp->address); in ccp_terminate_call() 255 err = (conn) ? bt_tbs_client_terminate_call(conn, cp->inst_index, cp->call_id) : in ccp_terminate_call() 267 const struct btp_ccp_originate_call_cmd *cp = cmd; in ccp_originate_call() local 271 conn = bt_conn_lookup_addr_le(BT_ID_DEFAULT, &cp->address); in ccp_originate_call() [all …]
|
/Zephyr-Core-3.5.0/tests/subsys/fs/common/ |
D | test_fs_util.c | 226 const struct testfs_bcmd *cp) in testfs_build() argument 230 while (!TESTFS_BCMD_IS_END(cp)) { in testfs_build() 232 if (TESTFS_BCMD_IS_FILE(cp)) { in testfs_build() 238 cp->name, in testfs_build() 242 root->path, cp->size, cp->value, rc); in testfs_build() 244 rc = testfs_write_incrementing(&file, cp->value, cp->size); in testfs_build() 255 } else if (TESTFS_BCMD_IS_ENTER_DIR(cp)) { in testfs_build() 257 cp->name, in testfs_build() 264 } else if (TESTFS_BCMD_IS_EXIT_DIR(cp)) { in testfs_build() 271 ++cp; in testfs_build() [all …]
|
D | test_fs_util.h | 208 #define TESTFS_BCMD_IS_ENTER_DIR(cp) (((cp)->type == FS_DIR_ENTRY_DIR) \ argument 209 && ((cp)->name != NULL)) 210 #define TESTFS_BCMD_IS_EXIT_DIR(cp) (((cp)->type == FS_DIR_ENTRY_DIR) \ argument 211 && ((cp)->name == NULL)) 212 #define TESTFS_BCMD_IS_FILE(cp) (((cp)->type == FS_DIR_ENTRY_FILE) \ argument 213 && ((cp)->name != NULL)) 214 #define TESTFS_BCMD_IS_END(cp) (((cp)->type == FS_DIR_ENTRY_FILE) \ argument 215 && ((cp)->name == NULL)) 225 * @param cp pointer to a sequence of commands that specify the 232 const struct testfs_bcmd *cp); [all …]
|
D | test_fs_dirops.c | 80 const struct testfs_bcmd *cp) in build_layout() argument 97 zassert_equal(testfs_build(&path, cp), in build_layout() 129 struct testfs_bcmd *cp = layout; in check_layout() local 131 while (!TESTFS_BCMD_IS_END(cp)) { in check_layout() 132 if (cp->name != NULL) { in check_layout() 134 cp->name, in check_layout() 135 (cp->type == FS_DIR_ENTRY_DIR) ? "/" : "", in check_layout() 136 cp->size); in check_layout() 137 zassert_true(cp->matched, in check_layout() 140 ++cp; in check_layout() [all …]
|
/Zephyr-Core-3.5.0/subsys/bluetooth/host/ |
D | ssp.c | 45 struct bt_hci_cp_pin_code_neg_reply *cp; in pin_code_neg_reply() local 50 buf = bt_hci_cmd_create(BT_HCI_OP_PIN_CODE_NEG_REPLY, sizeof(*cp)); in pin_code_neg_reply() 55 cp = net_buf_add(buf, sizeof(*cp)); in pin_code_neg_reply() 56 bt_addr_copy(&cp->bdaddr, bdaddr); in pin_code_neg_reply() 63 struct bt_hci_cp_pin_code_reply *cp; in pin_code_reply() local 68 buf = bt_hci_cmd_create(BT_HCI_OP_PIN_CODE_REPLY, sizeof(*cp)); in pin_code_reply() 73 cp = net_buf_add(buf, sizeof(*cp)); in pin_code_reply() 75 bt_addr_copy(&cp->bdaddr, &conn->br.dst); in pin_code_reply() 76 cp->pin_len = len; in pin_code_reply() 77 strncpy((char *)cp->pin_code, pin, sizeof(cp->pin_code)); in pin_code_reply() [all …]
|
D | br.c | 32 struct bt_hci_cp_reject_conn_req *cp; in reject_conn() local 36 buf = bt_hci_cmd_create(BT_HCI_OP_REJECT_CONN_REQ, sizeof(*cp)); in reject_conn() 41 cp = net_buf_add(buf, sizeof(*cp)); in reject_conn() 42 bt_addr_copy(&cp->bdaddr, bdaddr); in reject_conn() 43 cp->reason = reason; in reject_conn() 55 struct bt_hci_cp_accept_sync_conn_req *cp; in accept_sco_conn() local 59 buf = bt_hci_cmd_create(BT_HCI_OP_ACCEPT_SYNC_CONN_REQ, sizeof(*cp)); in accept_sco_conn() 64 cp = net_buf_add(buf, sizeof(*cp)); in accept_sco_conn() 65 bt_addr_copy(&cp->bdaddr, bdaddr); in accept_sco_conn() 66 cp->pkt_type = sco_conn->sco.pkt_type; in accept_sco_conn() [all …]
|
D | scan.c | 89 struct bt_hci_cp_le_set_ext_scan_enable *cp; in set_le_ext_scan_enable() local 94 buf = bt_hci_cmd_create(BT_HCI_OP_LE_SET_EXT_SCAN_ENABLE, sizeof(*cp)); in set_le_ext_scan_enable() 99 cp = net_buf_add(buf, sizeof(*cp)); in set_le_ext_scan_enable() 102 cp->filter_dup = atomic_test_bit(bt_dev.flags, in set_le_ext_scan_enable() 105 cp->filter_dup = BT_HCI_LE_SCAN_FILTER_DUP_DISABLE; in set_le_ext_scan_enable() 108 cp->enable = enable; in set_le_ext_scan_enable() 109 cp->duration = sys_cpu_to_le16(duration); in set_le_ext_scan_enable() 110 cp->period = 0; in set_le_ext_scan_enable() 125 struct bt_hci_cp_le_set_scan_enable *cp; in bt_le_scan_set_enable_legacy() local 130 buf = bt_hci_cmd_create(BT_HCI_OP_LE_SET_SCAN_ENABLE, sizeof(*cp)); in bt_le_scan_set_enable_legacy() [all …]
|
D | direction.c | 91 struct bt_hci_cp_le_set_cl_cte_tx_params *cp; in hci_df_set_cl_cte_tx_params() local 128 sizeof(*cp) + params->num_ant_ids); in hci_df_set_cl_cte_tx_params() 133 cp = net_buf_add(buf, sizeof(*cp)); in hci_df_set_cl_cte_tx_params() 134 cp->handle = adv->handle; in hci_df_set_cl_cte_tx_params() 135 cp->cte_len = params->cte_len; in hci_df_set_cl_cte_tx_params() 136 cp->cte_type = get_hci_cte_type(params->cte_type); in hci_df_set_cl_cte_tx_params() 137 cp->cte_count = params->cte_count; in hci_df_set_cl_cte_tx_params() 143 cp->switch_pattern_len = params->num_ant_ids; in hci_df_set_cl_cte_tx_params() 145 cp->switch_pattern_len = 0; in hci_df_set_cl_cte_tx_params() 210 struct bt_hci_cp_le_set_cl_cte_tx_enable *cp; in hci_df_set_adv_cte_tx_enable() local [all …]
|
D | ecc.c | 139 struct bt_hci_cp_le_generate_dhkey *cp; in hci_generate_dhkey_v1() local 142 buf = bt_hci_cmd_create(BT_HCI_OP_LE_GENERATE_DHKEY, sizeof(*cp)); in hci_generate_dhkey_v1() 147 cp = net_buf_add(buf, sizeof(*cp)); in hci_generate_dhkey_v1() 148 memcpy(cp->key, remote_pk, sizeof(cp->key)); in hci_generate_dhkey_v1() 155 struct bt_hci_cp_le_generate_dhkey_v2 *cp; in hci_generate_dhkey_v2() local 158 buf = bt_hci_cmd_create(BT_HCI_OP_LE_GENERATE_DHKEY_V2, sizeof(*cp)); in hci_generate_dhkey_v2() 163 cp = net_buf_add(buf, sizeof(*cp)); in hci_generate_dhkey_v2() 164 memcpy(cp->key, remote_pk, sizeof(cp->key)); in hci_generate_dhkey_v2() 165 cp->key_type = key_type; in hci_generate_dhkey_v2()
|
/Zephyr-Core-3.5.0/tests/bluetooth/df/connectionless_cte_tx/src/ |
D | common.c | 57 struct bt_hci_cp_le_set_cl_cte_tx_params *cp; in common_set_cl_cte_tx_params() local 63 sizeof(*cp) + ARRAY_SIZE(ant_ids)); in common_set_cl_cte_tx_params() 66 cp = net_buf_add(buf, sizeof(*cp)); in common_set_cl_cte_tx_params() 67 cp->handle = g_adv->handle; in common_set_cl_cte_tx_params() 68 cp->cte_len = g_cte_len; in common_set_cl_cte_tx_params() 69 cp->cte_type = BT_HCI_LE_AOD_CTE_2US; in common_set_cl_cte_tx_params() 70 cp->cte_count = 5; in common_set_cl_cte_tx_params() 75 cp->switch_pattern_len = ARRAY_SIZE(ant_ids); in common_set_cl_cte_tx_params()
|
/Zephyr-Core-3.5.0/tests/bluetooth/hci_codecs_info/src/ |
D | main.c | 178 struct bt_hci_cp_read_codec_capabilities *cp; in ZTEST() local 189 buf = bt_hci_cmd_create(BT_HCI_OP_READ_CODEC_CAPABILITIES, sizeof(*cp)); in ZTEST() 190 cp = net_buf_add(buf, sizeof(*cp)); in ZTEST() 192 cp->codec_id.coding_format = READ_CAPABS_CODING_FMT; in ZTEST() 193 cp->codec_id.company_id = sys_cpu_to_le16(READ_CAPABS_COMPANY_ID); in ZTEST() 194 cp->codec_id.vs_codec_id = sys_cpu_to_le16(READ_CAPABS_VS_CODEC_ID); in ZTEST() 195 cp->transport = READ_CAPABS_TRANSPORT; in ZTEST() 196 cp->direction = READ_CAPABS_DIRECTION; in ZTEST() 260 struct bt_hci_cp_read_ctlr_delay *cp; in ZTEST() local 270 buf = bt_hci_cmd_create(BT_HCI_OP_READ_CTLR_DELAY, sizeof(*cp)); in ZTEST() [all …]
|
/Zephyr-Core-3.5.0/samples/bluetooth/hci_pwr_ctrl/src/ |
D | main.c | 48 struct bt_hci_cp_read_rssi *cp; in read_conn_rssi() local 53 buf = bt_hci_cmd_create(BT_HCI_OP_READ_RSSI, sizeof(*cp)); in read_conn_rssi() 59 cp = net_buf_add(buf, sizeof(*cp)); in read_conn_rssi() 60 cp->handle = sys_cpu_to_le16(handle); in read_conn_rssi() 79 struct bt_hci_cp_vs_write_tx_power_level *cp; in set_tx_power() local 85 sizeof(*cp)); in set_tx_power() 91 cp = net_buf_add(buf, sizeof(*cp)); in set_tx_power() 92 cp->handle = sys_cpu_to_le16(handle); in set_tx_power() 93 cp->handle_type = handle_type; in set_tx_power() 94 cp->tx_power_level = tx_pwr_lvl; in set_tx_power() [all …]
|
/Zephyr-Core-3.5.0/tests/bluetooth/host/ecc/bt_dh_key_gen/src/ |
D | main.c | 56 struct bt_hci_cp_le_generate_dhkey cp = {0}; in ZTEST() local 65 net_buf_simple_add_fake.return_val = &cp; in ZTEST() 71 expect_single_call_net_buf_simple_add(&net_buff.b, sizeof(cp)); in ZTEST() 72 expect_single_call_bt_hci_cmd_create(BT_HCI_OP_LE_GENERATE_DHKEY, sizeof(cp)); in ZTEST() 93 struct bt_hci_cp_le_generate_dhkey_v2 cp = {0}; in ZTEST() local 105 net_buf_simple_add_fake.return_val = &cp; in ZTEST() 111 expect_single_call_net_buf_simple_add(&net_buff.b, sizeof(cp)); in ZTEST() 112 expect_single_call_bt_hci_cmd_create(BT_HCI_OP_LE_GENERATE_DHKEY_V2, sizeof(cp)); in ZTEST()
|
/Zephyr-Core-3.5.0/subsys/bluetooth/audio/ |
D | aics.c | 243 const struct bt_aics_gain_control *cp = buf; in write_aics_control() local 255 if (!VALID_AICS_OPCODE(cp->cp.opcode)) { in write_aics_control() 256 LOG_DBG("Invalid opcode %u", cp->cp.opcode); in write_aics_control() 261 (len == AICS_CP_SET_GAIN_LEN && cp->cp.opcode != BT_AICS_OPCODE_SET_GAIN) || in write_aics_control() 266 LOG_DBG("Opcode %u, counter %u", cp->cp.opcode, cp->cp.counter); in write_aics_control() 267 if (cp->cp.counter != inst->srv.state.change_counter) { in write_aics_control() 271 switch (cp->cp.opcode) { in write_aics_control() 273 LOG_DBG("Set gain %d", cp->gain_setting); in write_aics_control() 274 if (cp->gain_setting < inst->srv.gain_settings.minimum || in write_aics_control() 275 cp->gain_setting > inst->srv.gain_settings.maximum) { in write_aics_control() [all …]
|
D | bap_broadcast_assistant.c | 633 struct bt_bap_bass_cp_scan_start *cp; in bt_bap_broadcast_assistant_scan_start() local 670 cp = net_buf_simple_add(&cp_buf, sizeof(*cp)); in bt_bap_broadcast_assistant_scan_start() 672 cp->opcode = BT_BAP_BASS_OP_SCAN_START; in bt_bap_broadcast_assistant_scan_start() 679 struct bt_bap_bass_cp_scan_stop *cp; in bt_bap_broadcast_assistant_scan_stop() local 709 cp = net_buf_simple_add(&cp_buf, sizeof(*cp)); in bt_bap_broadcast_assistant_scan_stop() 711 cp->opcode = BT_BAP_BASS_OP_SCAN_STOP; in bt_bap_broadcast_assistant_scan_stop() 719 struct bt_bap_bass_cp_add_src *cp; in bt_bap_broadcast_assistant_add_src() local 737 cp = net_buf_simple_add(&cp_buf, sizeof(*cp)); in bt_bap_broadcast_assistant_add_src() 739 cp->opcode = BT_BAP_BASS_OP_ADD_SRC; in bt_bap_broadcast_assistant_add_src() 740 cp->adv_sid = param->adv_sid; in bt_bap_broadcast_assistant_add_src() [all …]
|
D | vcp_vol_rend.c | 158 if (!VALID_VCP_OPCODE(cp_val->cp.opcode)) { in write_vcs_control() 159 LOG_DBG("Invalid opcode %u", cp_val->cp.opcode); in write_vcs_control() 165 cp_val->cp.opcode != BT_VCP_OPCODE_SET_ABS_VOL) || in write_vcs_control() 170 opcode = cp_val->cp.opcode; in write_vcs_control() 172 LOG_DBG("Opcode %u, counter %u", opcode, cp_val->cp.counter); in write_vcs_control() 174 if (cp_val->cp.counter != vol_rend.state.change_counter) { in write_vcs_control() 529 const struct vcs_control cp = { in bt_vcp_vol_rend_vol_down() local 535 err = write_vcs_control(NULL, NULL, &cp, sizeof(cp), 0, 0); in bt_vcp_vol_rend_vol_down() 542 const struct vcs_control cp = { in bt_vcp_vol_rend_vol_up() local 548 err = write_vcs_control(NULL, NULL, &cp, sizeof(cp), 0, 0); in bt_vcp_vol_rend_vol_up() [all …]
|
/Zephyr-Core-3.5.0/tests/bluetooth/df/connection_cte_req/src/ |
D | test_cte_req_enable.c | 63 struct bt_hci_cp_le_conn_cte_req_enable *cp; in send_conn_cte_req_enable() local 66 buf = bt_hci_cmd_create(BT_HCI_OP_LE_CONN_CTE_REQ_ENABLE, sizeof(*cp)); in send_conn_cte_req_enable() 71 cp = net_buf_add(buf, sizeof(*cp)); in send_conn_cte_req_enable() 72 (void)memset(cp, 0, sizeof(*cp)); in send_conn_cte_req_enable() 73 cp->handle = sys_cpu_to_le16(conn_handle); in send_conn_cte_req_enable() 74 cp->enable = enable ? 1 : 0; in send_conn_cte_req_enable() 76 cp->cte_request_interval = data->cte_request_interval; in send_conn_cte_req_enable() 77 cp->requested_cte_length = data->requested_cte_length; in send_conn_cte_req_enable() 78 cp->requested_cte_type = data->requested_cte_type; in send_conn_cte_req_enable()
|
/Zephyr-Core-3.5.0/scripts/west_commands/zspdx/ |
D | getincludes.py | 32 cp = run(cmd, stdout=PIPE, stderr=PIPE, universal_newlines=True) 33 if cp.returncode != 0: 34 log.dbg(f" - calling {compilerPath} failed with error code {cp.returncode}") 37 # response will be in cp.stderr, not cp.stdout 38 return extractIncludes(cp.stderr)
|