Home
last modified time | relevance | path

Searched refs:spi (Results 1 – 25 of 1465) sorted by relevance

12345678910>>...59

/Zephyr-latest/drivers/spi/
Dspi_ll_stm32.h23 SPI_TypeDef *spi; member
75 static inline uint32_t ll_func_dma_get_reg_addr(SPI_TypeDef *spi, uint32_t location) in ll_func_dma_get_reg_addr() argument
80 return (uint32_t)&(spi->TXDR); in ll_func_dma_get_reg_addr()
83 return (uint32_t)&(spi->RXDR); in ll_func_dma_get_reg_addr()
86 return (uint32_t)LL_SPI_DMA_GetRegAddr(spi); in ll_func_dma_get_reg_addr()
91 static inline uint32_t ll_func_spi_dma_busy(SPI_TypeDef *spi) in ll_func_spi_dma_busy() argument
94 return LL_SPI_IsActiveFlag_TXC(spi); in ll_func_spi_dma_busy()
97 return (LL_SPI_IsActiveFlag_TXE(spi) && in ll_func_spi_dma_busy()
98 !LL_SPI_IsActiveFlag_BSY(spi)); in ll_func_spi_dma_busy()
103 static inline uint32_t ll_func_tx_is_not_full(SPI_TypeDef *spi) in ll_func_tx_is_not_full() argument
[all …]
DKconfig75 module-str = spi
79 source "drivers/spi/Kconfig.ambiq"
80 source "drivers/spi/Kconfig.andes_atcspi200"
81 source "drivers/spi/Kconfig.b91"
82 source "drivers/spi/Kconfig.bitbang"
83 source "drivers/spi/Kconfig.cc13xx_cc26xx"
84 source "drivers/spi/Kconfig.dw"
85 source "drivers/spi/Kconfig.esp32"
86 source "drivers/spi/Kconfig.gd32"
87 source "drivers/spi/Kconfig.gecko_eusart"
[all …]
Dspi_dw.c44 static inline bool spi_dw_is_slave(struct spi_dw_data *spi) in spi_dw_is_slave() argument
47 spi_context_is_slave(&spi->ctx)); in spi_dw_is_slave()
52 struct spi_dw_data *spi = dev->data; in completed() local
53 struct spi_context *ctx = &spi->ctx; in completed()
59 if (spi_context_tx_on(&spi->ctx) || in completed()
60 spi_context_rx_on(&spi->ctx)) { in completed()
74 if (!spi_dw_is_slave(spi)) { in completed()
85 spi_context_complete(&spi->ctx, dev, error); in completed()
91 struct spi_dw_data *spi = dev->data; in push_data() local
95 if (spi_context_rx_on(&spi->ctx)) { in push_data()
[all …]
Dspi_pw.c45 static bool is_spi_transfer_ongoing(struct spi_pw_data *spi) in is_spi_transfer_ongoing() argument
47 return spi_context_tx_on(&spi->ctx) || spi_context_rx_on(&spi->ctx); in is_spi_transfer_ongoing()
146 struct spi_pw_data *spi = dev->data; in spi_pw_cs_ctrl_enable() local
149 if (spi->cs_mode == CS_SW_MODE) { in spi_pw_cs_ctrl_enable()
151 } else if (spi->cs_mode == CS_GPIO_MODE) { in spi_pw_cs_ctrl_enable()
152 spi_context_cs_control(&spi->ctx, true); in spi_pw_cs_ctrl_enable()
155 if (spi->cs_mode == CS_SW_MODE) { in spi_pw_cs_ctrl_enable()
157 } else if (spi->cs_mode == CS_GPIO_MODE) { in spi_pw_cs_ctrl_enable()
158 spi_context_cs_control(&spi->ctx, false); in spi_pw_cs_ctrl_enable()
166 struct spi_pw_data *spi = dev->data; in spi_pw_cs_ctrl_init() local
[all …]
Dspi_ll_stm32.c191 blk_cfg->dest_address = ll_func_dma_get_reg_addr(cfg->spi, SPI_STM32_DMA_TX); in spi_stm32_dma_tx_load()
250 blk_cfg->source_address = ll_func_dma_get_reg_addr(cfg->spi, SPI_STM32_DMA_RX); in spi_stm32_dma_rx_load()
301 static void spi_stm32_send_next_frame(SPI_TypeDef *spi, in spi_stm32_send_next_frame() argument
311 LL_SPI_TransmitData8(spi, tx_frame); in spi_stm32_send_next_frame()
317 LL_SPI_TransmitData16(spi, tx_frame); in spi_stm32_send_next_frame()
322 static void spi_stm32_read_next_frame(SPI_TypeDef *spi, in spi_stm32_read_next_frame() argument
329 rx_frame = LL_SPI_ReceiveData8(spi); in spi_stm32_read_next_frame()
335 rx_frame = LL_SPI_ReceiveData16(spi); in spi_stm32_read_next_frame()
348 static int spi_stm32_get_err(SPI_TypeDef *spi) in spi_stm32_get_err() argument
350 uint32_t sr = LL_SPI_ReadReg(spi, SR); in spi_stm32_get_err()
[all …]
Dspi_sedi.c98 struct spi_sedi_data *spi = dev->data; in transceive() local
99 struct spi_context *ctx = &spi->ctx; in transceive()
107 spi_context_lock(&spi->ctx, asynchronous, cb, userdata, config); in transceive()
119 spi->tx_data_updated = false; in transceive()
120 spi->rx_data_updated = false; in transceive()
122 spi_context_buffers_setup(&spi->ctx, tx_bufs, rx_bufs, 1); in transceive()
129 spi->tx_dummy_len = 0; in transceive()
134 spi->rx_dummy_len = dummy_len; in transceive()
136 spi->rx_dummy_len = 0; in transceive()
141 spi->tx_dummy_len = dummy_len; in transceive()
[all …]
Dspi_numaker.c26 SPI_T *spi; member
77 SPI_ClearRxFIFO(dev_cfg->spi); in spi_numaker_configure()
78 SPI_ClearTxFIFO(dev_cfg->spi); in spi_numaker_configure()
88 QSPI_Open((QSPI_T *)dev_cfg->spi, in spi_numaker_configure()
94 SPI_Open(dev_cfg->spi, in spi_numaker_configure()
103 SPI_SET_LSB_FIRST(dev_cfg->spi); in spi_numaker_configure()
105 SPI_SET_MSB_FIRST(dev_cfg->spi); in spi_numaker_configure()
111 SPI_ENABLE_3WIRE_MODE(dev_cfg->spi); in spi_numaker_configure()
114 SPI_DISABLE_3WIRE_MODE(dev_cfg->spi); in spi_numaker_configure()
119 SPI_SET_SS_HIGH(dev_cfg->spi); in spi_numaker_configure()
[all …]
/Zephyr-latest/tests/drivers/build_all/sensor/
Dspi.dtsi6 * Application overlay for spi devices
16 spi-max-frequency = <0>;
23 spi-max-frequency = <0>;
30 spi-max-frequency = <0>;
36 spi-max-frequency = <0>;
43 spi-max-frequency = <0>;
49 spi-max-frequency = <0>;
56 spi-max-frequency = <0>;
63 spi-max-frequency = <0>;
70 spi-max-frequency = <0>;
[all …]
/Zephyr-latest/drivers/sensor/tdk/icm42605/
Dicm42605_setup.c23 result = inv_spi_read(&cfg->spi, REG_ACCEL_CONFIG0, &databuf, 1); in icm42605_set_fs()
31 result = inv_spi_single_write(&cfg->spi, REG_ACCEL_CONFIG0, &databuf); in icm42605_set_fs()
33 result = inv_spi_read(&cfg->spi, REG_GYRO_CONFIG0, &databuf, 1); in icm42605_set_fs()
42 result = inv_spi_single_write(&cfg->spi, REG_GYRO_CONFIG0, &databuf); in icm42605_set_fs()
63 result = inv_spi_read(&cfg->spi, REG_ACCEL_CONFIG0, &databuf, 1); in icm42605_set_odr()
99 result = inv_spi_single_write(&cfg->spi, REG_ACCEL_CONFIG0, &databuf); in icm42605_set_odr()
107 result = inv_spi_read(&cfg->spi, REG_GYRO_CONFIG0, &databuf, 1); in icm42605_set_odr()
139 result = inv_spi_single_write(&cfg->spi, REG_GYRO_CONFIG0, &databuf); in icm42605_set_odr()
153 result = inv_spi_read(&cfg->spi, REG_WHO_AM_I, &v, 1); in icm42605_sensor_init()
161 result = inv_spi_read(&cfg->spi, REG_DEVICE_CONFIG, &v, 1); in icm42605_sensor_init()
[all …]
/Zephyr-latest/samples/drivers/spi_fujitsu_fram/src/
Dmain.c25 static int mb85rs64v_access(const struct device *spi, in mb85rs64v_access() argument
58 return spi_transceive(spi, spi_cfg, &tx, &rx); in mb85rs64v_access()
64 return spi_write(spi, spi_cfg, &tx); in mb85rs64v_access()
68 static int mb85rs64v_read_id(const struct device *spi, in mb85rs64v_read_id() argument
74 err = mb85rs64v_access(spi, spi_cfg, in mb85rs64v_read_id()
100 static int write_bytes(const struct device *spi, struct spi_config *spi_cfg, in write_bytes() argument
106 err = mb85rs64v_access(spi, spi_cfg, in write_bytes()
114 err = mb85rs64v_access(spi, spi_cfg, in write_bytes()
124 static int read_bytes(const struct device *spi, struct spi_config *spi_cfg, in read_bytes() argument
130 err = mb85rs64v_access(spi, spi_cfg, in read_bytes()
[all …]
/Zephyr-latest/tests/drivers/spi/dt_spec/
Dapp.overlay22 test_spi_cs: spi@33334444 {
25 compatible = "vnd,spi";
32 test_spi_dev_cs: test-spi-dev@0 {
33 compatible = "vnd,spi-device";
35 spi-max-frequency = <2000000>;
39 test_spi_no_cs: spi@55556666 {
42 compatible = "vnd,spi";
47 test_spi_dev_no_cs: test-spi-dev@0 {
48 compatible = "vnd,spi-device";
50 spi-max-frequency = <2000000>;
/Zephyr-latest/subsys/mgmt/ec_host_cmd/backends/
Dec_host_cmd_backend_spi_stm32.c157 SPI_TypeDef *spi; member
213 .spi = (SPI_TypeDef *)DT_REG_ADDR(id), \
235 static inline uint32_t dma_source_addr(SPI_TypeDef *spi) in dma_source_addr() argument
238 return (uint32_t)(&spi->RXDR); in dma_source_addr()
240 return (uint32_t)LL_SPI_DMA_GetRegAddr(spi); in dma_source_addr()
244 static inline uint32_t dma_dest_addr(SPI_TypeDef *spi) in dma_dest_addr() argument
247 return (uint32_t)(&spi->TXDR); in dma_dest_addr()
249 return (uint32_t)LL_SPI_DMA_GetRegAddr(spi); in dma_dest_addr()
254 static inline void tx_status(SPI_TypeDef *spi, uint8_t status) in tx_status() argument
259 LL_SPI_TransmitData8(spi, status); in tx_status()
[all …]
/Zephyr-latest/tests/drivers/spi/spi_loopback/boards/
Dsam_e70_xplained_same70q21.overlay14 compatible = "test-spi-loopback-slow";
16 spi-max-frequency = <500000>;
19 compatible = "test-spi-loopback-fast";
21 spi-max-frequency = <1000000>;
32 compatible = "test-spi-loopback-slow";
34 spi-max-frequency = <500000>;
37 compatible = "test-spi-loopback-fast";
39 spi-max-frequency = <1000000>;
Dsam_v71_xult_samv71q21.overlay14 compatible = "test-spi-loopback-slow";
16 spi-max-frequency = <500000>;
19 compatible = "test-spi-loopback-fast";
21 spi-max-frequency = <1000000>;
32 compatible = "test-spi-loopback-slow";
34 spi-max-frequency = <500000>;
37 compatible = "test-spi-loopback-fast";
39 spi-max-frequency = <1000000>;
Dcy8cproto_063_ble.overlay19 spi: &scb1 {
20 compatible = "infineon,cat1-spi";
28 compatible = "test-spi-loopback-slow";
30 spi-max-frequency = <200000>;
34 compatible = "test-spi-loopback-fast";
36 spi-max-frequency = <1500000>;
Dfrdm_mcxn947_mcxn947_cpu0.overlay9 compatible = "test-spi-loopback-slow";
11 spi-max-frequency = <500000>;
14 compatible = "test-spi-loopback-fast";
16 spi-max-frequency = <16000000>;
Dfrdm_mcxw71.overlay9 compatible = "test-spi-loopback-slow";
11 spi-max-frequency = <500000>;
14 compatible = "test-spi-loopback-fast";
16 spi-max-frequency = <16000000>;
Dfrdm_rw612.overlay9 compatible = "test-spi-loopback-slow";
11 spi-max-frequency = <500000>;
14 compatible = "test-spi-loopback-fast";
16 spi-max-frequency = <16000000>;
Dmimxrt1040_evk.overlay9 compatible = "test-spi-loopback-slow";
11 spi-max-frequency = <500000>;
14 compatible = "test-spi-loopback-fast";
16 spi-max-frequency = <16000000>;
Dmimxrt1170_evk_mimxrt1176_cm4_B.overlay9 compatible = "test-spi-loopback-slow";
11 spi-max-frequency = <500000>;
14 compatible = "test-spi-loopback-fast";
16 spi-max-frequency = <16000000>;
/Zephyr-latest/tests/drivers/spi/spi_loopback/
Doverlay-sam-spi-dma.overlay18 compatible = "test-spi-loopback-slow";
20 spi-max-frequency = <500000>;
23 compatible = "test-spi-loopback-fast";
25 spi-max-frequency = <1000000>;
36 compatible = "test-spi-loopback-slow";
38 spi-max-frequency = <500000>;
41 compatible = "test-spi-loopback-fast";
43 spi-max-frequency = <1000000>;
/Zephyr-latest/drivers/wifi/eswifi/
Deswifi_bus_spi.c44 static bool eswifi_spi_cmddata_ready(struct eswifi_spi_data *spi) in eswifi_spi_cmddata_ready() argument
46 return gpio_pin_get_dt(&spi->cfg->dr) > 0; in eswifi_spi_cmddata_ready()
49 static int eswifi_spi_wait_cmddata_ready(struct eswifi_spi_data *spi) in eswifi_spi_wait_cmddata_ready() argument
56 } while (!eswifi_spi_cmddata_ready(spi) && --max_retries); in eswifi_spi_wait_cmddata_ready()
63 struct eswifi_spi_data *spi = eswifi->bus_data; in eswifi_spi_write() local
73 status = spi_write_dt(&spi->cfg->bus, &spi_tx); in eswifi_spi_write()
85 struct eswifi_spi_data *spi = eswifi->bus_data; in eswifi_spi_read() local
95 status = spi_read_dt(&spi->cfg->bus, &spi_rx); in eswifi_spi_read()
108 struct eswifi_spi_data *spi = eswifi->bus_data; in eswifi_spi_request() local
140 err = eswifi_spi_wait_cmddata_ready(spi); in eswifi_spi_request()
[all …]
/Zephyr-latest/drivers/watchdog/
Dwdt_nxp_fs26.c68 struct spi_dt_spec spi; member
149 static int fs26_spi_transceive(const struct spi_dt_spec *spi, in fs26_spi_transceive() argument
187 retval = spi_transceive_dt(spi, &spi_tx_set, &spi_rx_set); in fs26_spi_transceive()
222 static int fs26_getreg(const struct spi_dt_spec *spi, uint8_t addr, in fs26_getreg() argument
231 return fs26_spi_transceive(spi, &tx_frame, rx_frame); in fs26_getreg()
243 static int fs26_setreg(const struct spi_dt_spec *spi, uint8_t addr, uint16_t regval) in fs26_setreg() argument
251 return fs26_spi_transceive(spi, &tx_frame, NULL); in fs26_setreg()
287 if (fs26_setreg(&config->spi, FS26_FS_WD_ANSWER, data->token) == 0) { in fs26_wd_refresh()
295 if (fs26_getreg(&config->spi, FS26_FS_WD_TOKEN, &rx_frame)) { in fs26_wd_refresh()
303 if (fs26_setreg(&config->spi, FS26_FS_WD_ANSWER, answer)) { in fs26_wd_refresh()
[all …]
/Zephyr-latest/drivers/sensor/tdk/icm42688/
Dicm42688_common.c30 res = icm42688_spi_single_write(&dev_cfg->spi, REG_DEVICE_CONFIG, BIT_SOFT_RESET); in icm42688_reset()
41 res = icm42688_spi_read(&dev_cfg->spi, REG_INT_STATUS, &value, 1); in icm42688_reset()
52 res = icm42688_spi_read(&dev_cfg->spi, REG_WHO_AM_I, &value, 1); in icm42688_reset()
128 res = icm42688_spi_single_write(&dev_cfg->spi, REG_INT_SOURCE0, 0); in icm42688_configure()
132 res = icm42688_spi_single_write(&dev_cfg->spi, REG_FIFO_CONFIG, in icm42688_configure()
140 res = icm42688_spi_single_write(&dev_cfg->spi, REG_SIGNAL_PATH_RESET, in icm42688_configure()
157 res = icm42688_spi_single_write(&dev_cfg->spi, REG_PWR_MGMT0, pwr_mgmt0); in icm42688_configure()
173 res = icm42688_spi_single_write(&dev_cfg->spi, REG_ACCEL_CONFIG0, accel_config0); in icm42688_configure()
183 res = icm42688_spi_single_write(&dev_cfg->spi, REG_GYRO_CONFIG0, gyro_config0); in icm42688_configure()
199 res = icm42688_spi_single_write(&dev_cfg->spi, REG_FIFO_CONFIG, fifo_config_bypass); in icm42688_configure()
[all …]
/Zephyr-latest/boards/renesas/da1469x_dk_pro/dts/
Dda1469x_dk_pro_psram.overlay35 rx-inst-mode = "quad-spi";
36 rx-addr-mode = "quad-spi";
37 rx-data-mode = "quad-spi";
38 rx-dummy-mode = "quad-spi";
39 rx-extra-mode = "quad-spi";
40 tx-inst-mode = "quad-spi";
41 tx-addr-mode = "quad-spi";
42 tx-data-mode = "quad-spi";

12345678910>>...59