/Zephyr-Core-3.6.0/subsys/bluetooth/mesh/ |
D | blob_srv.c | 23 #define SERVER_TIMEOUT_SECS(srv) (10 * (1 + (srv)->state.timeout_base)) argument 45 static void cancel(struct bt_mesh_blob_srv *srv); 46 static void suspend(struct bt_mesh_blob_srv *srv); 48 static inline uint32_t block_count_get(const struct bt_mesh_blob_srv *srv) in block_count_get() argument 50 return DIV_ROUND_UP(srv->state.xfer.size, in block_count_get() 51 (1U << srv->state.xfer.block_size_log)); in block_count_get() 54 static inline uint32_t max_chunk_size(const struct bt_mesh_blob_srv *srv) in max_chunk_size() argument 56 return MIN((srv->state.mtu_size - 2 - in max_chunk_size() 61 static inline uint32_t max_chunk_count(const struct bt_mesh_blob_srv *srv) in max_chunk_count() argument 63 return MIN(8 * (srv->state.mtu_size - 6), in max_chunk_count() [all …]
|
D | dfu_srv.c | 28 static void store_state(struct bt_mesh_dfu_srv *srv) in store_state() argument 30 bt_mesh_model_data_store(srv->mod, false, NULL, &srv->update, in store_state() 31 sizeof(srv->update)); in store_state() 34 static void erase_state(struct bt_mesh_dfu_srv *srv) in erase_state() argument 36 bt_mesh_model_data_store(srv->mod, false, NULL, NULL, 0); in erase_state() 39 static void xfer_failed(struct bt_mesh_dfu_srv *srv) in xfer_failed() argument 41 if (!bt_mesh_dfu_srv_is_busy(srv) || in xfer_failed() 42 srv->update.idx >= srv->img_count) { in xfer_failed() 46 erase_state(srv); in xfer_failed() 48 if (srv->cb->end) { in xfer_failed() [all …]
|
D | dfd_srv.c | 58 static void dfd_phase_set(struct bt_mesh_dfd_srv *srv, in dfd_phase_set() argument 61 srv->phase = new_phase; in dfd_phase_set() 63 if (srv->cb && srv->cb->phase) { in dfd_phase_set() 64 srv->cb->phase(srv, srv->phase); in dfd_phase_set() 68 static struct bt_mesh_dfu_target *target_get(struct bt_mesh_dfd_srv *srv, in target_get() argument 71 for (int i = 0; i < srv->target_cnt; ++i) { in target_get() 72 if (addr == srv->targets[i].blob.addr) { in target_get() 73 return &srv->targets[i]; in target_get() 80 static bool is_busy(const struct bt_mesh_dfd_srv *srv) in is_busy() argument 82 return srv->phase == BT_MESH_DFD_PHASE_TRANSFER_ACTIVE || in is_busy() [all …]
|
D | rpr_srv.c | 89 } srv = { variable 97 return srv.refresh.procedure; in bt_mesh_node_refresh_get() 104 for (i = 0; i < srv.scan.max_devs; ++i) { in unprov_get() 106 if ((srv.scan.devs[i].flags & BT_MESH_RPR_UNPROV_ACTIVE) && in unprov_get() 107 !memcmp(srv.scan.devs[i].uuid, uuid, 16)) { in unprov_get() 108 return &srv.scan.devs[i]; in unprov_get() 110 } else if (!(srv.scan.devs[i].flags & BT_MESH_RPR_UNPROV_ACTIVE)) { in unprov_get() 111 return &srv.scan.devs[i]; in unprov_get() 134 srv.scan.cli.addr = BT_MESH_ADDR_UNASSIGNED; in cli_scan_clear() 135 srv.scan.cli.net_idx = BT_MESH_KEY_UNUSED; in cli_scan_clear() [all …]
|
D | op_agg_srv.c | 34 } srv = {.ctx.sdu = &sdu}; variable 49 bt_mesh_model_msg_init(srv.ctx.sdu, OP_OPCODES_AGGREGATOR_STATUS); in handle_sequence() 50 status = net_buf_simple_add_u8(srv.ctx.sdu, 0); in handle_sequence() 51 net_buf_simple_add_le16(srv.ctx.sdu, elem); in handle_sequence() 53 srv.ctx.net_idx = ctx->net_idx; in handle_sequence() 54 srv.ctx.app_idx = ctx->app_idx; in handle_sequence() 55 srv.ctx.addr = ctx->addr; in handle_sequence() 56 srv.ctx.initialized = true; in handle_sequence() 82 srv.ack = false; in handle_sequence() 83 srv.rsp_err = 0; in handle_sequence() [all …]
|
D | health_srv.c | 37 struct bt_mesh_health_srv *srv = mod->rt->user_data; in health_get_registered() local 47 if (srv->cb && srv->cb->fault_get_reg) { in health_get_registered() 51 err = srv->cb->fault_get_reg(mod, company_id, test_id, in health_get_registered() 69 struct bt_mesh_health_srv *srv = mod->rt->user_data; in health_get_current() local 81 if (srv->cb && srv->cb->fault_get_cur) { in health_get_current() 85 err = srv->cb->fault_get_cur(mod, test_id, &company_id, in health_get_current() 131 struct bt_mesh_health_srv *srv = model->rt->user_data; in health_fault_clear_unrel() local 138 if (srv->cb && srv->cb->fault_clear) { in health_fault_clear_unrel() 139 return srv->cb->fault_clear(model, company_id); in health_fault_clear_unrel() 150 struct bt_mesh_health_srv *srv = model->rt->user_data; in health_fault_clear() local [all …]
|
D | proxy_cli.c | 126 struct bt_mesh_proxy_server *srv = user_data; in proxy_connected() local 128 srv->role = bt_mesh_proxy_role_setup(conn, bt_mesh_gatt_send, in proxy_connected() 134 struct bt_mesh_proxy_server *srv = find_proxy_srv_by_conn(conn); in proxy_link_open() local 136 srv->link_opened = true; in proxy_link_open() 141 struct bt_mesh_proxy_server *srv = find_proxy_srv_by_conn(conn); in proxy_disconnected() local 143 bt_mesh_proxy_role_cleanup(srv->role); in proxy_disconnected() 145 srv->role = NULL; in proxy_disconnected() 146 srv->link_opened = false; in proxy_disconnected() 163 struct bt_mesh_proxy_server *srv; in proxy_srv_check_and_get() local 165 srv = find_proxy_srv(sub->net_idx, true, true); in proxy_srv_check_and_get() [all …]
|
D | rpr_cli.c | 51 struct bt_mesh_rpr_node *srv, in link_report() argument 54 struct pb_remote_ctx ctx = { cli, srv }; in link_report() 96 struct bt_mesh_rpr_node srv = RPR_NODE(ctx); in handle_extended_scan_report() local 112 LOG_DBG("0x%04x: %s oob: 0x%04x adv data: %s", srv.addr, in handle_extended_scan_report() 116 LOG_DBG("0x%04x: %s not found.", srv.addr, bt_hex(dev.uuid, 16)); in handle_extended_scan_report() 120 cli->scan_report(cli, &srv, &dev, buf); in handle_extended_scan_report() 129 struct bt_mesh_rpr_node srv = RPR_NODE(ctx); in handle_link_report() local 143 if (cli->link.srv.addr != srv.addr) { in handle_link_report() 144 LOG_DBG("Link report from unknown server 0x%04x", srv.addr); in handle_link_report() 152 LOG_DBG("0x%04x: status: %u state: %u reason: %u", srv.addr, link.status, link.state, in handle_link_report() [all …]
|
D | dfd_srv_internal.h | 23 enum bt_mesh_dfd_status bt_mesh_dfd_srv_receiver_add(struct bt_mesh_dfd_srv *srv, uint16_t addr, 26 enum bt_mesh_dfd_status bt_mesh_dfd_srv_receivers_delete_all(struct bt_mesh_dfd_srv *srv); 28 enum bt_mesh_dfd_status bt_mesh_dfd_srv_start(struct bt_mesh_dfd_srv *srv, 31 enum bt_mesh_dfd_status bt_mesh_dfd_srv_suspend(struct bt_mesh_dfd_srv *srv); 33 enum bt_mesh_dfd_status bt_mesh_dfd_srv_cancel(struct bt_mesh_dfd_srv *srv, 36 enum bt_mesh_dfd_status bt_mesh_dfd_srv_apply(struct bt_mesh_dfd_srv *srv); 38 enum bt_mesh_dfd_status bt_mesh_dfd_srv_fw_delete(struct bt_mesh_dfd_srv *srv, size_t *fwid_len, 41 enum bt_mesh_dfd_status bt_mesh_dfd_srv_fw_delete_all(struct bt_mesh_dfd_srv *srv);
|
D | pb_gatt_cli.c | 37 struct bt_mesh_proxy_role *srv; member 55 server.srv = bt_mesh_proxy_role_setup(conn, bt_mesh_gatt_send, in pb_gatt_connected() 72 bt_mesh_proxy_role_cleanup(server.srv); in pb_gatt_disconnected() 74 server.srv = NULL; in pb_gatt_disconnected() 90 if (server.srv) { in bt_mesh_pb_gatt_cli_setup() 105 if (server.srv) { in bt_mesh_pb_gatt_cli_adv_recv()
|
/Zephyr-Core-3.6.0/subsys/bluetooth/audio/ |
D | aics.c | 117 LOG_DBG("gain %d, mute %u, gain_mode %u, counter %u", inst->srv.state.gain, in read_aics_state() 118 inst->srv.state.mute, inst->srv.state.gain_mode, inst->srv.state.change_counter); in read_aics_state() 120 return bt_gatt_attr_read(conn, attr, buf, len, offset, &inst->srv.state, in read_aics_state() 121 sizeof(inst->srv.state)); in read_aics_state() 130 LOG_DBG("units %u, min %d, max %d", inst->srv.gain_settings.units, in read_aics_gain_settings() 131 inst->srv.gain_settings.minimum, inst->srv.gain_settings.maximum); in read_aics_gain_settings() 134 &inst->srv.gain_settings, in read_aics_gain_settings() 135 sizeof(inst->srv.gain_settings)); in read_aics_gain_settings() 143 LOG_DBG("%u", inst->srv.type); in read_type() 145 return bt_gatt_attr_read(conn, attr, buf, len, offset, &inst->srv.type, in read_type() [all …]
|
D | vocs.c | 472 struct bt_vocs_server *srv = CONTAINER_OF(inst, struct bt_vocs_server, vocs); in bt_vocs_state_get() local 474 if (srv->cb && srv->cb->state) { in bt_vocs_state_get() 475 srv->cb->state(inst, 0, srv->state.offset); in bt_vocs_state_get() 495 struct bt_vocs_server *srv = CONTAINER_OF(inst, struct bt_vocs_server, vocs); in bt_vocs_location_get() local 497 if (srv->cb && srv->cb->location) { in bt_vocs_location_get() 498 srv->cb->location(inst, 0, srv->location); in bt_vocs_location_get() 518 struct bt_vocs_server *srv = CONTAINER_OF(inst, struct bt_vocs_server, vocs); in bt_vocs_location_set() local 520 return vocs_write(srv, write_location, &location, sizeof(location)); in bt_vocs_location_set() 538 struct bt_vocs_server *srv = CONTAINER_OF(inst, struct bt_vocs_server, vocs); in bt_vocs_state_set() local 542 cp.counter = srv->state.change_counter; in bt_vocs_state_set() [all …]
|
/Zephyr-Core-3.6.0/include/zephyr/bluetooth/mesh/ |
D | dfu_srv.h | 80 int (*check)(struct bt_mesh_dfu_srv *srv, 113 int (*start)(struct bt_mesh_dfu_srv *srv, 133 void (*end)(struct bt_mesh_dfu_srv *srv, 152 int (*recover)(struct bt_mesh_dfu_srv *srv, 168 int (*apply)(struct bt_mesh_dfu_srv *srv, 210 void bt_mesh_dfu_srv_verified(struct bt_mesh_dfu_srv *srv); 222 void bt_mesh_dfu_srv_rejected(struct bt_mesh_dfu_srv *srv); 228 void bt_mesh_dfu_srv_cancel(struct bt_mesh_dfu_srv *srv); 236 void bt_mesh_dfu_srv_applied(struct bt_mesh_dfu_srv *srv); 244 bool bt_mesh_dfu_srv_is_busy(const struct bt_mesh_dfu_srv *srv); [all …]
|
D | blob_srv.h | 65 int (*start)(struct bt_mesh_blob_srv *srv, struct bt_mesh_msg_ctx *ctx, 80 void (*end)(struct bt_mesh_blob_srv *srv, uint64_t id, bool success); 99 void (*suspended)(struct bt_mesh_blob_srv *srv); 107 void (*resume)(struct bt_mesh_blob_srv *srv); 125 int (*recover)(struct bt_mesh_blob_srv *srv, 176 int bt_mesh_blob_srv_recv(struct bt_mesh_blob_srv *srv, uint64_t id, 190 int bt_mesh_blob_srv_cancel(struct bt_mesh_blob_srv *srv); 199 bool bt_mesh_blob_srv_is_busy(const struct bt_mesh_blob_srv *srv); 207 uint8_t bt_mesh_blob_srv_progress(const struct bt_mesh_blob_srv *srv);
|
D | rpr_cli.h | 76 const struct bt_mesh_rpr_node *srv, 87 struct bt_mesh_rpr_node srv; member 106 const struct bt_mesh_rpr_node *srv, 118 const struct bt_mesh_rpr_node *srv, 145 const struct bt_mesh_rpr_node *srv, 189 const struct bt_mesh_rpr_node *srv, 202 const struct bt_mesh_rpr_node *srv, 214 const struct bt_mesh_rpr_node *srv, 226 const struct bt_mesh_rpr_node *srv,
|
D | dfd_srv.h | 110 int (*recv)(struct bt_mesh_dfd_srv *srv, 140 int (*start_oob_upload)(struct bt_mesh_dfd_srv *srv, 154 void (*cancel_oob_upload)(struct bt_mesh_dfd_srv *srv, 168 uint8_t (*oob_progress_get)(struct bt_mesh_dfd_srv *srv, 181 void (*del)(struct bt_mesh_dfd_srv *srv, 196 int (*send)(struct bt_mesh_dfd_srv *srv, 207 void (*phase)(struct bt_mesh_dfd_srv *srv, enum bt_mesh_dfd_phase phase); 276 int bt_mesh_dfd_srv_oob_check_complete(struct bt_mesh_dfd_srv *srv, 295 int bt_mesh_dfd_srv_oob_store_complete(struct bt_mesh_dfd_srv *srv,
|
D | health_srv.h | 178 #define BT_MESH_MODEL_HEALTH_SRV(srv, pub) \ argument 180 pub, srv, &bt_mesh_health_srv_cb, &(srv)->metadata) 182 #define BT_MESH_MODEL_HEALTH_SRV(srv, pub) \ argument 184 pub, srv, &bt_mesh_health_srv_cb)
|
/Zephyr-Core-3.6.0/subsys/bluetooth/mesh/shell/ |
D | rpr.c | 23 const struct bt_mesh_rpr_node *srv, in rpr_scan_report() argument 35 srv->addr, uuid_hex_str, unprov->oob); in rpr_scan_report() 88 const struct bt_mesh_rpr_node srv = { in cmd_scan() local 112 &srv, argc > 2 ? uuid : NULL, timeout, in cmd_scan() 130 const struct bt_mesh_rpr_node srv = { in cmd_scan_ext() local 157 &srv, uuid, timeout, ad_types, in cmd_scan_ext() 171 const struct bt_mesh_rpr_node srv = { in cmd_scan_srv() local 193 &srv, NULL, 0, ad_types, (argc - 1)); in cmd_scan_srv() 205 const struct bt_mesh_rpr_node srv = { in cmd_scan_caps() local 216 err = bt_mesh_rpr_scan_caps_get((struct bt_mesh_rpr_cli *)mod->rt->user_data, &srv, &caps); in cmd_scan_caps() [all …]
|
D | dfd.c | 19 static void print_receivers_status(const struct shell *sh, struct bt_mesh_dfd_srv *srv, in print_receivers_status() argument 22 shell_print(sh, "{\"status\": %d, \"target_cnt\": %d}", status, srv->target_cnt); in print_receivers_status() 25 static void print_dfd_status(const struct shell *sh, struct bt_mesh_dfd_srv *srv, in print_dfd_status() argument 29 srv->phase); in print_dfd_status() 31 if (srv->phase != BT_MESH_DFD_PHASE_IDLE && srv->dfu.xfer.slot) { in print_dfd_status() 34 "\"apply\": %d, \"slot_idx\": %d", srv->inputs.group, in print_dfd_status() 35 srv->inputs.app_idx, srv->inputs.ttl, srv->inputs.timeout_base, in print_dfd_status() 36 srv->dfu.xfer.blob.mode, srv->apply, srv->slot_idx); in print_dfd_status()
|
/Zephyr-Core-3.6.0/tests/lib/onoff/src/ |
D | main.c | 60 static void callback(struct onoff_manager *srv, in callback() argument 67 callback_srv = srv; in callback() 74 cb(srv, cli, state, res); in callback() 114 struct onoff_manager *srv; member 122 tsp->srv = NULL; in reset_transit_state() 125 static void run_transit(struct onoff_manager *srv, in run_transit() argument 132 tsp->srv = srv; in run_transit() 135 notify(srv, tsp->retval); in run_transit() 142 tsp->notify(tsp->srv, tsp->retval); in notify() 144 tsp->srv = NULL; in notify() [all …]
|
/Zephyr-Core-3.6.0/tests/bsim/bluetooth/mesh/src/ |
D | test_provision.c | 107 static void rpr_scan_report(struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, 851 static int provision_remote(struct bt_mesh_rpr_node *srv, uint8_t dev_idx, uint16_t *addr) in provision_remote() argument 862 ASSERT_OK(bt_mesh_rpr_scan_start(&rpr_cli, srv, NULL, 5, 1, &scan_status)); in provision_remote() 874 static void rpr_scan_report(struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, in rpr_scan_report() argument 882 ASSERT_OK(bt_mesh_provision_remote(cli, srv, unprov->uuid, 0, prov_addr)); in rpr_scan_report() 950 struct bt_mesh_rpr_node srv = { in test_provisioner_pb_remote_client_reprovision() local 957 ASSERT_OK(provision_remote(&srv, 2, &srv.addr)); in test_provisioner_pb_remote_client_reprovision() 966 const struct bt_mesh_rpr_node *srv, in rpr_scan_report_parallel() argument 997 struct bt_mesh_rpr_node srv = { in test_provisioner_pb_remote_client_parallel() local 1008 ASSERT_OK(bt_mesh_provision_remote(&rpr_cli, &srv, uuid, 0, prov_addr)); in test_provisioner_pb_remote_client_parallel() [all …]
|
/Zephyr-Core-3.6.0/boards/x86/common/ |
D | net_boot.rst | 28 tftp-root=/srv/tftp 34 :file:`/srv/tftp` folder. 38 $ cp zephyr/zephyr.efi /srv/tftp 45 $ tree /srv/tftp 46 /srv/tftp 89 dnsmasq-tftp[5386]: sent /srv/tftp/zephyr.efi to 10.1.1.28
|
/Zephyr-Core-3.6.0/lib/utils/ |
D | onoff.c | 607 int onoff_sync_lock(struct onoff_sync_service *srv, in onoff_sync_lock() argument 610 *keyp = k_spin_lock(&srv->lock); in onoff_sync_lock() 611 return srv->count; in onoff_sync_lock() 614 int onoff_sync_finalize(struct onoff_sync_service *srv, in onoff_sync_finalize() argument 626 if (srv->count < 0) { in onoff_sync_finalize() 627 srv->count = 0; in onoff_sync_finalize() 630 srv->count = res; in onoff_sync_finalize() 633 srv->count += 1; in onoff_sync_finalize() 635 srv->count -= 1; in onoff_sync_finalize() 642 int rv = srv->count; in onoff_sync_finalize() [all …]
|
/Zephyr-Core-3.6.0/drivers/usb/device/ |
D | usb_dc_native_posix_adapt.c | 258 struct sockaddr_in srv; in usbip_start() local 287 memset(&srv, 0, sizeof(srv)); in usbip_start() 288 srv.sin_family = AF_INET; in usbip_start() 289 srv.sin_addr.s_addr = htonl(INADDR_ANY); in usbip_start() 290 srv.sin_port = htons(USBIP_PORT); in usbip_start() 292 if (bind(listenfd, (struct sockaddr *)&srv, sizeof(srv)) < 0) { in usbip_start()
|
/Zephyr-Core-3.6.0/doc/connectivity/bluetooth/api/mesh/ |
D | rpr_cli.rst | 32 const struct bt_mesh_rpr_node *srv, 43 const struct bt_mesh_rpr_node srv = { 54 bt_mesh_rpr_scan_start(&rpr_cli, &srv, uuid, timeout, max_devs, &status); 79 const struct bt_mesh_rpr_node srv = { 89 bt_mesh_provision_remote(&rpr_cli, &srv, uuid, net_idx, addr); 118 struct bt_mesh_rpr_node srv = { 127 bt_mesh_reprovision_remote(&rpr_cli, &srv, new_addr, composition_changed);
|