Home
last modified time | relevance | path

Searched full:slot (Results 1 – 25 of 338) sorted by relevance

12345678910>>...14

/Zephyr-Core-3.5.0/subsys/bluetooth/mesh/
Ddfu_slot.c21 #define DFU_SLOT_SETTINGS_PATH "bt/mesh-dfu/slot"
23 #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()
[all …]
Ddfu_slot.h9 /** @brief Slot iteration callback.
11 * @param slot A valid DFU image slot.
17 const struct bt_mesh_dfu_slot *slot, void *user_data);
25 /** @brief Reserve a new DFU image slot for a distributable image.
27 * A DFU image slot represents a single distributable DFU image with all its
28 * metadata. The slot data must be set using @ref bt_mesh_dfu_slot_info_set and
29 * @ref bt_mesh_dfu_slot_fwid_set, and the slot committed using
30 * @ref bt_mesh_dfu_slot_commit for the slot to be considered part of the slot
33 * @return A pointer to the reserved slot, or NULL if allocation failed.
37 /** @brief Set the size and metadata for a reserved slot.
[all …]
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-Core-3.5.0/subsys/mgmt/mcumgr/grp/img_mgmt/include/mgmt/mcumgr/grp/img_mgmt/
Dimg_mgmt_priv.h22 * @brief Ensures the spare slot (slot 1) is fully erased.
24 * @param slot A slot to erase.
28 int img_mgmt_erase_slot(int slot);
31 * @brief Marks the image in the specified slot as pending. On the next reboot,
34 * @param slot The slot to mark as pending. In the typical use case, this is 1.
41 int img_mgmt_write_pending(int slot, bool permanent);
44 * @brief Marks the image in slot 0 as confirmed. The system will continue
45 * booting into the image in slot 0 until told to boot from a different slot.
52 * @brief Reads the specified chunk of data from an image slot.
54 * @param slot The index of the slot to read from.
[all …]
/Zephyr-Core-3.5.0/drivers/interrupt_controller/
Dintc_nxp_pint.c20 /* Describes configuration of PINT IRQ slot */
38 /* Attaches pin to PINT IRQ slot using INPUTMUX */
43 /* Three parameters here- INPUTMUX base, the ID of the PINT slot, in attach_pin_to_pint()
65 uint8_t slot = 0U; in nxp_pint_pin_enable() local
71 /* Find unused IRQ slot */ in nxp_pint_pin_enable()
73 slot = pin_pint_id[pin]; in nxp_pint_pin_enable()
75 for (slot = 0; slot < ARRAY_SIZE(pint_irq_cfg); slot++) { in nxp_pint_pin_enable()
76 if (!pint_irq_cfg[slot].used) { in nxp_pint_pin_enable()
80 if (slot == ARRAY_SIZE(pint_irq_cfg)) { in nxp_pint_pin_enable()
84 pin_pint_id[pin] = slot; in nxp_pint_pin_enable()
[all …]
/Zephyr-Core-3.5.0/subsys/mgmt/mcumgr/grp/img_mgmt/src/
Dimg_mgmt_state.c53 /* Flags returned by img_mgmt_state_read() for queried slot */
67 * Collects information about the specified image slot.
129 /* In case when MCUboot is configured for DirectXIP slot may only be in img_mgmt_state_flags()
130 * active or pending. Slot is marked pending only when version in that slot in img_mgmt_state_flags()
131 * is higher than version of active slot. in img_mgmt_state_flags()
156 /* All cases except BOOT_SWAP_TYPE_NONE return opposite slot */ in img_mgmt_get_next_boot_slot()
157 int slot = img_mgmt_get_opposite_slot(active_slot); in img_mgmt_get_next_boot_slot() local
162 /* Booting to the same slot, keeping type to NEXT_BOOT_TYPE_NORMAL */ in img_mgmt_get_next_boot_slot()
163 slot = active_slot; in img_mgmt_get_next_boot_slot()
168 * the later boots to the application in currently active slot while the former in img_mgmt_get_next_boot_slot()
[all …]
Dzephyr_img_mgmt.c124 * for Zephyr, as slot 0 of image 0 is image_0, slot 0 of image 1 is
125 * image_2 and so on. The function treats slot numbers as absolute
126 * slot number starting at 0.
129 img_mgmt_flash_area_id(int slot) in img_mgmt_flash_area_id() argument
133 switch (slot) { in img_mgmt_flash_area_id()
176 * In normal operation this function will select between first two slot
177 * (in reality it just checks whether second slot can be used), ignoring the
178 * slot parameter.
180 * slot is available, and allowed, for DFU; providing 0 as a parameter means
182 * value is direct (slot + 1) to be used; if checks are positive, then area
[all …]
/Zephyr-Core-3.5.0/subsys/net/lib/tls_credentials/
Dtls_credentials_trusted.c26 * of credentials, can be 0 if slot is free.
94 static int credentials_toc_update(unsigned int slot, psa_storage_uid_t uid) in credentials_toc_update() argument
98 if (slot >= CRED_MAX_SLOTS) { in credentials_toc_update()
102 credentials_toc[slot] = uid; in credentials_toc_update()
114 unsigned int slot; in tls_credential_toc_find_slot() local
116 for (slot = 0; slot < CRED_MAX_SLOTS; ++slot) { in tls_credential_toc_find_slot()
117 if (credentials_toc[slot] == uid) { in tls_credential_toc_find_slot()
118 return slot; in tls_credential_toc_find_slot()
130 unsigned int slot; in credentials_init() local
143 for (slot = 0; slot < CRED_MAX_SLOTS; ++slot) { in credentials_init()
[all …]
/Zephyr-Core-3.5.0/samples/bluetooth/eddystone/src/
Dmain.c121 .slot_types = EDS_SLOT_URL, /* TODO: Add support for other slot types */
208 struct eds_slot *slot = &eds_slots[eds_active_slot]; in read_tx_power() local
210 if (slot->state == EDS_LOCKED) { in read_tx_power()
214 return bt_gatt_attr_read(conn, attr, buf, len, offset, &slot->tx_power, in read_tx_power()
215 sizeof(slot->tx_power)); in read_tx_power()
223 struct eds_slot *slot = &eds_slots[eds_active_slot]; in write_tx_power() local
225 if (slot->state == EDS_LOCKED) { in write_tx_power()
229 if (offset + len > sizeof(slot->tx_power)) { in write_tx_power()
233 memcpy(&slot->tx_power, buf, len); in write_tx_power()
242 struct eds_slot *slot = &eds_slots[eds_active_slot]; in read_adv_tx_power() local
[all …]
/Zephyr-Core-3.5.0/include/zephyr/bluetooth/mesh/
Ddfd_srv.h98 /** @brief Slot receive callback.
105 * @param slot DFU image slot being received.
111 const struct bt_mesh_dfu_slot *slot,
126 * @param slot Slot to be used for the upload.
141 const struct bt_mesh_dfu_slot *slot,
152 * @param slot DFU image slot to cancel
155 const struct bt_mesh_dfu_slot *slot);
164 * @param slot DFU image slot to get progress for.
169 const struct bt_mesh_dfu_slot *slot);
172 /** @brief Slot delete callback.
[all …]
/Zephyr-Core-3.5.0/include/zephyr/mgmt/mcumgr/grp/img_mgmt/
Dimg_mgmt.h73 /** There is no image in the slot. */
76 /** The image in the slot has no TLVs (tag, length, value). */
79 /** The image in the slot has an invalid TLV type and/or length. */
82 /** The image in the slot has multiple hash TLVs, which is invalid. */
85 /** The image in the slot has an invalid TLV size. */
88 /** The image in the slot does not have a hash TLV, which is required. */
91 /** There is no free slot to place the image. */
106 /** The provided slot is not valid. */
163 /** Setting test to active slot is not allowed */
221 * @brief Read info of an image at the specified slot number
[all …]
/Zephyr-Core-3.5.0/samples/net/sockets/echo_server/src/
Dtcp.c122 int slot = POINTER_TO_INT(ptr1); in handle_data() local
130 client = data->tcp.accepted[slot].sock; in handle_data()
134 data->tcp.accepted[slot].recv_buffer + offset, in handle_data()
135 sizeof(data->tcp.accepted[slot].recv_buffer) - offset, in handle_data()
157 if (offset == sizeof(data->tcp.accepted[slot].recv_buffer) || in handle_data()
159 data->tcp.accepted[slot].recv_buffer + offset, in handle_data()
160 sizeof(data->tcp.accepted[slot].recv_buffer) - in handle_data()
166 data->tcp.accepted[slot].recv_buffer, in handle_data()
177 if (++data->tcp.accepted[slot].counter % 1000 == 0U) { in handle_data()
179 data->tcp.accepted[slot].counter); in handle_data()
[all …]
/Zephyr-Core-3.5.0/drivers/sensor/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 …]
DKconfig144 int "Slot 1"
148 Set which LED and pulse amplitude are active in time slot 1.
159 int "Slot 2"
163 Set which LED and pulse amplitude are active in time slot 2.
174 int "Slot 3"
178 Set which LED and pulse amplitude are active in time slot 3.
189 int "Slot 4"
193 Set which LED and pulse amplitude are active in time slot 4.
/Zephyr-Core-3.5.0/tests/boot/with_mcumgr/pytest/
Dtest_upgrade.py46 3) Upload the application update to slot 1 using mcumgr
47 4) Flag the application update in slot 1 as 'pending' by using mcumgr 'test'
73 output = dut.readlines_until('Launching primary slot application')
88 output = dut.readlines_until('Launching primary slot application')
101 3) Upload the application update to slot 1 using mcumgr
102 4) Flag the application update in slot 1 as 'pending' by using mcumgr 'test'
128 output = dut.readlines_until('Launching primary slot application')
142 output = dut.readlines_until('Launching primary slot application')
165 3) Upload the application update to slot 1 using mcumgr
166 4) Flag the application update in slot 1 as 'pending' by using mcumgr 'test'
[all …]
/Zephyr-Core-3.5.0/samples/net/sockets/dumb_http_server_mt/src/
Dmain.c264 int slot; in process_tcp() local
275 slot = get_free_slot(accepted); in process_tcp()
276 if (slot < 0 || slot >= CONFIG_NET_SAMPLE_NUM_HANDLERS) { in process_tcp()
282 accepted[slot] = client; in process_tcp()
286 tcp6_handler_tid[slot] = k_thread_create( in process_tcp()
287 &tcp6_handler_thread[slot], in process_tcp()
288 tcp6_handler_stack[slot], in process_tcp()
289 K_THREAD_STACK_SIZEOF(tcp6_handler_stack[slot]), in process_tcp()
291 INT_TO_POINTER(slot), in process_tcp()
292 &accepted[slot], in process_tcp()
[all …]
/Zephyr-Core-3.5.0/samples/subsys/mgmt/mcumgr/smp_svr/
DREADME.rst174 Upload the :file:`zephyr.signed.bin` file from the previous to image slot-0 of your
177 To upload the initial image file to an empty slot-0, we simply use ``west flash``
178 like normal. ``west flash`` will automatically detect slot-0 address and confirm
266 Direct image upload and Image mapping to MCUboot slot
270 into MCUboot primary (slot-0) and secondary (slot-1) respectively.
274 behaviour", and it performs upload to the "image-1", the MCUboot secondary slot.
276 For clarity, here is DTS label to slot to ``<image>`` translation table:
279 | DTS label | Slot | -n <image> |
281 | "image-0" | slot-0 | 1 |
283 | "image-1" | slot-1 | 0, 1 |
[all …]
/Zephyr-Core-3.5.0/subsys/mgmt/mcumgr/grp/img_mgmt/
DKconfig66 bool "Allow to confirm secondary slot of non-active image"
69 Allows to confirm secondary (non-active) slot of non-active image.
72 broken and may not boot in other slot; instead application should
79 Allows to confirm any slot of non-active image.
82 broken and may not boot in other slot; instead application should
87 bool "Allow to erase pending slot"
89 Allows erasing secondary slot which is marked for test or confirmed; this allows
99 the first slot of the only image it knows, where image is understood as two slots
104 slot in normal operation.
/Zephyr-Core-3.5.0/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
443 LOG_WRN("Reserving slot failed"); in slot_reserve_and_set()
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()
[all …]
/Zephyr-Core-3.5.0/scripts/pylib/pytest-twister-harness/tests/fixtures/
Dmcumgr_fixture_test.py40 image=0 slot=0
55 image=0 slot=0
60 image=0 slot=1
70 assert image_list[0].slot == 0
75 assert image_list[1].slot == 1
/Zephyr-Core-3.5.0/subsys/bluetooth/mesh/shell/
Ddfu.c378 struct bt_mesh_dfu_slot *slot; in cmd_dfu_slot_add() local
392 shell_print(sh, "Adding slot (size: %u)", size); in cmd_dfu_slot_add()
393 slot = bt_mesh_dfu_slot_reserve(); in cmd_dfu_slot_add()
395 if (!slot) { in cmd_dfu_slot_add()
396 shell_print(sh, "Failed to reserve 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()
413 shell_print(sh, "Failed to commit slot: %d", err); in cmd_dfu_slot_add()
414 bt_mesh_dfu_slot_release(slot); in cmd_dfu_slot_add()
[all …]
/Zephyr-Core-3.5.0/boards/arm/b_u585i_iot02a/
Db_u585i_iot02a_ns.dts47 /* Secure image primary slot */
52 /* Non-secure image primary slot */
57 /* Secure image primary slot */
62 /* Non-secure image primary slot */
/Zephyr-Core-3.5.0/tests/boot/test_mcuboot/swapped_app/
Dprj.conf2 # slot, we need to enable hex build output. Otherwise, some debuggers will not
3 # flash the binary to the second image slot.
/Zephyr-Core-3.5.0/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-Core-3.5.0/modules/
DKconfig.mcuboot150 bool "MCUboot has been configured for single slot execution"
154 to DFU its own update to secondary slot and all updates need to
173 MCUboot swaps application from the secondary slot to the primary
174 slot.
179 bool "MCUboot has been configured to just overwrite primary slot"
182 MCUboot will take contents of secondary slot of an image and will
183 overwrite primary slot with it.
185 as it is not stored in the secondary slot.
188 slot is higher than the version in primary slot.
212 from either slot, as long as it has been marked to be boot

12345678910>>...14