/Zephyr-latest/subsys/bluetooth/mesh/ |
D | blob_cli.c | 18 #define TARGETS_FOR_EACH(cli, target) \ argument 19 SYS_SLIST_FOR_EACH_CONTAINER((sys_slist_t *)&(cli)->inputs->targets, \ 25 #define CLIENT_TIMEOUT_MSEC(cli) (10 * MSEC_PER_SEC * (cli->inputs->timeout_base + 2) + \ argument 26 100 * cli->inputs->ttl) 30 #define SENDING_CHUNKS_IN_PULL_MODE(cli) ((cli)->state == BT_MESH_BLOB_CLI_STATE_BLOCK_SEND && \ argument 31 (cli)->xfer->mode == BT_MESH_BLOB_XFER_MODE_PULL) 32 #define UNICAST_MODE(cli) ((cli)->inputs->group == BT_MESH_ADDR_UNASSIGNED || \ argument 33 (cli)->tx.ctx.force_unicast) 56 static struct bt_mesh_blob_target *next_target(struct bt_mesh_blob_cli *cli, 58 static void transfer_cancel(struct bt_mesh_blob_cli *cli); [all …]
|
D | dfu_cli.c | 20 #define TARGETS_FOR_EACH(cli, target) \ argument 22 (sys_slist_t *)&((cli)->blob.inputs)->targets, target, blob.n) 24 #define MSG_CTX(cli, dst) \ argument 26 .app_idx = (cli)->blob.inputs->app_idx, .addr = dst, \ 27 .send_ttl = (cli)->blob.inputs->ttl, \ 71 static struct bt_mesh_dfu_target *target_get(struct bt_mesh_dfu_cli *cli, in target_get() argument 76 TARGETS_FOR_EACH(cli, target) { in target_get() 85 static void target_failed(struct bt_mesh_dfu_cli *cli, in target_failed() argument 100 if (cli->cb && cli->cb->lost_target) { in target_failed() 101 cli->cb->lost_target(cli, target); in target_failed() [all …]
|
D | rpr_cli.c | 38 struct bt_mesh_rpr_cli *cli; member 46 static void link_reset(struct bt_mesh_rpr_cli *cli); 47 static void link_closed(struct bt_mesh_rpr_cli *cli, 50 static void link_report(struct bt_mesh_rpr_cli *cli, in link_report() argument 54 struct pb_remote_ctx ctx = { cli, srv }; in link_report() 65 cli->link.time = PROTOCOL_TIMEOUT_SEC; in link_report() 81 static void tx_complete(struct bt_mesh_rpr_cli *cli, int err, void *cb_data) in tx_complete() argument 85 cli->link.tx_pdu++; in tx_complete() 86 bt_mesh_msg_ack_ctx_clear(&cli->prov_ack_ctx); in tx_complete() 97 struct bt_mesh_rpr_cli *cli = mod->rt->user_data; in handle_extended_scan_report() local [all …]
|
D | op_agg_cli.c | 38 } cli = {.srcs = &srcs, .ctx.sdu = &sdu}; variable 55 if (!bt_mesh_msg_ack_ctx_match(&cli.ack_ctx, in handle_status() 69 cli.ctx.initialized = true; in handle_status() 73 if (cli.srcs->len < 2) { in handle_status() 75 cli.ctx.initialized = true; in handle_status() 79 addr = net_buf_simple_pull_le16(cli.srcs); in handle_status() 90 cli.ctx.initialized = true; in handle_status() 95 bt_mesh_msg_ack_ctx_rx(&cli.ack_ctx); in handle_status() 118 cli.model = model; in op_agg_cli_init() 119 bt_mesh_msg_ack_ctx_init(&cli.ack_ctx); in op_agg_cli_init() [all …]
|
D | health_cli.c | 43 struct bt_mesh_health_cli *cli = model->rt->user_data; in health_fault_status() local 54 if (bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, in health_fault_status() 80 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in health_fault_status() 84 if (cli->fault_status) { in health_fault_status() 85 cli->fault_status(cli, ctx->addr, test_id, cid, in health_fault_status() 96 struct bt_mesh_health_cli *cli = model->rt->user_data; in health_current_status() local 108 if (cli->current_status) { in health_current_status() 109 cli->current_status(cli, ctx->addr, test_id, cid, in health_current_status() 124 struct bt_mesh_health_cli *cli = model->rt->user_data; in health_period_status() local 133 if (bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, in health_period_status() [all …]
|
D | sar_cfg_cli.c | 22 static struct bt_mesh_sar_cfg_cli *cli; variable 30 if (!bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, OP_SAR_CFG_TX_STATUS, in transmitter_status() 43 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in transmitter_status() 58 if (!bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, OP_SAR_CFG_RX_STATUS, in receiver_status() 69 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in receiver_status() 82 return cli->timeout; in bt_mesh_sar_cfg_cli_timeout_get() 87 cli->timeout = timeout; in bt_mesh_sar_cfg_cli_timeout_set() 102 cli = model->rt->user_data; in bt_mesh_sar_cfg_cli_init() 103 cli->model = model; in bt_mesh_sar_cfg_cli_init() 104 cli->timeout = 2 * MSEC_PER_SEC; in bt_mesh_sar_cfg_cli_init() [all …]
|
D | priv_beacon_cli.c | 17 static struct bt_mesh_priv_beacon_cli *cli; variable 39 if (bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, OP_PRIV_BEACON_STATUS, ctx->addr, in handle_beacon_status() 44 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in handle_beacon_status() 47 if (cli->cb && cli->cb->priv_beacon_status) { in handle_beacon_status() 53 cli->cb->priv_beacon_status(cli, ctx->addr, &state); in handle_beacon_status() 75 if (bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, OP_PRIV_GATT_PROXY_STATUS, ctx->addr, in handle_gatt_proxy_status() 79 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in handle_gatt_proxy_status() 82 if (cli->cb && cli->cb->priv_gatt_proxy_status) { in handle_gatt_proxy_status() 83 cli->cb->priv_gatt_proxy_status(cli, ctx->addr, proxy); in handle_gatt_proxy_status() 108 if (bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, OP_PRIV_NODE_ID_STATUS, ctx->addr, in handle_node_id_status() [all …]
|
D | brg_cfg_cli.c | 18 static struct bt_mesh_brg_cfg_cli *cli; variable 26 if (bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, OP_SUBNET_BRIDGE_STATUS, ctx->addr, in bridge_status() 29 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in bridge_status() 32 if (cli->cb && cli->cb->bridge_status) { in bridge_status() 33 cli->cb->bridge_status(cli, ctx->addr, status); in bridge_status() 59 if (bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, OP_BRIDGING_TABLE_STATUS, ctx->addr, in table_status() 62 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in table_status() 65 if (cli->cb && cli->cb->table_status) { in table_status() 66 cli->cb->table_status(cli, ctx->addr, &table_status); in table_status() 90 if (bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, OP_BRIDGED_SUBNETS_LIST, ctx->addr, in subnets_list() [all …]
|
D | od_priv_proxy_cli.c | 19 static struct bt_mesh_od_priv_proxy_cli *cli; variable 34 if (bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, OP_OD_PRIV_PROXY_STATUS, in handle_proxy_status() 40 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in handle_proxy_status() 44 if (cli->od_status) { in handle_proxy_status() 45 cli->od_status(cli, ctx->addr, state_rsp); in handle_proxy_status() 61 .ack = &cli->ack_ctx, in bt_mesh_od_priv_proxy_cli_get() 70 return bt_mesh_msg_ackd_send(cli->model, &ctx, &msg, val_rsp ? &rsp : NULL); in bt_mesh_od_priv_proxy_cli_get() 77 .ack = &cli->ack_ctx, in bt_mesh_od_priv_proxy_cli_set() 88 return bt_mesh_msg_ackd_send(cli->model, &ctx, &msg, val_rsp ? &rsp : NULL); in bt_mesh_od_priv_proxy_cli_set() 103 cli = mod->rt->user_data; in on_demand_proxy_cli_init() [all …]
|
D | large_comp_data_cli.c | 33 static struct bt_mesh_large_comp_data_cli *cli; variable 38 void (*cb)(struct bt_mesh_large_comp_data_cli *cli, uint16_t addr, in data_status() argument 54 if (bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, op, ctx->addr, (void **)&rsp)) { in data_status() 64 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in data_status() 75 cb(cli, ctx->addr, &status_rsp); in data_status() 85 (cli->cb && cli->cb->large_comp_data_status ? in large_comp_data_status() 86 cli->cb->large_comp_data_status : NULL)); in large_comp_data_status() 93 (cli->cb && cli->cb->models_metadata_status ? in models_metadata_status() 94 cli->cb->models_metadata_status : NULL)); in models_metadata_status() 113 cli = model->rt->user_data; in large_comp_data_cli_init() [all …]
|
D | sol_pdu_rpl_cli.c | 16 static struct bt_mesh_sol_pdu_rpl_cli *cli; variable 60 if (bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, OP_SOL_PDU_RPL_ITEM_STATUS, in handle_status() 70 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in handle_status() 73 if (cli->srpl_status) { in handle_status() 74 cli->srpl_status(cli, ctx->addr, primary, len); in handle_status() 101 .ack = &cli->ack_ctx, in bt_mesh_sol_pdu_rpl_clear() 124 return bt_mesh_msg_ackd_send(cli->model, ctx, &msg, in bt_mesh_sol_pdu_rpl_clear() 148 return bt_mesh_msg_send(cli->model, ctx, &msg); in bt_mesh_sol_pdu_rpl_clear_unack() 172 cli = mod->rt->user_data; in sol_pdu_rpl_cli_init() 173 cli->model = mod; in sol_pdu_rpl_cli_init() [all …]
|
D | cfg_cli.c | 49 static struct bt_mesh_cfg_cli *cli; variable 66 if (bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, OP_DEV_COMP_DATA_STATUS, ctx->addr, in comp_data_status() 77 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in comp_data_status() 81 if (cli->cb && cli->cb->comp_data) { in comp_data_status() 82 cli->cb->comp_data(cli, ctx->addr, page, buf); in comp_data_status() 101 if (bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, expect_status, ctx->addr, in state_status_u8() 108 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in state_status_u8() 122 if (cli->cb && cli->cb->beacon_status) { in beacon_status() 123 cli->cb->beacon_status(cli, ctx->addr, status); in beacon_status() 137 if (cli->cb && cli->cb->ttl_status) { in ttl_status() [all …]
|
/Zephyr-latest/subsys/bluetooth/audio/ |
D | aics_client.c | 45 if (aics_insts[i].cli.conn == conn && in lookup_aics_by_handle() 46 atomic_test_bit(aics_insts[i].cli.flags, BT_AICS_CLIENT_FLAG_ACTIVE) && in lookup_aics_by_handle() 47 aics_insts[i].cli.start_handle <= handle && in lookup_aics_by_handle() 48 aics_insts[i].cli.end_handle >= handle) { in lookup_aics_by_handle() 81 if (handle == inst->cli.state_handle) { in aics_client_notify_handler() 87 inst->cli.change_counter = state->change_counter; in aics_client_notify_handler() 89 if (inst->cli.cb && inst->cli.cb->state) { in aics_client_notify_handler() 90 inst->cli.cb->state(inst, 0, state->gain, in aics_client_notify_handler() 95 } else if (handle == inst->cli.status_handle) { in aics_client_notify_handler() 99 if (inst->cli.cb && inst->cli.cb->status) { in aics_client_notify_handler() [all …]
|
/Zephyr-latest/include/zephyr/bluetooth/mesh/ |
D | health_cli.h | 49 void (*period_status)(struct bt_mesh_health_cli *cli, uint16_t addr, 61 void (*attention_status)(struct bt_mesh_health_cli *cli, uint16_t addr, 79 void (*fault_status)(struct bt_mesh_health_cli *cli, uint16_t addr, 98 void (*current_status)(struct bt_mesh_health_cli *cli, uint16_t addr, 116 int (*update)(struct bt_mesh_health_cli *cli, struct net_buf_simple *pub_buf); 153 int bt_mesh_health_cli_fault_get(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, 179 int bt_mesh_health_cli_fault_clear(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, 194 int bt_mesh_health_cli_fault_clear_unack(struct bt_mesh_health_cli *cli, 216 int bt_mesh_health_cli_fault_test(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, 230 int bt_mesh_health_cli_fault_test_unack(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, [all …]
|
D | blob_cli.h | 202 void (*caps)(struct bt_mesh_blob_cli *cli, 215 void (*lost_target)(struct bt_mesh_blob_cli *cli, 225 void (*suspended)(struct bt_mesh_blob_cli *cli); 237 void (*end)(struct bt_mesh_blob_cli *cli, 249 void (*xfer_progress)(struct bt_mesh_blob_cli *cli, 259 void (*xfer_progress_complete)(struct bt_mesh_blob_cli *cli); 265 void (*send)(struct bt_mesh_blob_cli *cli, uint16_t dst); 267 void (*send_complete)(struct bt_mesh_blob_cli *cli, uint16_t dst); 272 void (*next)(struct bt_mesh_blob_cli *cli); 344 int bt_mesh_blob_cli_caps_get(struct bt_mesh_blob_cli *cli, [all …]
|
D | dfu_cli.h | 126 struct bt_mesh_dfu_cli *cli, struct bt_mesh_msg_ctx *ctx, uint8_t idx, 137 void (*suspended)(struct bt_mesh_dfu_cli *cli); 147 void (*ended)(struct bt_mesh_dfu_cli *cli, 157 void (*applied)(struct bt_mesh_dfu_cli *cli); 166 void (*confirmed)(struct bt_mesh_dfu_cli *cli); 176 void (*lost_target)(struct bt_mesh_dfu_cli *cli, 252 int bt_mesh_dfu_cli_send(struct bt_mesh_dfu_cli *cli, 263 int bt_mesh_dfu_cli_suspend(struct bt_mesh_dfu_cli *cli); 271 int bt_mesh_dfu_cli_resume(struct bt_mesh_dfu_cli *cli); 283 int bt_mesh_dfu_cli_cancel(struct bt_mesh_dfu_cli *cli, [all …]
|
D | rpr_cli.h | 75 void (*scan_report)(struct bt_mesh_rpr_cli *cli, 105 int bt_mesh_rpr_scan_caps_get(struct bt_mesh_rpr_cli *cli, 117 int bt_mesh_rpr_scan_get(struct bt_mesh_rpr_cli *cli, 144 int bt_mesh_rpr_scan_start(struct bt_mesh_rpr_cli *cli, 188 int bt_mesh_rpr_scan_start_ext(struct bt_mesh_rpr_cli *cli, 201 int bt_mesh_rpr_scan_stop(struct bt_mesh_rpr_cli *cli, 213 int bt_mesh_rpr_link_get(struct bt_mesh_rpr_cli *cli, 225 int bt_mesh_rpr_link_close(struct bt_mesh_rpr_cli *cli,
|
/Zephyr-latest/tests/drivers/clock_control/onoff/src/ |
D | test_clock_control_onoff.c | 40 struct onoff_client cli; in ZTEST() local 46 sys_notify_init_spinwait(&cli.notify); in ZTEST() 47 err = onoff_request(mgr, &cli); in ZTEST() 50 while (sys_notify_fetch_result(&cli.notify, &err) < 0) { in ZTEST() 63 struct onoff_client cli; in ZTEST() local 70 sys_notify_init_spinwait(&cli.notify); in ZTEST() 71 err = onoff_request(mgr, &cli); in ZTEST() 75 err = onoff_cancel_or_release(mgr, &cli); in ZTEST() 83 static void request_cb(struct onoff_manager *mgr, struct onoff_client *cli, in request_cb() argument 88 err = onoff_cancel_or_release(mgr, cli); in request_cb() [all …]
|
/Zephyr-latest/tests/boards/nrf/mram_latency/src/ |
D | main.c | 26 struct onoff_client cli; member 32 static void basic_cb(struct onoff_manager *mgr, struct onoff_client *cli, uint32_t state, int res) in basic_cb() argument 34 struct test_req *req = CONTAINER_OF(cli, struct test_req, cli); in basic_cb() 56 sys_notify_init_callback(&req1.cli.notify, basic_cb); in ZTEST() 59 rv = mram_no_latency_request(&req1.cli); in ZTEST() 62 sys_notify_init_callback(&req2.cli.notify, basic_cb); in ZTEST() 65 rv = mram_no_latency_request(&req2.cli); in ZTEST() 79 rv = mram_no_latency_cancel_or_release(&req2.cli); in ZTEST() 84 rv = mram_no_latency_cancel_or_release(&req1.cli); in ZTEST() 87 sys_notify_init_callback(&req1.cli.notify, basic_cb); in ZTEST() [all …]
|
/Zephyr-latest/soc/nordic/common/ |
D | mram_latency.c | 27 struct onoff_client cli; member 90 int mram_no_latency_cancel_or_release(struct onoff_client *cli) in mram_no_latency_cancel_or_release() argument 92 return onoff_cancel_or_release(&mram_latency_mgr, cli); in mram_no_latency_cancel_or_release() 95 int mram_no_latency_request(struct onoff_client *cli) in mram_no_latency_request() argument 97 return onoff_request(&mram_latency_mgr, cli); in mram_no_latency_request() 100 static void sync_req_cb(struct onoff_manager *mgr, struct onoff_client *cli, uint32_t state, in sync_req_cb() argument 103 struct sync_latency_req *req = CONTAINER_OF(cli, struct sync_latency_req, cli); in sync_req_cb() 119 sys_notify_init_callback(&req.cli.notify, sync_req_cb); in mram_no_latency_sync_request() 120 rv = onoff_request(&mram_latency_mgr, &req.cli); in mram_no_latency_sync_request()
|
/Zephyr-latest/samples/boards/nordic/clock_control/src/ |
D | main.c | 29 struct onoff_client *cli, in sample_notify_cb() argument 34 ARG_UNUSED(cli); in sample_notify_cb() 43 struct onoff_client cli; in main() local 61 sys_notify_init_callback(&cli.notify, sample_notify_cb); in main() 68 ret = nrf_clock_control_request(sample_clock_dev, &spec, &cli); in main() 82 ret = sys_notify_fetch_result(&cli.notify, &res); in main()
|
/Zephyr-latest/include/zephyr/sys/ |
D | onoff.h | 253 struct onoff_client *cli, 348 struct onoff_client *cli); 402 struct onoff_client *cli); 436 struct onoff_client *cli) in onoff_cancel_or_release() argument 438 int rv = onoff_cancel(mgr, cli); in onoff_cancel_or_release() 482 struct onoff_client *cli); 637 struct onoff_client *cli,
|
/Zephyr-latest/subsys/bluetooth/controller/ll_sw/nordic/lll/ |
D | lll_clock.c | 22 struct onoff_client cli; member 29 static void clock_ready(struct onoff_manager *mgr, struct onoff_client *cli, in clock_ready() argument 33 CONTAINER_OF(cli, struct lll_clock_state, cli); in clock_ready() 45 sys_notify_init_callback(&state.cli.notify, clock_ready); in blocking_on() 46 err = onoff_request(mgr, &state.cli); in blocking_on()
|
/Zephyr-latest/lib/utils/ |
D | onoff.c | 123 struct onoff_client *cli) in validate_args() argument 125 if ((mgr == NULL) || (cli == NULL)) { in validate_args() 129 int rv = sys_notify_validate(&cli->notify); in validate_args() 132 && ((cli->notify.flags in validate_args() 169 struct onoff_client *cli, in notify_one() argument 174 (onoff_client_callback)sys_notify_finalize(&cli->notify, res); in notify_one() 177 cb(mgr, cli, state, res); in notify_one() 188 struct onoff_client *cli = in notify_all() local 193 notify_one(mgr, cli, state, res); in notify_all() 422 struct onoff_client *cli) in onoff_request() argument [all …]
|
/Zephyr-latest/subsys/bluetooth/mesh/shell/ |
D | health.c | 43 struct bt_mesh_health_cli *cli = mod->rt->user_data; in cmd_fault_get() local 60 err = bt_mesh_health_cli_fault_get(cli, ctx.addr ? &ctx : NULL, cid, &test_id, faults, in cmd_fault_get() 77 struct bt_mesh_health_cli *cli = mod->rt->user_data; in fault_clear() local 94 err = bt_mesh_health_cli_fault_clear(cli, ctx.addr ? &ctx : NULL, cid, &test_id, in fault_clear() 105 err = bt_mesh_health_cli_fault_clear_unack(cli, ctx.addr ? &ctx : NULL, cid); in fault_clear() 129 struct bt_mesh_health_cli *cli = mod->rt->user_data; in fault_test() local 147 err = bt_mesh_health_cli_fault_test(cli, ctx.addr ? &ctx : NULL, cid, test_id, in fault_test() 158 err = bt_mesh_health_cli_fault_test_unack(cli, ctx.addr ? &ctx : NULL, cid, test_id); in fault_test() 182 struct bt_mesh_health_cli *cli = mod->rt->user_data; in cmd_period_get() local 188 err = bt_mesh_health_cli_period_get(cli, ctx.addr ? &ctx : NULL, &divisor); in cmd_period_get() [all …]
|