Home
last modified time | relevance | path

Searched refs:rx_bufs (Results 1 – 25 of 76) sorted by relevance

1234

/Zephyr-latest/tests/boards/mec15xxevb_assy6853/qspi/src/
Dmain.c45 static struct spi_buf_set tx_bufs, rx_bufs; variable
84 rx_bufs.buffers = (const struct spi_buf *)&rxb; in ZTEST_USER()
85 rx_bufs.count = 1U; in ZTEST_USER()
90 (const struct spi_buf_set *)&rx_bufs); in ZTEST_USER()
116 rx_bufs.buffers = NULL; in ZTEST_USER()
117 rx_bufs.count = 0U; in ZTEST_USER()
122 (const struct spi_buf_set *)&rx_bufs); in ZTEST_USER()
136 rx_bufs.buffers = NULL; in ZTEST_USER()
137 rx_bufs.count = 0U; in ZTEST_USER()
142 (const struct spi_buf_set *)&rx_bufs); in ZTEST_USER()
[all …]
/Zephyr-latest/drivers/spi/
Dspi_handlers.c58 struct spi_buf_set *rx_bufs) in copy_bufs_and_transceive() argument
61 struct spi_buf rx_buf_copy[rx_bufs->count ? rx_bufs->count : 1]; in copy_bufs_and_transceive()
64 rx_bufs = copy_and_check(rx_bufs, rx_buf_copy, 1); in copy_bufs_and_transceive()
67 tx_bufs, rx_bufs); in copy_bufs_and_transceive()
73 const struct spi_buf_set *rx_bufs) in z_vrfy_spi_transceive() argument
94 if (rx_bufs) { in z_vrfy_spi_transceive()
96 (const struct spi_buf_set *)rx_bufs; in z_vrfy_spi_transceive()
98 K_OOPS(K_SYSCALL_MEMORY_READ(rx_bufs, in z_vrfy_spi_transceive()
Dspi_rtio.c132 const struct spi_buf_set *rx_bufs, in spi_rtio_copy() argument
137 size_t rx_count = rx_bufs ? rx_bufs->count : 0; in spi_rtio_copy()
150 tx_len = rx_bufs->buffers[rx].len; in spi_rtio_copy()
154 rx_buf = rx_bufs->buffers[rx].buf; in spi_rtio_copy()
155 rx_len = rx_bufs->buffers[rx].len; in spi_rtio_copy()
188 rx_buf = rx_bufs->buffers[rx].buf; in spi_rtio_copy()
189 rx_len = rx_bufs->buffers[rx].len; in spi_rtio_copy()
208 rx_buf = rx_bufs->buffers[rx].buf; in spi_rtio_copy()
209 rx_len = rx_bufs->buffers[rx].len; in spi_rtio_copy()
221 tx_buf = rx_bufs->buffers[rx].buf; in spi_rtio_copy()
[all …]
Dspi_dw.c293 static uint32_t spi_dw_compute_ndf(const struct spi_buf *rx_bufs, in spi_dw_compute_ndf() argument
298 for (; rx_count; rx_bufs++, rx_count--) { in spi_dw_compute_ndf()
299 if (len > (UINT16_MAX - rx_bufs->len)) { in spi_dw_compute_ndf()
303 len += rx_bufs->len; in spi_dw_compute_ndf()
336 const struct spi_buf_set *rx_bufs, in transceive() argument
362 if (!rx_bufs || !rx_bufs->buffers) { in transceive()
372 reg_data = spi_dw_compute_ndf(rx_bufs->buffers, in transceive()
373 rx_bufs->count, in transceive()
402 spi_context_buffers_setup(&spi->ctx, tx_bufs, rx_bufs, spi->dfs); in transceive()
427 reg_data = !rx_bufs ? in transceive()
[all …]
Dspi_test.c21 const struct spi_buf_set *rx_bufs) in vnd_spi_transceive() argument
30 const struct spi_buf_set *rx_bufs, in vnd_spi_transceive_async() argument
Dspi_nrfx_spis.c167 const struct spi_buf_set *rx_bufs, in transceive() argument
175 const struct spi_buf *rx_buf = rx_bufs ? rx_bufs->buffers : NULL; in transceive()
184 (rx_bufs && rx_bufs->count > 1)) { in transceive()
236 const struct spi_buf_set *rx_bufs) in spi_nrfx_transceive() argument
238 return transceive(dev, spi_cfg, tx_bufs, rx_bufs, false, NULL, NULL); in spi_nrfx_transceive()
245 const struct spi_buf_set *rx_bufs, in spi_nrfx_transceive_async() argument
249 return transceive(dev, spi_cfg, tx_bufs, rx_bufs, true, cb, userdata); in spi_nrfx_transceive_async()
Dspi_sam0.c268 const struct spi_buf_set *rx_bufs) in spi_sam0_fast_transceive() argument
282 if (rx_bufs) { in spi_sam0_fast_transceive()
283 rx = rx_bufs->buffers; in spi_sam0_fast_transceive()
284 rx_count = rx_bufs->count; in spi_sam0_fast_transceive()
321 const struct spi_buf_set *rx_bufs) in spi_sam0_is_regular() argument
333 if (rx_bufs) { in spi_sam0_is_regular()
334 rx = rx_bufs->buffers; in spi_sam0_is_regular()
335 rx_count = rx_bufs->count; in spi_sam0_is_regular()
355 const struct spi_buf_set *rx_bufs) in spi_sam0_transceive() argument
376 if (spi_sam0_is_regular(tx_bufs, rx_bufs)) { in spi_sam0_transceive()
[all …]
Dspi_xec_qmspi_ldma.c442 const struct spi_buf_set *rx_bufs) in qmspi_xfr_cm_init() argument
460 if (tx_bufs && rx_bufs) { in qmspi_xfr_cm_init()
614 const struct spi_buf_set *rx_bufs) in qmspi_xfr_sync() argument
622 int ret = qmspi_xfr_cm_init(dev, tx_bufs, rx_bufs); in qmspi_xfr_sync()
675 const struct spi_buf_set *rx_bufs) in qmspi_xfr_start_async() argument
682 ret = qmspi_xfr_cm_init(dev, tx_bufs, rx_bufs); in qmspi_xfr_start_async()
704 const struct spi_buf_set *rx_bufs) in qmspi_xfr_async() argument
712 err = qmspi_xfr_start_async(dev, tx_bufs, rx_bufs); in qmspi_xfr_async()
722 const struct spi_buf_set *rx_bufs, in qmspi_transceive() argument
735 if (!tx_bufs && !rx_bufs) { in qmspi_transceive()
[all …]
Dspi_b91.c129 const struct spi_buf_set *rx_bufs) in spi_b91_get_txrx_len() argument
134 const struct spi_buf *rx_buf = rx_bufs->buffers; in spi_b91_get_txrx_len()
143 for (int i = 0; i < rx_bufs->count; i++) { in spi_b91_get_txrx_len()
384 const struct spi_buf_set *rx_bufs) in spi_b91_transceive() argument
388 uint32_t txrx_len = spi_b91_get_txrx_len(tx_bufs, rx_bufs); in spi_b91_transceive()
398 spi_context_buffers_setup(&data->ctx, tx_bufs, rx_bufs, 1); in spi_b91_transceive()
425 const struct spi_buf_set *rx_bufs, in spi_b91_transceive_async() argument
432 ARG_UNUSED(rx_bufs); in spi_b91_transceive_async()
Dspi_sam.c528 const struct spi_buf_set *rx_bufs) in spi_sam_fast_transceive() argument
542 if (rx_bufs) { in spi_sam_fast_transceive()
543 rx = rx_bufs->buffers; in spi_sam_fast_transceive()
544 rx_count = rx_bufs->count; in spi_sam_fast_transceive()
616 const struct spi_buf_set *rx_bufs) in spi_sam_is_regular() argument
628 if (rx_bufs) { in spi_sam_is_regular()
629 rx = rx_bufs->buffers; in spi_sam_is_regular()
630 rx_count = rx_bufs->count; in spi_sam_is_regular()
740 const struct spi_buf_set *rx_bufs) in spi_sam_transceive() argument
750 err = spi_rtio_transceive(rtio_ctx, config, tx_bufs, rx_bufs); in spi_sam_transceive()
[all …]
Dspi_bitbang.c72 const struct spi_buf_set *rx_bufs) in spi_bitbang_transceive() argument
93 if (tx_bufs && rx_bufs) { in spi_bitbang_transceive()
96 } else if (tx_bufs && !rx_bufs) { in spi_bitbang_transceive()
99 } else if (!tx_bufs && rx_bufs) { in spi_bitbang_transceive()
122 spi_context_buffers_setup(ctx, tx_bufs, rx_bufs, data->dfs); in spi_bitbang_transceive()
238 const struct spi_buf_set *rx_bufs, in spi_bitbang_transceive_async() argument
Dspi_emul.c68 const struct spi_buf_set *tx_bufs, const struct spi_buf_set *rx_bufs) in spi_emul_io() argument
84 ret = emul->mock_api->io(emul->target, config, tx_bufs, rx_bufs); in spi_emul_io()
90 return api->io(emul->target, config, tx_bufs, rx_bufs); in spi_emul_io()
Dspi_npcx_spip.c254 const struct spi_buf_set *tx_bufs, const struct spi_buf_set *rx_bufs, in transceive() argument
263 if (!tx_bufs && !rx_bufs) { in transceive()
282 spi_context_buffers_setup(ctx, tx_bufs, rx_bufs, data->bytes_per_frame); in transceive()
326 const struct spi_buf_set *rx_bufs) in spi_npcx_spip_transceive() argument
328 return transceive(dev, spi_cfg, tx_bufs, rx_bufs, false, NULL, NULL); in spi_npcx_spip_transceive()
335 const struct spi_buf_set *rx_bufs, spi_callback_t cb, in spi_npcx_spip_transceive_async() argument
338 return transceive(dev, spi_cfg, tx_bufs, rx_bufs, true, cb, userdata); in spi_npcx_spip_transceive_async()
Dspi_xmc4xxx.c261 const struct spi_buf_set *rx_bufs, in spi_xmc4xxx_transceive() argument
269 if (!tx_bufs && !rx_bufs) { in spi_xmc4xxx_transceive()
290 spi_context_buffers_setup(ctx, tx_bufs, rx_bufs, 1); in spi_xmc4xxx_transceive()
318 const struct spi_buf_set *rx_bufs, in spi_xmc4xxx_transceive_async() argument
322 return spi_xmc4xxx_transceive(dev, spi_cfg, tx_bufs, rx_bufs, true, cb, userdata); in spi_xmc4xxx_transceive_async()
348 const struct spi_buf_set *rx_bufs, in spi_xmc4xxx_transceive_dma() argument
359 if (!tx_bufs && !rx_bufs) { in spi_xmc4xxx_transceive_dma()
380 spi_context_buffers_setup(ctx, tx_bufs, rx_bufs, 1); in spi_xmc4xxx_transceive_dma()
484 const struct spi_buf_set *rx_bufs) in spi_xmc4xxx_transceive_sync() argument
490 return spi_xmc4xxx_transceive_dma(dev, spi_cfg, tx_bufs, rx_bufs, false, NULL, in spi_xmc4xxx_transceive_sync()
[all …]
Dspi_ifx_cat1.c236 const struct spi_buf_set *tx_bufs, const struct spi_buf_set *rx_bufs, in transceive() argument
251 spi_context_buffers_setup(ctx, tx_bufs, rx_bufs, data->dfs_value); in transceive()
266 const struct spi_buf_set *rx_bufs) in ifx_cat1_spi_transceive_sync() argument
268 return transceive(dev, spi_cfg, tx_bufs, rx_bufs, false, NULL, NULL); in ifx_cat1_spi_transceive_sync()
274 const struct spi_buf_set *rx_bufs, spi_callback_t cb, in ifx_cat1_spi_transceive_async() argument
277 return transceive(dev, spi_cfg, tx_bufs, rx_bufs, true, cb, userdata); in ifx_cat1_spi_transceive_async()
Dspi_mcux_ecspi.c224 const struct spi_buf_set *rx_bufs, in transceive() argument
239 spi_context_buffers_setup(&data->ctx, tx_bufs, rx_bufs, data->dfs); in transceive()
254 const struct spi_buf_set *rx_bufs) in spi_mcux_transceive() argument
256 return transceive(dev, spi_cfg, tx_bufs, rx_bufs, false, NULL, NULL); in spi_mcux_transceive()
263 const struct spi_buf_set *rx_bufs, in spi_mcux_transceive_async() argument
267 return transceive(dev, spi_cfg, tx_bufs, rx_bufs, true, cb, userdata); in spi_mcux_transceive_async()
Dspi_rv32m1_lpspi.c215 const struct spi_buf_set *rx_bufs, in transceive() argument
230 spi_context_buffers_setup(&data->ctx, tx_bufs, rx_bufs, 1); in transceive()
246 const struct spi_buf_set *rx_bufs) in spi_mcux_transceive() argument
248 return transceive(dev, spi_cfg, tx_bufs, rx_bufs, false, NULL, NULL); in spi_mcux_transceive()
255 const struct spi_buf_set *rx_bufs, in spi_mcux_transceive_async() argument
259 return transceive(dev, spi_cfg, tx_bufs, rx_bufs, true, cb, userdata); in spi_mcux_transceive_async()
Dspi_ll_stm32.c752 const struct spi_buf_set *rx_bufs) in spi_stm32_count_total_frames() argument
760 int rx_frames = spi_stm32_count_bufset_frames(config, rx_bufs); in spi_stm32_count_total_frames()
777 const struct spi_buf_set *rx_bufs, in transceive() argument
787 if (!tx_bufs && !rx_bufs) { in transceive()
808 spi_context_buffers_setup(&data->ctx, tx_bufs, rx_bufs, 1); in transceive()
810 spi_context_buffers_setup(&data->ctx, tx_bufs, rx_bufs, 2); in transceive()
816 config, tx_bufs, rx_bufs); in transceive()
863 if (rx_bufs) { in transceive()
970 const struct spi_buf_set *rx_bufs, in transceive_dma() argument
981 if (!tx_bufs && !rx_bufs) { in transceive_dma()
[all …]
Dspi_mcux_lpspi.c485 const struct spi_buf_set *tx_bufs, const struct spi_buf_set *rx_bufs, in transceive_dma() argument
510 spi_context_buffers_setup(&data->ctx, tx_bufs, rx_bufs, 1); in transceive_dma()
634 const struct spi_buf_set *rx_bufs) in transceive_rtio() argument
642 ret = spi_rtio_transceive(rtio_ctx, spi_cfg, tx_bufs, rx_bufs); in transceive_rtio()
653 const struct spi_buf_set *tx_bufs, const struct spi_buf_set *rx_bufs, in transceive() argument
669 spi_context_buffers_setup(&data->ctx, tx_bufs, rx_bufs, 1); in transceive()
686 const struct spi_buf_set *tx_bufs, const struct spi_buf_set *rx_bufs, in spi_mcux_transceive() argument
692 return transceive_dma(dev, spi_cfg, tx_bufs, rx_bufs, async, cb, userdata); in spi_mcux_transceive()
696 return transceive_rtio(dev, spi_cfg, tx_bufs, rx_bufs); in spi_mcux_transceive()
699 return transceive(dev, spi_cfg, tx_bufs, rx_bufs, async, cb, userdata); in spi_mcux_transceive()
[all …]
/Zephyr-latest/tests/drivers/spi/spi_loopback/src/
Dspi.c117 struct spi_buf rx_bufs[2]; in spi_complete_multiple() local
119 .buffers = rx_bufs, in spi_complete_multiple()
120 .count = ARRAY_SIZE(rx_bufs) in spi_complete_multiple()
123 rx_bufs[0].buf = buffer_rx; in spi_complete_multiple()
124 rx_bufs[0].len = BUF_SIZE; in spi_complete_multiple()
126 rx_bufs[1].buf = buffer2_rx; in spi_complete_multiple()
127 rx_bufs[1].len = BUF2_SIZE; in spi_complete_multiple()
171 const struct spi_buf rx_bufs[] = { in spi_complete_loop() local
182 .buffers = rx_bufs, in spi_complete_loop()
183 .count = ARRAY_SIZE(rx_bufs) in spi_complete_loop()
[all …]
/Zephyr-latest/include/zephyr/drivers/
Dspi.h590 const struct spi_buf_set *rx_bufs) in spi_transceive_stats() argument
604 if (rx_bufs) { in spi_transceive_stats()
605 rx_bytes = rx_bufs->count ? rx_bufs->buffers->len : 0; in spi_transceive_stats()
626 #define spi_transceive_stats(dev, error, tx_bufs, rx_bufs) argument
649 const struct spi_buf_set *rx_bufs);
668 const struct spi_buf_set *rx_bufs,
773 const struct spi_buf_set *rx_bufs);
778 const struct spi_buf_set *rx_bufs) in z_impl_spi_transceive() argument
784 ret = api->transceive(dev, config, tx_bufs, rx_bufs); in z_impl_spi_transceive()
785 spi_transceive_stats(dev, ret, tx_bufs, rx_bufs); in z_impl_spi_transceive()
[all …]
/Zephyr-latest/tests/drivers/sensor/bmi160/src/
Dspi.c20 const struct spi_buf_set *tx_bufs, const struct spi_buf_set *rx_bufs) in mock_spi_io() argument
25 bmi160_spi_is_touching_reg(tx_bufs, rx_bufs, mock_spi_io_fail_reg_number)) { in mock_spi_io()
/Zephyr-latest/include/zephyr/drivers/spi/
Drtio.h59 const struct spi_buf_set *rx_bufs,
99 const struct spi_buf_set *rx_bufs);
/Zephyr-latest/drivers/eeprom/
Deeprom_mb85rsxx.c92 const struct spi_buf rx_bufs[2] = { in eeprom_mb85rsxx_read() local
103 .buffers = rx_bufs, in eeprom_mb85rsxx_read()
104 .count = ARRAY_SIZE(rx_bufs), in eeprom_mb85rsxx_read()
240 const struct spi_buf rx_bufs[2] = { in eeprom_mb85rsxx_rdid() local
251 .buffers = rx_bufs, in eeprom_mb85rsxx_rdid()
252 .count = ARRAY_SIZE(rx_bufs), in eeprom_mb85rsxx_rdid()
/Zephyr-latest/samples/drivers/espi/src/
Dmain.c202 struct spi_buf_set rx_bufs; in spi_saf_init() local
236 rx_bufs.buffers = (const struct spi_buf *)&rxb; in spi_saf_init()
237 rx_bufs.count = 1U; in spi_saf_init()
241 (const struct spi_buf_set *)&rx_bufs); in spi_saf_init()
265 rx_bufs.buffers = (const struct spi_buf *)&rxb; in spi_saf_init()
266 rx_bufs.count = 1U; in spi_saf_init()
270 (const struct spi_buf_set *)&rx_bufs); in spi_saf_init()
293 rx_bufs.buffers = NULL; in spi_saf_init()
294 rx_bufs.count = 0U; in spi_saf_init()
298 (const struct spi_buf_set *)&rx_bufs); in spi_saf_init()
[all …]

1234