Home
last modified time | relevance | path

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

12345678910>>...17

/Zephyr-latest/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; member
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-latest/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-latest/drivers/interrupt_controller/
Dintc_nxp_pint.c21 /* Describes configuration of PINT IRQ slot */
40 /* Attaches pin to PINT IRQ slot using INPUTMUX */
45 /* Three parameters here- INPUTMUX base, the ID of the PINT slot, in attach_pin_to_pint()
68 uint8_t slot = 0U; in nxp_pint_pin_enable() local
74 /* Find unused IRQ slot */ in nxp_pint_pin_enable()
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()
[all …]
/Zephyr-latest/subsys/mgmt/mcumgr/grp/img_mgmt/src/
Dimg_mgmt_state.c48 /* Flags returned by img_mgmt_state_read() for queried slot */
62 * Collects information about the specified image slot.
124 /* In case when MCUboot is configured for DirectXIP slot may only be in img_mgmt_state_flags()
125 * active or pending. Slot is marked pending only when version in that slot in img_mgmt_state_flags()
126 * is higher than version of active slot. in img_mgmt_state_flags()
151 /* All cases except BOOT_SWAP_TYPE_NONE return opposite slot */ in img_mgmt_get_next_boot_slot()
152 int slot = img_mgmt_get_opposite_slot(active_slot); in img_mgmt_get_next_boot_slot() local
157 /* Booting to the same slot, keeping type to NEXT_BOOT_TYPE_NORMAL */ in img_mgmt_get_next_boot_slot()
158 slot = active_slot; in img_mgmt_get_next_boot_slot()
163 * the later boots to the application in currently active slot while the former in img_mgmt_get_next_boot_slot()
[all …]
Dzephyr_img_mgmt.c129 * for Zephyr, as slot 0 of image 0 is image_0, slot 0 of image 1 is
130 * image_2 and so on. The function treats slot numbers as absolute
131 * slot number starting at 0.
134 img_mgmt_flash_area_id(int slot) in img_mgmt_flash_area_id() argument
138 switch (slot) { in img_mgmt_flash_area_id()
181 * In normal operation this function will select between first two slot
182 * (in reality it just checks whether second slot can be used), ignoring the
183 * slot parameter.
185 * slot is available, and allowed, for DFU; providing 0 as a parameter means
187 * value is direct (slot + 1) to be used; if checks are positive, then area
[all …]
/Zephyr-latest/subsys/net/lib/tls_credentials/
Dtls_credentials_trusted.c27 * of credentials, can be 0 if slot is free.
95 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()
[all …]
/Zephyr-latest/samples/bluetooth/eddystone/src/
Dmain.c125 .slot_types = EDS_SLOT_URL, /* TODO: Add support for other slot types */
212 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
[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/include/zephyr/mgmt/mcumgr/grp/img_mgmt/
Dimg_mgmt.h74 /** There is no image in the slot. */
77 /** The image in the slot has no TLVs (tag, length, value). */
80 /** The image in the slot has an invalid TLV type and/or length. */
83 /** The image in the slot has multiple hash TLVs, which is invalid. */
86 /** The image in the slot has an invalid TLV size. */
89 /** The image in the slot does not have a hash TLV, which is required. */
92 /** There is no free slot to place the image. */
107 /** The provided slot is not valid. */
164 /** Setting test to active slot is not allowed */
167 /** Current active slot for image cannot be determined */
[all …]
Dimg_mgmt_callbacks.h47 * slot state response.
52 const uint32_t slot; member
60 * callback function is called once per image when the slot info command is used, it can be used
76 * callback function is called once per slot per image when the slot info command is used, it can
83 /** The slot that is currently being enumerated. */
84 const uint8_t slot; member
86 /** Flash area of the slot that is current being enumerated. */
/Zephyr-latest/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-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/tests/subsys/mgmt/mcumgr/img_mgmt_slot_info/
Dtestcase.yaml16 img.mgmt.slot.info: {}
17 img.mgmt.slot.info.too.large:
20 img.mgmt.slot.info.dual.slot:
/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/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/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.
189 bool "Image slot state hook"
[all …]
/Zephyr-latest/share/sysbuild/images/bootloader/
DKconfig40 bool "Single slot"
43 slots. In this mode application is not able to DFU its own update to secondary slot and
58 used as temporary storage when MCUboot swaps application from the secondary slot to the
59 primary slot.
66 MCUboot will take contents of secondary slot of an image and will overwrite primary slot
68 stored in the secondary slot.
70 not happen unless the version of secondary slot is higher than the version in primary
71 slot.
87 will boot the application with the higher version from either slot, as long as it has
/Zephyr-latest/tests/boot/with_mcumgr/pytest/
Dtest_upgrade.py50 3) Upload the application update to slot 1 using mcumgr
51 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-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/scripts/pylib/pytest-twister-harness/tests/fixtures/
Dmcumgr_fixture_test.py30 mcumgr.image_upload('/path/to/image', slot=2, timeout=100)
43 image=0 slot=0
58 image=0 slot=0
63 image=0 slot=1
73 assert image_list[0].slot == 0
78 assert image_list[1].slot == 1
/Zephyr-latest/include/zephyr/drivers/dma/
Ddma_stm32.h33 /* macro for dma slot (only for dma-v1 or dma-v2 types) */
35 #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
/Zephyr-latest/samples/subsys/mgmt/mcumgr/smp_svr/
DREADME.rst172 Upload the :file:`zephyr.signed.bin` file from the previous to image slot-0 of your
175 To upload the initial image file to an empty slot-0, use ``west flash`` like normal.
176 ``west flash`` will automatically detect slot-0 address and confirm the image.
221 Direct image upload and Image mapping to MCUboot slot
225 into MCUboot primary (slot-0) and secondary (slot-1) respectively.
227 For clarity, here is DTS label to slot to ``<image>`` translation table:
230 | DTS label | Slot | -n <image> |
232 | "image-0" | slot-0 | 1 |
234 | "image-1" | slot-1 | 0, 1 |
250 the image slot, taking several dozen seconds for some targets.
[all …]
/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
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 …]

12345678910>>...17