/Zephyr-latest/include/zephyr/devicetree/ |
D | spi.h | 117 #define DT_SPI_DEV_HAS_CS_GPIOS(spi_dev) DT_SPI_HAS_CS_GPIOS(DT_BUS(spi_dev)) argument 150 #define DT_SPI_DEV_CS_GPIOS_CTLR(spi_dev) \ argument 151 DT_GPIO_CTLR_BY_IDX(DT_BUS(spi_dev), cs_gpios, DT_REG_ADDR_RAW(spi_dev)) 183 #define DT_SPI_DEV_CS_GPIOS_PIN(spi_dev) \ argument 184 DT_GPIO_PIN_BY_IDX(DT_BUS(spi_dev), cs_gpios, DT_REG_ADDR_RAW(spi_dev)) 211 #define DT_SPI_DEV_CS_GPIOS_FLAGS(spi_dev) \ argument 212 DT_GPIO_FLAGS_BY_IDX(DT_BUS(spi_dev), cs_gpios, DT_REG_ADDR_RAW(spi_dev))
|
/Zephyr-latest/tests/boards/mec172xevb_assy6906/qspi/src/ |
D | main.c | 47 static const struct device *const spi_dev = DEVICE_DT_GET(DT_NODELABEL(spi0)); variable 77 zassert_true(device_is_ready(spi_dev), "SPI controller device is not ready"); in spi_single_init() 146 ret = spi_transceive(spi_dev, &spi_cfg_single, &txset, &rxset); in spi_flash_read_status() 176 ret = spi_transceive(spi_dev, &spi_cfg_single, &txset, NULL); in spi_flash_write_status() 199 ret = spi_transceive(spi_dev, &spi_cfg_single, &txset, NULL); in spi_flash_tx_one_byte_cmd() 237 ret = spi_transceive(spi_dev, &spi_cfg_single, &txset, &rxset); in ZTEST_USER() 261 ret = spi_flash_tx_one_byte_cmd(spi_dev, SPI_WRITE_ENABLE); in ZTEST_USER() 276 ret = spi_transceive(spi_dev, &spi_cfg_single, &txset, NULL); in ZTEST_USER() 282 ret = spi_flash_read_status(spi_dev, SPI_READ_STATUS1, &spi_status); in ZTEST_USER() 302 ret = spi_flash_tx_one_byte_cmd(spi_dev, SPI_WRITE_ENABLE); in test_spi_single_write() [all …]
|
/Zephyr-latest/tests/boards/mec15xxevb_assy6853/qspi/src/ |
D | main.c | 44 static const struct device *const spi_dev = DEVICE_DT_GET(DT_NODELABEL(spi0)); variable 57 zassert_true(device_is_ready(spi_dev), "SPI controller device is not ready"); in spi_single_init() 87 ret = spi_transceive(spi_dev, in ZTEST_USER() 119 ret = spi_transceive(spi_dev, in ZTEST_USER() 139 ret = spi_transceive(spi_dev, in ZTEST_USER() 164 ret = spi_transceive(spi_dev, in ZTEST_USER() 195 ret = spi_transceive(spi_dev, in test_spi_single_write() 216 ret = spi_transceive(spi_dev, in test_spi_single_write() 264 ret = spi_transceive(spi_dev, in ZTEST_USER() 283 zassert_true(device_is_ready(spi_dev), "SPI controller device is not ready"); in spi_dual_init() [all …]
|
/Zephyr-latest/drivers/sdhc/ |
D | sdhc_spi.c | 93 const struct device *spi_dev; member 108 static int sdhc_spi_rx(const struct device *spi_dev, struct spi_config *spi_cfg, in sdhc_spi_rx() argument 140 return spi_transceive(spi_dev, spi_cfg, tx_ptr, &rx); in sdhc_spi_rx() 160 if (pm_device_runtime_get(config->spi_dev) < 0) { in sdhc_spi_init_card() 166 ret = sdhc_spi_rx(config->spi_dev, spi_cfg, data->scratch, 10); in sdhc_spi_init_card() 169 ret2 = spi_release(config->spi_dev, spi_cfg); in sdhc_spi_init_card() 173 (void)pm_device_runtime_put(config->spi_dev); in sdhc_spi_init_card() 187 ret = sdhc_spi_rx(config->spi_dev, data->spi_cfg, &response, 1); in sdhc_spi_card_busy() 210 ret = sdhc_spi_rx(config->spi_dev, data->spi_cfg, &response, 1); in sdhc_spi_wait_unbusy() 251 ret = sdhc_spi_rx(config->spi_dev, dev_data->spi_cfg, in sdhc_spi_response_get() [all …]
|
/Zephyr-latest/drivers/mipi_dbi/ |
D | mipi_dbi_spi.c | 20 const struct device *spi_dev; member 95 ret = spi_write(config->spi_dev, &dbi_config->config, &buf_set); in mipi_dbi_spi_write_helper_3wire() 103 ret = spi_write(config->spi_dev, &dbi_config->config, &buf_set); in mipi_dbi_spi_write_helper_3wire() 140 ret = spi_write(config->spi_dev, &dbi_config->config, &buf_set); in mipi_dbi_spi_write_helper_4wire_8bit() 152 ret = spi_write(config->spi_dev, &dbi_config->config, &buf_set); in mipi_dbi_spi_write_helper_4wire_8bit() 193 ret = spi_write(config->spi_dev, &dbi_config->config, in mipi_dbi_spi_write_helper_4wire_16bit() 208 ret = spi_write(config->spi_dev, &dbi_config->config, in mipi_dbi_spi_write_helper_4wire_16bit() 227 ret = spi_write(config->spi_dev, &dbi_config->config, in mipi_dbi_spi_write_helper_4wire_16bit() 240 ret = spi_write(config->spi_dev, &dbi_config->config, in mipi_dbi_spi_write_helper_4wire_16bit() 367 ret = spi_write(config->spi_dev, &tmp_config, &buf_set); in mipi_dbi_spi_read_helper_3wire() [all …]
|
D | mipi_dbi_smartbond.c | 35 DT_INST_NODE_HAS_PROP(0, spi_dev) 238 const struct device *spi_dev = DEVICE_DT_GET(DT_INST_PHANDLE(0, spi_dev)); in mipi_dbi_smartbond_command_read() local 249 if (!device_is_ready(spi_dev)) { in mipi_dbi_smartbond_command_read() 263 ret = spi_read(spi_dev, &dbi_config->config, &buf_set); in mipi_dbi_smartbond_command_read()
|
/Zephyr-latest/samples/boards/microchip/mec172xevb_assy6906/qmspi_ldma/src/ |
D | main.c | 75 static const struct device *spi_dev = DEVICE_DT_GET(SPI0_NODE); variable 179 err = spi_flash_read_status(spi_dev, spi_cfg, SPI_FLASH_READ_STATUS1_OPCODE, in spi_poll_busy() 448 if (!device_is_ready(spi_dev)) { in main() 458 err = spi_flash_read_fd_sync(spi_dev, &spi_cfg, NULL, (uint8_t *)&jedec_id, 3u, in main() 478 err = spi_flash_read_status(spi_dev, &spi_cfg, SPI_FLASH_READ_STATUS1_OPCODE, in main() 488 err = spi_flash_read_status(spi_dev, &spi_cfg, SPI_FLASH_READ_STATUS2_OPCODE, in main() 518 err = spi_flash_fd_wr_cpd(spi_dev, &spi_cfg, SPI_FLASH_WRITE_ENABLE_OPCODE, in main() 526 err = spi_flash_erase_region(spi_dev, &spi_cfg, SPI_FLASH_ERASE_SECTOR_OPCODE, in main() 543 err = spi_flash_read_fd_sync(spi_dev, &spi_cfg, &spi_addr, &tb1.b[0], in main() 584 err = spi_flash_fd_wr_cpd(spi_dev, &spi_cfg, SPI_FLASH_WRITE_ENABLE_OPCODE, in main() [all …]
|
/Zephyr-latest/samples/boards/nordic/nrfx_prs/src/ |
D | main.c | 296 static bool background_transfer(const struct device *spi_dev) in background_transfer() argument 326 printk("-- Background transfer on \"%s\" --\n", spi_dev->name); in background_transfer() 328 ret = spi_transceive(spi_dev, &spi_dev_cfg, &tx, &rx); in background_transfer() 348 const struct device *const spi_dev = DEVICE_DT_GET(SPI_DEV_NODE); in main() local 350 if (!device_is_ready(spi_dev)) { in main() 351 printk("%s is not ready\n", spi_dev->name); in main() 380 if (!background_transfer(spi_dev)) { in main()
|
/Zephyr-latest/drivers/espi/ |
D | espi_taf_npcx.c | 21 static const struct device *const spi_dev = DEVICE_DT_GET(DT_ALIAS(taf_flash)); variable 236 if (!device_is_ready(spi_dev)) { in espi_taf_npcx_channel_ready() 365 rc = flash_read(spi_dev, addr, npcx_espi_taf_data.read_buf, len); in espi_taf_npcx_flash_read() 405 rc = flash_write(spi_dev, pckt->flash_addr, data_ptr, pckt->len); in espi_taf_npcx_flash_write() 441 rc = flash_erase(spi_dev, addr, len); in espi_taf_npcx_flash_erase() 470 rc = flash_ex_op(spi_dev, FLASH_NPCX_EX_OP_EXEC_UMA, (uintptr_t)&op_in, NULL); in espi_taf_npcx_rpmc_op1() 507 rc = flash_ex_op(spi_dev, FLASH_NPCX_EX_OP_EXEC_UMA, (uintptr_t)&op_in, &op_out); in espi_taf_npcx_rpmc_op2()
|
/Zephyr-latest/drivers/spi/ |
D | spi_andes_atcspi200.c | 256 const struct device *spi_dev = (struct device *)user_data; in dma_rx_callback() local 257 struct spi_atcspi200_data *data = spi_dev->data; in dma_rx_callback() 262 spi_rx_dma_disable(spi_dev); in dma_rx_callback() 265 if (spi_dma_rx_load(spi_dev) != 0) { in dma_rx_callback() 268 spi_rx_dma_enable(spi_dev); in dma_rx_callback() 277 const struct device *spi_dev = (struct device *)user_data; in dma_tx_callback() local 278 struct spi_atcspi200_data *data = spi_dev->data; in dma_tx_callback() 283 spi_tx_dma_disable(spi_dev); in dma_tx_callback() 286 if (spi_dma_tx_load(spi_dev) != 0) { in dma_tx_callback() 289 spi_tx_dma_enable(spi_dev); in dma_tx_callback()
|
D | spi_mcux_flexcomm.c | 306 const struct device *spi_dev = arg; in spi_mcux_dma_callback() local 307 struct spi_mcux_data *data = spi_dev->data; in spi_mcux_dma_callback() 330 spi_context_complete(&data->ctx, spi_dev, 0); in spi_mcux_dma_callback()
|
D | spi_mcux_lpspi.c | 237 const struct device *spi_dev = arg; in spi_mcux_dma_callback() local 238 struct spi_mcux_data *data = (struct spi_mcux_data *)spi_dev->data; in spi_mcux_dma_callback() 279 spi_context_complete(&data->ctx, spi_dev, 0); in spi_mcux_dma_callback()
|
D | spi_max32.c | 434 const struct device *spi_dev = data->dev; in spi_max32_dma_callback() local 435 const struct max32_spi_config *config = spi_dev->config; in spi_max32_dma_callback() 452 spi_context_complete(&data->ctx, spi_dev, status == 0 ? 0 : -EIO); in spi_max32_dma_callback()
|
/Zephyr-latest/include/zephyr/drivers/ |
D | spi.h | 212 #define SPI_CS_GPIOS_DT_SPEC_GET(spi_dev) \ argument 213 GPIO_DT_SPEC_GET_BY_IDX_OR(DT_BUS(spi_dev), cs_gpios, \ 214 DT_REG_ADDR_RAW(spi_dev), {})
|
D | mipi_dbi.h | 65 spi_dev), cs_gpios, \
|
/Zephyr-latest/doc/releases/ |
D | migration-guide-3.6.rst | 144 * - ``DT_SPI_DEV_CS_GPIOS_LABEL(spi_dev)`` 145 - ``DT_PROP(DT_SPI_DEV_CS_GPIOS_CTLR(spi_dev), label)``
|