Home
last modified time | relevance | path

Searched refs:xfer (Results 1 – 25 of 52) sorted by relevance

123

/Zephyr-latest/drivers/usb/uhc/
Duhc_common.c41 struct uhc_transfer *const xfer, in uhc_xfer_return() argument
47 .xfer = xfer, in uhc_xfer_return()
51 sys_dlist_remove(&xfer->node); in uhc_xfer_return()
52 xfer->queued = 0; in uhc_xfer_return()
53 xfer->err = err; in uhc_xfer_return()
61 struct uhc_transfer *xfer; in uhc_xfer_get_next() local
70 return (node == NULL) ? NULL : SYS_DLIST_CONTAINER(node, xfer, node); in uhc_xfer_get_next()
74 struct uhc_transfer *const xfer) in uhc_xfer_append() argument
78 sys_dlist_append(&data->ctrl_xfers, &xfer->node); in uhc_xfer_append()
102 struct uhc_transfer *xfer = NULL; in uhc_xfer_alloc() local
[all …]
Duhc_virtual.c34 struct uhc_transfer *xfer; member
91 struct uhc_transfer *const xfer) in vrt_xfer_control() argument
94 struct net_buf *buf = xfer->buf; in vrt_xfer_control()
99 if (xfer->stage == UHC_CONTROL_STAGE_SETUP) { in vrt_xfer_control()
102 xfer->udev->addr, USB_CONTROL_EP_OUT, in vrt_xfer_control()
103 xfer->setup_pkt, sizeof(xfer->setup_pkt)); in vrt_xfer_control()
114 if (buf != NULL && xfer->stage == UHC_CONTROL_STAGE_DATA) { in vrt_xfer_control()
115 if (USB_EP_DIR_IS_IN(xfer->ep)) { in vrt_xfer_control()
116 length = MIN(net_buf_tailroom(buf), xfer->mps); in vrt_xfer_control()
119 length = MIN(buf->len, xfer->mps); in vrt_xfer_control()
[all …]
Duhc_max3421e.c309 struct uhc_transfer *const xfer, in max3421e_xfer_control() argument
313 struct net_buf *buf = xfer->buf; in max3421e_xfer_control()
322 if (xfer->stage == UHC_CONTROL_STAGE_SETUP) { in max3421e_xfer_control()
325 xfer->setup_pkt, sizeof(xfer->setup_pkt)); in max3421e_xfer_control()
338 if (buf != NULL && xfer->stage == UHC_CONTROL_STAGE_DATA) { in max3421e_xfer_control()
340 return max3421e_xfer_data(dev, buf, xfer->ep); in max3421e_xfer_control()
343 if (xfer->stage == UHC_CONTROL_STAGE_STATUS) { in max3421e_xfer_control()
345 if (USB_EP_DIR_IS_IN(xfer->ep)) { in max3421e_xfer_control()
358 struct uhc_transfer *const xfer, in max3421e_xfer_bulk() argument
362 struct net_buf *buf = xfer->buf; in max3421e_xfer_bulk()
[all …]
/Zephyr-latest/drivers/spi/
Dspi_psoc6.c48 struct spi_psoc6_transfer xfer; member
56 struct spi_psoc6_transfer *xfer = &data->xfer; in spi_psoc6_transfer_next_packet() local
63 xfer->dataSize = 0U; in spi_psoc6_transfer_next_packet()
72 xfer->txData = NULL; in spi_psoc6_transfer_next_packet()
73 xfer->rxData = ctx->rx_buf; in spi_psoc6_transfer_next_packet()
74 xfer->dataSize = ctx->rx_len; in spi_psoc6_transfer_next_packet()
77 xfer->txData = (uint8_t *) ctx->tx_buf; in spi_psoc6_transfer_next_packet()
78 xfer->rxData = NULL; in spi_psoc6_transfer_next_packet()
79 xfer->dataSize = ctx->tx_len; in spi_psoc6_transfer_next_packet()
82 xfer->txData = (uint8_t *) ctx->tx_buf; in spi_psoc6_transfer_next_packet()
[all …]
Dspi_mchp_mss.c114 struct mss_spi_transfer xfer; member
184 struct mss_spi_transfer *xfer = &data->xfer; in mss_spi_readwr_fifo() local
199 spi_context_update_rx(ctx, 1, xfer->rx_len); in mss_spi_readwr_fifo()
332 struct mss_spi_transfer *xfer = &data->xfer; in mss_spi_configure() local
357 mss_spi_write(cfg, MSS_SPI_REG_CONTROL, xfer->control); in mss_spi_configure()
380 struct mss_spi_transfer *xfer = &data->xfer; in mss_spi_transceive() local
392 xfer->rx_len = ctx->rx_len; in mss_spi_transceive()
425 struct mss_spi_transfer *xfer = &data->xfer; in mss_spi_init() local
436 xfer->control = (MSS_SPI_CONTROL_SPS | MSS_SPI_CONTROL_BIGFIFO | MSS_SPI_CONTROL_MASTER | in mss_spi_init()
/Zephyr-latest/subsys/usb/host/
Dusbh_device.h16 struct uhc_transfer *const xfer);
49 struct uhc_transfer *const xfer, in usbh_xfer_buf_add() argument
54 return uhc_xfer_buf_add(ctx->dev, xfer, buf); in usbh_xfer_buf_add()
66 struct uhc_transfer *const xfer) in usbh_xfer_free() argument
70 return uhc_xfer_free(ctx->dev, xfer); in usbh_xfer_free()
82 struct uhc_transfer *const xfer) in usbh_xfer_enqueue() argument
86 return uhc_ep_enqueue(ctx->dev, xfer); in usbh_xfer_enqueue()
90 struct uhc_transfer *const xfer) in usbh_xfer_dequeue() argument
94 return uhc_ep_dequeue(ctx->dev, xfer); in usbh_xfer_dequeue()
Dusbh_core.c88 struct uhc_transfer *const xfer) in discard_ep_request() argument
92 if (xfer->buf) { in discard_ep_request()
93 LOG_HEXDUMP_INF(xfer->buf->data, xfer->buf->len, "buf"); in discard_ep_request()
94 uhc_xfer_buf_free(dev, xfer->buf); in discard_ep_request()
97 return uhc_xfer_free(dev, xfer); in discard_ep_request()
171 cb = event.xfer->cb; in usbh_thread()
173 if (event.xfer->cb) { in usbh_thread()
174 ret = cb(event.xfer->udev, event.xfer); in usbh_thread()
176 ret = discard_ep_request(uhs_ctx, event.xfer); in usbh_thread()
Dusbh_ch9.c29 static int ch9_req_cb(struct usb_device *const udev, struct uhc_transfer *const xfer) in ch9_req_cb() argument
31 LOG_DBG("Request finished %p, err %d", xfer, xfer->err); in ch9_req_cb()
32 if (xfer->err == -ECONNRESET) { in ch9_req_cb()
33 LOG_INF("Transfer %p cancelled", (void *)xfer); in ch9_req_cb()
34 usbh_xfer_free(udev, xfer); in ch9_req_cb()
59 struct uhc_transfer *xfer; in usbh_req_setup() local
63 xfer = usbh_xfer_alloc(udev, ep, ch9_req_cb, NULL); in usbh_req_setup()
64 if (!xfer) { in usbh_req_setup()
68 memcpy(xfer->setup_pkt, &req, sizeof(req)); in usbh_req_setup()
73 ret = usbh_xfer_buf_add(udev, xfer, buf); in usbh_req_setup()
[all …]
Dusbip.c63 struct uhc_transfer *xfer; member
120 static int usbip_req_cb(struct usb_device *const udev, struct uhc_transfer *const xfer) in usbip_req_cb() argument
122 struct usbip_cmd_node *const cmd_nd = xfer->priv; in usbip_req_cb()
125 struct net_buf *buf = xfer->buf; in usbip_req_cb()
131 cmd->hdr.seqnum, xfer->err, xfer->ep); in usbip_req_cb()
136 ret.hdr.ep = htonl(xfer->ep); in usbip_req_cb()
140 ret.submit.status = htonl(xfer->err); in usbip_req_cb()
144 if (xfer->err == -ECONNRESET) { in usbip_req_cb()
149 if (xfer->err == -EPIPE) { in usbip_req_cb()
153 if (xfer->err == 0 && cmd->submit.length != 0) { in usbip_req_cb()
[all …]
Dusbh_shell.c62 static int bulk_req_cb(struct usb_device *const dev, struct uhc_transfer *const xfer) in bulk_req_cb() argument
64 if (xfer->err == -ECONNRESET) { in bulk_req_cb()
66 } else if (xfer->err) { in bulk_req_cb()
67 LOG_WRN("Bulk request failed, err %d", xfer->err); in bulk_req_cb()
72 usbh_xfer_buf_free(dev, xfer->buf); in bulk_req_cb()
73 usbh_xfer_free(dev, xfer); in bulk_req_cb()
81 struct uhc_transfer *xfer; in cmd_bulk() local
90 xfer = usbh_xfer_alloc(udev, ep, bulk_req_cb, NULL); in cmd_bulk()
91 if (!xfer) { in cmd_bulk()
99 usbh_xfer_free(udev, xfer); in cmd_bulk()
[all …]
/Zephyr-latest/subsys/bluetooth/mesh/
Ddfu_cli.c118 cli->xfer.state = STATE_APPLIED; in dfu_applied()
130 cli->xfer.flags |= FLAG_FAILED; in dfu_failed()
190 cli->xfer.blob.block_size_log = caps->max_block_size_log; in blob_caps()
191 cli->xfer.blob.chunk_size = caps->max_chunk_size; in blob_caps()
198 if (!(cli->xfer.blob.mode & BT_MESH_BLOB_XFER_MODE_ALL)) { in blob_caps()
199 cli->xfer.blob.mode = in blob_caps()
203 cli->xfer.blob.mode = in blob_caps()
205 cli->xfer.blob.mode : caps->modes; in blob_caps()
208 err = bt_mesh_blob_cli_send(b, b->inputs, &cli->xfer.blob, cli->xfer.io); in blob_caps()
223 if ((cli->xfer.state == STATE_CONFIRM || cli->xfer.state == STATE_APPLY) && in blob_lost_target()
[all …]
Dblob_srv.c49 return DIV_ROUND_UP(srv->state.xfer.size, in block_count_get()
50 (1U << srv->state.xfer.block_size_log)); in block_count_get()
106 return srv->io->open(srv->io, &srv->state.xfer, BT_MESH_BLOB_WRITE); in io_open()
115 srv->io->close(srv->io, &srv->state.xfer); in io_close()
121 srv->state.xfer.mode == BT_MESH_BLOB_XFER_MODE_PULL ? in reset_timer()
151 BLOB_CHUNK_SDU_LEN(srv->state.xfer.chunk_size), in pull_req_max()
219 srv->state.xfer.mode = BT_MESH_BLOB_XFER_MODE_NONE; in cancel()
223 srv->state.xfer.chunk_size = 0xffff; in cancel()
230 srv->cb->end(srv, srv->state.xfer.id, false); in cancel()
262 srv->cb->end(srv, srv->state.xfer.id, true); in end()
[all …]
Dblob_cli.c31 (cli)->xfer->mode == BT_MESH_BLOB_XFER_MODE_PULL)
92 cli->xfer = NULL; in cli_state_reset()
173 return cli->io->open(cli->io, cli->xfer, BT_MESH_BLOB_READ); in io_open()
182 cli->io->close(cli->io, cli->xfer); in io_close()
218 static inline size_t chunk_size(const struct bt_mesh_blob_xfer *xfer, in chunk_size() argument
223 (block->size % xfer->chunk_size)) { in chunk_size()
224 return block->size % xfer->chunk_size; in chunk_size()
227 return xfer->chunk_size; in chunk_size()
267 cli->block.offset = block_idx * (1UL << cli->xfer->block_size_log); in block_set()
268 cli->block.size = blob_block_size(cli->xfer->size, cli->xfer->block_size_log, in block_set()
[all …]
/Zephyr-latest/drivers/flash/
Dflash_mspi_nor.c28 struct mspi_xfer xfer; member
129 dev_data->xfer.cmd_length = 2; in api_read()
130 dev_data->xfer.addr_length = 4; in api_read()
131 dev_data->xfer.rx_dummy = 20; in api_read()
138 &dev_data->xfer); in api_read()
158 dev_data->xfer.cmd_length = 2; in wait_until_ready()
159 dev_data->xfer.addr_length = 4; in wait_until_ready()
160 dev_data->xfer.rx_dummy = 4; in wait_until_ready()
167 &dev_data->xfer); in wait_until_ready()
210 dev_data->xfer.cmd_length = 2; in api_write()
[all …]
Dflash_mspi_emul_device.c46 struct mspi_xfer xfer; member
212 data->xfer.async = false; in flash_mspi_emul_write()
213 data->xfer.xfer_mode = MSPI_DMA; in flash_mspi_emul_write()
214 data->xfer.tx_dummy = data->dev_cfg.tx_dummy; in flash_mspi_emul_write()
215 data->xfer.cmd_length = data->dev_cfg.cmd_length; in flash_mspi_emul_write()
216 data->xfer.addr_length = data->dev_cfg.addr_length; in flash_mspi_emul_write()
217 data->xfer.hold_ce = false; in flash_mspi_emul_write()
218 data->xfer.priority = 1; in flash_mspi_emul_write()
219 data->xfer.packets = &data->packet; in flash_mspi_emul_write()
220 data->xfer.num_packet = 1; in flash_mspi_emul_write()
[all …]
/Zephyr-latest/include/zephyr/bluetooth/mesh/
Dblob.h157 const struct bt_mesh_blob_xfer *xfer,
168 const struct bt_mesh_blob_xfer *xfer);
182 const struct bt_mesh_blob_xfer *xfer,
196 const struct bt_mesh_blob_xfer *xfer,
226 const struct bt_mesh_blob_xfer *xfer,
251 const struct bt_mesh_blob_xfer *xfer,
Dblob_srv.h66 struct bt_mesh_blob_xfer *xfer);
126 struct bt_mesh_blob_xfer *xfer,
143 struct bt_mesh_blob_xfer xfer; member
/Zephyr-latest/drivers/mspi/
Dmspi_emul.c32 struct mspi_xfer xfer; member
134 const struct mspi_xfer *xfer, in mspi_context_lock() argument
140 if (k_sem_take(&ctx->lock, K_MSEC(xfer->timeout))) { in mspi_context_lock()
146 if ((xfer->tx_dummy == ctx->xfer.tx_dummy) && in mspi_context_lock()
147 (xfer->rx_dummy == ctx->xfer.rx_dummy) && in mspi_context_lock()
148 (xfer->cmd_length == ctx->xfer.cmd_length) && in mspi_context_lock()
149 (xfer->addr_length == ctx->xfer.addr_length)) { in mspi_context_lock()
157 ctx->xfer = *xfer; in mspi_context_lock()
159 ctx->asynchronous = ctx->xfer.async; in mspi_context_lock()
185 const struct mspi_xfer *xfer) in mspi_xfer_config() argument
[all …]
Dmspi_ambiq_ap3.c35 struct mspi_xfer xfer; member
189 if (ctx->xfer.hold_ce && in mspi_context_ce_control()
190 ctx->xfer.ce_sw_ctrl.gpio.port != NULL) { in mspi_context_ce_control()
192 gpio_pin_set_dt(&ctx->xfer.ce_sw_ctrl.gpio, 1); in mspi_context_ce_control()
193 k_busy_wait(ctx->xfer.ce_sw_ctrl.delay); in mspi_context_ce_control()
195 k_busy_wait(ctx->xfer.ce_sw_ctrl.delay); in mspi_context_ce_control()
196 gpio_pin_set_dt(&ctx->xfer.ce_sw_ctrl.gpio, 0); in mspi_context_ce_control()
220 const struct mspi_xfer *xfer, in mspi_context_lock() argument
232 if (k_sem_take(&ctx->lock, K_MSEC(xfer->timeout))) { in mspi_context_lock()
235 if (ctx->xfer.async) { in mspi_context_lock()
[all …]
/Zephyr-latest/tests/bluetooth/mesh/blob_io_flash/src/
Dmain.c51 struct bt_mesh_blob_xfer xfer; in ZTEST() local
91 err = blob_flash_stream.io.open(&blob_flash_stream.io, &xfer, BT_MESH_BLOB_READ); in ZTEST()
106 err = blob_flash_stream.io.block_start(&blob_flash_stream.io, &xfer, &block); in ZTEST()
124 err = blob_flash_stream.io.rd(&blob_flash_stream.io, &xfer, &block, &chunk); in ZTEST()
143 err = blob_flash_stream.io.rd(&blob_flash_stream.io, &xfer, &block, &chunk); in ZTEST()
148 err = blob_flash_stream.io.rd(&blob_flash_stream.io, &xfer, &block, &chunk); in ZTEST()
153 err = blob_flash_stream.io.rd(&blob_flash_stream.io, &xfer, &block, &chunk); in ZTEST()
156 blob_flash_stream.io.close(&blob_flash_stream.io, &xfer); in ZTEST()
161 struct bt_mesh_blob_xfer xfer; in ZTEST() local
186 err = blob_flash_stream.io.open(&blob_flash_stream.io, &xfer, BT_MESH_BLOB_WRITE); in ZTEST()
[all …]
/Zephyr-latest/tests/bsim/bluetooth/mesh/src/
Dtest_blob.c62 const struct bt_mesh_blob_xfer *xfer, in blob_io_open() argument
75 const struct bt_mesh_blob_xfer *xfer, in blob_chunk_wr() argument
101 const struct bt_mesh_blob_xfer *xfer, in blob_chunk_rd() argument
111 const struct bt_mesh_blob_xfer *xfer, in blob_block_end() argument
138 struct bt_mesh_blob_xfer xfer; member
180 static void blob_cli_end(struct bt_mesh_blob_cli *b, const struct bt_mesh_blob_xfer *xfer, in blob_cli_end() argument
199 static int blob_srv_recover(struct bt_mesh_blob_srv *b, struct bt_mesh_blob_xfer *xfer, in blob_srv_recover() argument
207 struct bt_mesh_blob_xfer *xfer) in blob_srv_start() argument
925 blob_cli_xfer.xfer.mode = in test_cli_trans_complete()
927 blob_cli_xfer.xfer.size = CONFIG_BT_MESH_BLOB_BLOCK_SIZE_MIN * 4; in test_cli_trans_complete()
[all …]
/Zephyr-latest/drivers/dma/
Ddma_silabs_ldma.c110 desc->xfer.structReq = 1; in dma_silabs_block_to_descriptor()
124 desc->xfer.size = LOG2(src_size); in dma_silabs_block_to_descriptor()
136 desc->xfer.xferCnt = xfer_count; in dma_silabs_block_to_descriptor()
147 desc->xfer.blockSize = ret; in dma_silabs_block_to_descriptor()
152 desc->xfer.doneIfs = config->complete_callback_en; in dma_silabs_block_to_descriptor()
157 desc->xfer.reqMode = ldmaCtrlReqModeAll; in dma_silabs_block_to_descriptor()
159 desc->xfer.reqMode = ldmaCtrlReqModeBlock; in dma_silabs_block_to_descriptor()
162 desc->xfer.reqMode = ldmaCtrlReqModeAll; in dma_silabs_block_to_descriptor()
177 desc->xfer.srcInc = ldmaCtrlSrcIncNone; in dma_silabs_block_to_descriptor()
179 desc->xfer.srcInc = ldmaCtrlSrcIncOne; in dma_silabs_block_to_descriptor()
[all …]
Ddma_emul.c56 struct dma_emul_xfer_desc *xfer; member
102 return (enum dma_emul_channel_state)config->xfer[channel].config._reserved; in dma_emul_get_channel_state()
115 config->xfer[channel].config._reserved = state; in dma_emul_set_channel_state()
200 struct dma_emul_xfer_desc *xfer; in dma_emul_work_handler() local
210 xfer = &config->xfer[channel]; in dma_emul_work_handler()
215 memcpy(&xfer_config, &xfer->config, sizeof(xfer_config)); in dma_emul_work_handler()
218 LOG_DBG("processing xfer %p for channel %u", xfer, channel); in dma_emul_work_handler()
352 struct dma_emul_xfer_desc *xfer; in dma_emul_configure() local
361 xfer = &config->xfer[channel]; in dma_emul_configure()
374 memcpy(&xfer->config, xfer_config, sizeof(xfer->config)); in dma_emul_configure()
[all …]
/Zephyr-latest/subsys/bluetooth/mesh/shell/
Dblob.c26 const struct bt_mesh_blob_xfer *xfer, in blob_io_open() argument
35 const struct bt_mesh_blob_xfer *xfer, in blob_chunk_wr() argument
53 const struct bt_mesh_blob_xfer *xfer, in blob_chunk_rd() argument
80 struct bt_mesh_blob_xfer xfer; member
118 const struct bt_mesh_blob_xfer *xfer, bool success) in blob_cli_end() argument
182 struct bt_mesh_blob_xfer *xfer) in blob_srv_start() argument
304 blob_cli_xfer.xfer.id = shell_strtoul(argv[1], 0, &err); in cmd_tx()
305 blob_cli_xfer.xfer.size = shell_strtoul(argv[2], 0, &err); in cmd_tx()
306 blob_cli_xfer.xfer.block_size_log = shell_strtoul(argv[3], 0, &err); in cmd_tx()
307 blob_cli_xfer.xfer.chunk_size = shell_strtoul(argv[4], 0, &err); in cmd_tx()
[all …]
/Zephyr-latest/include/zephyr/drivers/usb/
Duhc.h189 struct uhc_transfer *xfer; member
299 struct uhc_transfer *const xfer);
301 struct uhc_transfer *const xfer);
451 struct uhc_transfer *const xfer);
465 struct uhc_transfer *const xfer,
503 int uhc_ep_enqueue(const struct device *dev, struct uhc_transfer *const xfer);
516 int uhc_ep_dequeue(const struct device *dev, struct uhc_transfer *const xfer);

123