Home
last modified time | relevance | path

Searched refs:slot (Results 1 – 25 of 227) sorted by relevance

12345678910

/Zephyr-latest/subsys/bluetooth/mesh/
Ddfu_slot.c23 #define HEADER_SIZE offsetof(struct slot, slot.fwid)
31 static struct slot { struct
33 struct bt_mesh_dfu_slot slot; argument
48 static bool slot_eq(const struct bt_mesh_dfu_slot *slot, in slot_eq() argument
51 return (slot->fwid_len == fwid_len) && in slot_eq()
52 !memcmp(fwid, slot->fwid, fwid_len); in slot_eq()
55 static bool is_slot_committed(struct slot *slot_to_check) in is_slot_committed()
57 struct slot *s; in is_slot_committed()
68 static int slot_store(const struct slot *slot_to_store) in slot_store()
81 slot_to_store->slot.fwid, slot_to_store->slot.fwid_len); in slot_store()
[all …]
Ddfu_slot.h17 const struct bt_mesh_dfu_slot *slot, void *user_data);
88 int bt_mesh_dfu_slot_del(const struct bt_mesh_dfu_slot *slot);
114 int bt_mesh_dfu_slot_get(const uint8_t *fwid, size_t fwid_len, struct bt_mesh_dfu_slot **slot);
122 int bt_mesh_dfu_slot_img_idx_get(const struct bt_mesh_dfu_slot *slot);
Ddfd_srv.c93 static int slot_del(struct bt_mesh_dfd_srv *srv, const struct bt_mesh_dfu_slot *slot) in slot_del() argument
96 srv->cb->del(srv, slot); in slot_del()
99 return bt_mesh_dfu_slot_del(slot); in slot_del()
199 static enum bt_mesh_dfu_iter slot_space_cb(const struct bt_mesh_dfu_slot *slot, in slot_space_cb() argument
204 *total += slot->size; in slot_space_cb()
255 if (srv->phase == BT_MESH_DFD_PHASE_IDLE || !srv->dfu.xfer.slot) { in status_rsp()
357 !srv->upload.slot) { in upload_status_rsp_with_progress()
371 net_buf_simple_add_mem(&rsp, srv->upload.slot->fwid, in upload_status_rsp_with_progress()
372 srv->upload.slot->fwid_len); in upload_status_rsp_with_progress()
386 progress = srv->cb->oob_progress_get(srv, srv->upload.slot); in upload_status_rsp()
[all …]
/Zephyr-latest/drivers/interrupt_controller/
Dintc_nxp_pint.c68 uint8_t slot = 0U; in nxp_pint_pin_enable() local
76 slot = pin_pint_id[pin]; in nxp_pint_pin_enable()
78 for (slot = 0; slot < ARRAY_SIZE(pint_irq_cfg); slot++) { in nxp_pint_pin_enable()
79 if (!pint_irq_cfg[slot].used) { in nxp_pint_pin_enable()
83 if (slot == ARRAY_SIZE(pint_irq_cfg)) { in nxp_pint_pin_enable()
87 pin_pint_id[pin] = slot; in nxp_pint_pin_enable()
89 pint_irq_cfg[slot].used = true; in nxp_pint_pin_enable()
90 pint_irq_cfg[slot].pin = pin; in nxp_pint_pin_enable()
92 attach_pin_to_pint(pin, slot); in nxp_pint_pin_enable()
96 PINT_PinInterruptConfig(pint_base, slot, trigger, NULL); in nxp_pint_pin_enable()
[all …]
/Zephyr-latest/subsys/mgmt/mcumgr/grp/img_mgmt/include/mgmt/mcumgr/grp/img_mgmt/
Dimg_mgmt_priv.h28 int img_mgmt_erase_slot(int slot);
41 int img_mgmt_write_pending(int slot, bool permanent);
61 int img_mgmt_read(int slot, unsigned int offset, void *dst, unsigned int num_bytes);
87 int img_mgmt_swap_type(int slot);
96 static inline int img_mgmt_slot_to_image(int slot) in img_mgmt_slot_to_image() argument
98 __ASSERT(slot >= 0 && slot < (CONFIG_MCUMGR_GRP_IMG_UPDATABLE_IMAGE_NUMBER << 1), in img_mgmt_slot_to_image()
101 return (slot >> 1); in img_mgmt_slot_to_image()
111 static inline int img_mgmt_get_opposite_slot(int slot) in img_mgmt_get_opposite_slot() argument
113 __ASSERT(slot >= 0 && slot < (CONFIG_MCUMGR_GRP_IMG_UPDATABLE_IMAGE_NUMBER << 1), in img_mgmt_get_opposite_slot()
116 return (slot ^ 1); in img_mgmt_get_opposite_slot()
[all …]
/Zephyr-latest/subsys/net/lib/tls_credentials/
Dtls_credentials_trusted.c95 static int credentials_toc_update(unsigned int slot, psa_storage_uid_t uid) in credentials_toc_update() argument
99 if (slot >= CRED_MAX_SLOTS) { in credentials_toc_update()
103 credentials_toc[slot] = uid; in credentials_toc_update()
115 unsigned int slot; in tls_credential_toc_find_slot() local
117 for (slot = 0; slot < CRED_MAX_SLOTS; ++slot) { in tls_credential_toc_find_slot()
118 if (credentials_toc[slot] == uid) { in tls_credential_toc_find_slot()
119 return slot; in tls_credential_toc_find_slot()
131 unsigned int slot; in credentials_init() local
144 for (slot = 0; slot < CRED_MAX_SLOTS; ++slot) { in credentials_init()
145 if (credentials_toc[slot] == 0) { in credentials_init()
[all …]
/Zephyr-latest/subsys/mgmt/mcumgr/grp/img_mgmt/src/
Dimg_mgmt_state.c152 int slot = img_mgmt_get_opposite_slot(active_slot); in img_mgmt_get_next_boot_slot() local
158 slot = active_slot; in img_mgmt_get_next_boot_slot()
187 LOG_DBG("(%d, *) => slot = %d, type = %d", image, slot, lt); in img_mgmt_get_next_boot_slot()
192 return slot; in img_mgmt_get_next_boot_slot()
198 static int read_directxip_state(int slot) in read_directxip_state() argument
201 int fa_id = img_mgmt_flash_area_id(slot); in read_directxip_state()
214 LOG_ERR("Failed to read state of slot %d with error %d", slot, rc); in read_directxip_state()
322 img_mgmt_slot_in_use(int slot) in img_mgmt_slot_in_use() argument
324 int image = img_mgmt_slot_to_image(slot); in img_mgmt_slot_in_use()
332 if (slot == nbs && type == NEXT_BOOT_TYPE_REVERT) { in img_mgmt_slot_in_use()
[all …]
Dzephyr_img_mgmt.c134 img_mgmt_flash_area_id(int slot) in img_mgmt_flash_area_id() argument
138 switch (slot) { in img_mgmt_flash_area_id()
191 static int img_mgmt_get_unused_slot_area_id(int slot) in img_mgmt_get_unused_slot_area_id() argument
194 slot--; in img_mgmt_get_unused_slot_area_id()
195 if (slot < -1) { in img_mgmt_get_unused_slot_area_id()
197 } else if (slot == -1) { in img_mgmt_get_unused_slot_area_id()
204 for (slot = 0; slot < 2; slot++) { in img_mgmt_get_unused_slot_area_id()
205 if (img_mgmt_slot_in_use(slot) == 0) { in img_mgmt_get_unused_slot_area_id()
206 int area_id = img_mgmt_flash_area_id(slot); in img_mgmt_get_unused_slot_area_id()
220 if (slot < 2) { in img_mgmt_get_unused_slot_area_id()
[all …]
/Zephyr-latest/samples/bluetooth/eddystone/src/
Dmain.c212 struct eds_slot *slot = &eds_slots[eds_active_slot]; in read_tx_power() local
214 if (slot->state == EDS_LOCKED) { in read_tx_power()
218 return bt_gatt_attr_read(conn, attr, buf, len, offset, &slot->tx_power, in read_tx_power()
219 sizeof(slot->tx_power)); in read_tx_power()
227 struct eds_slot *slot = &eds_slots[eds_active_slot]; in write_tx_power() local
229 if (slot->state == EDS_LOCKED) { in write_tx_power()
233 if (offset + len > sizeof(slot->tx_power)) { in write_tx_power()
237 memcpy(&slot->tx_power, buf, len); in write_tx_power()
246 struct eds_slot *slot = &eds_slots[eds_active_slot]; in read_adv_tx_power() local
248 if (slot->state == EDS_LOCKED) { in read_adv_tx_power()
[all …]
/Zephyr-latest/subsys/net/lib/dhcpv4/
Ddhcpv4_server.c59 struct dhcpv4_addr_slot *slot; member
86 struct dhcpv4_addr_slot *slot = &ctx->addr_pool[i]; in dhcpv4_server_timeout_recalc() local
88 if (slot->state == DHCPV4_SERVER_ADDR_RESERVED || in dhcpv4_server_timeout_recalc()
89 slot->state == DHCPV4_SERVER_ADDR_ALLOCATED || in dhcpv4_server_timeout_recalc()
90 slot->state == DHCPV4_SERVER_ADDR_DECLINED) { in dhcpv4_server_timeout_recalc()
91 if (sys_timepoint_cmp(slot->expiry, next) < 0) { in dhcpv4_server_timeout_recalc()
92 next = slot->expiry; in dhcpv4_server_timeout_recalc()
771 struct dhcpv4_addr_slot *slot) in dhcpv4_probe_address() argument
775 .sin_addr = slot->addr, in dhcpv4_probe_address()
813 if (probe_ctx->slot == NULL) { in echo_reply_handler()
[all …]
/Zephyr-latest/samples/net/sockets/http_server/src/
Dws.c114 int slot = POINTER_TO_INT(ptr1); in ws_echo_handler() local
155 LOG_INF("[%d] Connection closed", slot); in ws_echo_handler()
159 LOG_ERR("[%d] Connection error %d", slot, errno); in ws_echo_handler()
179 slot); in ws_echo_handler()
184 slot, offset); in ws_echo_handler()
187 LOG_INF("[%d] Sent %u packets", slot, cfg->counter); in ws_echo_handler()
300 int slot; in ws_echo_setup() local
302 slot = get_free_echo_slot(config); in ws_echo_setup()
303 if (slot < 0) { in ws_echo_setup()
309 config[slot].sock = ws_socket; in ws_echo_setup()
[all …]
/Zephyr-latest/drivers/sensor/maxim/max30101/
Dmax30101.c173 multi_led[0] = (config->slot[1] << 4) | (config->slot[0]); in max30101_init()
174 multi_led[1] = (config->slot[3] << 4) | (config->slot[2]); in max30101_init()
197 led_chan = (config->slot[fifo_chan] & MAX30101_SLOT_LED_MASK)-1; in max30101_init()
218 .slot[0] = MAX30101_SLOT_RED_LED1_PA,
219 .slot[1] = MAX30101_SLOT_DISABLED,
220 .slot[2] = MAX30101_SLOT_DISABLED,
221 .slot[3] = MAX30101_SLOT_DISABLED,
224 .slot[0] = MAX30101_SLOT_RED_LED1_PA,
225 .slot[1] = MAX30101_SLOT_IR_LED2_PA,
226 .slot[2] = MAX30101_SLOT_DISABLED,
[all …]
/Zephyr-latest/samples/net/sockets/echo_server/src/
Dtcp.c139 int slot = POINTER_TO_INT(ptr1); in handle_data() local
147 client = data->tcp.accepted[slot].sock; in handle_data()
151 data->tcp.accepted[slot].recv_buffer + offset, in handle_data()
152 sizeof(data->tcp.accepted[slot].recv_buffer) - offset, in handle_data()
174 if (offset == sizeof(data->tcp.accepted[slot].recv_buffer) || in handle_data()
176 data->tcp.accepted[slot].recv_buffer + offset, in handle_data()
177 sizeof(data->tcp.accepted[slot].recv_buffer) - in handle_data()
183 data->tcp.accepted[slot].recv_buffer, in handle_data()
194 if (++data->tcp.accepted[slot].counter % 1000 == 0U) { in handle_data()
196 data->tcp.accepted[slot].counter); in handle_data()
[all …]
/Zephyr-latest/samples/net/sockets/dumb_http_server_mt/src/
Dmain.c270 int slot; in process_tcp() local
282 slot = get_free_slot(accepted); in process_tcp()
283 if (slot < 0 || slot >= CONFIG_NET_SAMPLE_NUM_HANDLERS) { in process_tcp()
289 accepted[slot] = client; in process_tcp()
293 tcp6_handler_tid[slot] = k_thread_create( in process_tcp()
294 &tcp6_handler_thread[slot], in process_tcp()
295 tcp6_handler_stack[slot], in process_tcp()
296 K_THREAD_STACK_SIZEOF(tcp6_handler_stack[slot]), in process_tcp()
298 INT_TO_POINTER(slot), in process_tcp()
299 &accepted[slot], in process_tcp()
[all …]
/Zephyr-latest/include/zephyr/bluetooth/mesh/
Ddfd_srv.h111 const struct bt_mesh_dfu_slot *slot,
141 const struct bt_mesh_dfu_slot *slot,
155 const struct bt_mesh_dfu_slot *slot);
169 const struct bt_mesh_dfu_slot *slot);
182 const struct bt_mesh_dfu_slot *slot);
197 const struct bt_mesh_dfu_slot *slot,
226 struct bt_mesh_dfu_slot *slot; member
277 const struct bt_mesh_dfu_slot *slot, int status,
296 const struct bt_mesh_dfu_slot *slot, bool success,
/Zephyr-latest/include/zephyr/drivers/dma/
Ddma_stm32.h35 #define STM32_DMA_SLOT(id, dir, slot) 0 argument
36 #define STM32_DMA_SLOT_BY_IDX(id, idx, slot) 0 argument
38 #define STM32_DMA_SLOT(id, dir, slot) DT_INST_DMAS_CELL_BY_NAME(id, dir, slot) argument
39 #define STM32_DMA_SLOT_BY_IDX(id, idx, slot) DT_INST_DMAS_CELL_BY_IDX(id, idx, slot) argument
Ddma_mcux_lpc.h54 #define LPC_DMA_GET_BURSTPOWER(slot) (((slot) & 0xE0) >> 5) argument
/Zephyr-latest/tests/bsim/bluetooth/mesh/src/
Dtest_dfu.c120 const struct bt_mesh_dfu_slot *slot, in dist_fw_recv() argument
129 const struct bt_mesh_dfu_slot *slot) in dist_fw_del() argument
134 const struct bt_mesh_dfu_slot *slot, in dist_fw_send() argument
462 static bool slot_add(const struct bt_mesh_dfu_slot **slot) in slot_add() argument
482 if (slot) { in slot_add()
483 *slot = new_slot; in slot_add()
596 struct bt_mesh_dfu_slot *slot[CONFIG_BT_MESH_DFU_SLOT_CNT]; in test_dist_dfu_slot_create() local
614 slot[i] = slot_reserve_and_set(size, fwid, fwid_len, metadata, metadata_len); in test_dist_dfu_slot_create()
616 ASSERT_FALSE_MSG(slot[i] == NULL, "Failed to add slot\n"); in test_dist_dfu_slot_create()
620 err = bt_mesh_dfu_slot_commit(slot[i]); in test_dist_dfu_slot_create()
[all …]
/Zephyr-latest/subsys/net/l2/ethernet/lldp/
Dlldp.c200 int slot) in lldp_start_timer() argument
203 if (ctx->lldp[slot].tx_timer_start != 0) { in lldp_start_timer()
207 ctx->lldp[slot].iface = iface; in lldp_start_timer()
209 sys_slist_append(&lldp_ifaces, &ctx->lldp[slot].node); in lldp_start_timer()
211 ctx->lldp[slot].tx_timer_start = k_uptime_get(); in lldp_start_timer()
212 ctx->lldp[slot].tx_timer_timeout = in lldp_start_timer()
215 lldp_submit_work(ctx->lldp[slot].tx_timer_timeout); in lldp_start_timer()
234 int ret, slot; in lldp_start() local
248 slot = ret; in lldp_start()
252 &ctx->lldp[slot].node)) { in lldp_start()
[all …]
/Zephyr-latest/drivers/sdhc/
Dsdhc_esp32.c53 int slot; member
283 static int sdmmc_host_start_command(sdmmc_dev_t *sdio_hw, int slot, sdmmc_hw_cmd_t cmd, in sdmmc_host_start_command() argument
286 if (!(slot == 0 || slot == 1)) { in sdmmc_host_start_command()
289 if (!sdmmc_ll_is_card_detected(sdio_hw, slot)) { in sdmmc_host_start_command()
292 if (cmd.data_expected && cmd.rw && sdmmc_ll_is_card_write_protected(sdio_hw, slot)) { in sdmmc_host_start_command()
315 cmd.card_num = slot; in sdmmc_host_start_command()
621 static int sdmmc_host_do_transaction(const struct device *dev, int slot, in sdmmc_host_do_transaction() argument
675 ret = sdmmc_host_start_command(sdio_hw, slot, hw_cmd, cmdinfo->arg); in sdmmc_host_do_transaction()
709 static int sdmmc_host_clock_update_command(sdmmc_dev_t *sdio_hw, int slot) in sdmmc_host_clock_update_command() argument
715 sdmmc_hw_cmd_t cmd_val = {.card_num = slot, .update_clk_reg = 1, .wait_complete = 1}; in sdmmc_host_clock_update_command()
[all …]
/Zephyr-latest/subsys/bluetooth/mesh/shell/
Ddfu.c378 struct bt_mesh_dfu_slot *slot; in cmd_dfu_slot_add() local
393 slot = bt_mesh_dfu_slot_reserve(); in cmd_dfu_slot_add()
395 if (!slot) { in cmd_dfu_slot_add()
402 bt_mesh_dfu_slot_fwid_set(slot, fwid, fwid_len); in cmd_dfu_slot_add()
409 bt_mesh_dfu_slot_info_set(slot, size, metadata, metadata_len); in cmd_dfu_slot_add()
411 err = bt_mesh_dfu_slot_commit(slot); in cmd_dfu_slot_add()
414 bt_mesh_dfu_slot_release(slot); in cmd_dfu_slot_add()
418 shell_print(sh, "Slot added. Index: %u", bt_mesh_dfu_slot_img_idx_get(slot)); in cmd_dfu_slot_add()
425 const struct bt_mesh_dfu_slot *slot; in cmd_dfu_slot_del() local
435 slot = bt_mesh_dfu_slot_at(idx); in cmd_dfu_slot_del()
[all …]
/Zephyr-latest/boards/st/b_u585i_iot02a/
Db_u585i_iot02a_stm32u585xx_ns.dts47 /* Secure image primary slot */
52 /* Non-secure image primary slot */
57 /* Secure image secondary slot */
62 /* Non-secure image secondary slot */
/Zephyr-latest/boards/st/nucleo_l552ze_q/
Dnucleo_l552ze_q_stm32l552xx_ns.dts50 /* Secure image primary slot */
55 /* Non-secure image primary slot */
60 /* Secure image secondary slot */
65 /* Non-secure image secondary slot */
/Zephyr-latest/include/zephyr/mgmt/mcumgr/grp/img_mgmt/
Dimg_mgmt_callbacks.h52 const uint32_t slot; member
84 const uint8_t slot; member
/Zephyr-latest/subsys/logging/backends/
Dlog_backend_adsp_mtrace.c78 struct adsp_debug_slot *slot = (struct adsp_debug_slot *)(ADSP_DW->slots[0]); in mtrace_out() local
79 uint8_t *data = slot->data; in mtrace_out()
80 uint32_t r = slot->host_ptr; in mtrace_out()
81 uint32_t w = slot->dsp_ptr; in mtrace_out()
112 slot->dsp_ptr = w; in mtrace_out()

12345678910