/Zephyr-latest/drivers/eeprom/ |
D | eeprom_lpc11u6x.c | 4 * SPDX-License-Identifier: Apache-2.0 13 * This driver supports the on-chip EEPROM found on NXP LPC11U6x MCUs. 15 * @note This driver is only a wrapper for the IAP (In-Application Programming) 34 const struct eeprom_lpc11u6x_config *config = dev->config; in eeprom_lpc11u6x_read() 35 uint32_t cmd[5]; in eeprom_lpc11u6x_read() local 42 if ((offset + len) > config->size) { in eeprom_lpc11u6x_read() 44 return -EINVAL; in eeprom_lpc11u6x_read() 47 cmd[0] = IAP_CMD_EEPROM_READ; in eeprom_lpc11u6x_read() 48 cmd[1] = offset; in eeprom_lpc11u6x_read() 49 cmd[2] = (uint32_t) data; in eeprom_lpc11u6x_read() [all …]
|
D | eeprom_mb85rsxx.c | 4 * SPDX-License-Identifier: Apache-2.0 24 #define EEPROM_MB85RSXX_WREN 0x06U /* Set Write Enable Latch */ 25 #define EEPROM_MB85RSXX_WRDI 0x04U /* Reset Write Enable Latch */ 27 #define EEPROM_MB85RSXX_WRSR 0x01U /* Write Status Register */ 29 #define EEPROM_MB85RSXX_WRITE 0x02U /* Write Memory Code */ 35 #define EEPROM_MB85RSXX_STATUS_WPEN BIT(7) /* Status Register Write Protect (RW) */ 38 #define EEPROM_MB85RSXX_STATUS_WEL BIT(1) /* Write Enable Latch (RO) */ 64 const struct eeprom_mb85rsxx_config *config = dev->config; in eeprom_mb85rsxx_read() 65 struct eeprom_mb85rsxx_data *data = dev->data; in eeprom_mb85rsxx_read() 66 uint8_t cmd[4] = {EEPROM_MB85RSXX_READ, 0, 0, 0}; in eeprom_mb85rsxx_read() local [all …]
|
/Zephyr-latest/arch/x86/zefi/ |
D | zefi.py | 3 # SPDX-License-Identifier: Apache-2.0 63 bytesz = h.p_memsz - h.p_filesz 65 verbose("%d bytes of zero-fill at 0x%x" % (bytesz, addr)) 73 cf = open("zefi-segments.h", "w") 75 cf.write("/* GENERATED CODE. DO NOT EDIT. */\n\n") 77 cf.write("/* Sizes and offsets specified in 4-byte units.\n") 78 cf.write(" * All addresses 4-byte aligned.\n") 79 cf.write(" */\n") 81 cf.write("struct data_seg { uint64_t addr; uint32_t sz; uint32_t off; };\n\n") 83 cf.write("static struct data_seg zefi_dsegs[] = {\n") [all …]
|
/Zephyr-latest/include/zephyr/drivers/i3c/ |
D | hdr_ddr.h | 4 * SPDX-License-Identifier: Apache-2.0 28 * @brief Write a set amount of data to an I3C target device with HDR DDR. 33 * @param cmd 7-bit command code 35 * @param num_bytes Number of bytes to write. 38 * @retval -EBUSY Bus is busy. 39 * @retval -EIO General input / output error. 41 static inline int i3c_hdr_ddr_write(struct i3c_device_desc *target, uint8_t cmd, in i3c_hdr_ddr_write() argument 50 msg.hdr_cmd_code = cmd; in i3c_hdr_ddr_write() 61 * @param cmd 7-bit command code 66 * @retval -EBUSY Bus is busy. [all …]
|
/Zephyr-latest/samples/drivers/smbus/ |
D | README.rst | 1 .. zephyr:code-sample:: smbus-shell 3 :relevant-api: smbus_interface 20 .. zephyr-app-commands:: 21 :zephyr-app: samples/drivers/smbus 22 :host-os: unix 32 .. code-block:: console 34 *** Booting Zephyr OS build zephyr-v3.2.0-804-gfedd72615e82 *** 40 .. code-block:: console 43 smbus - smbus commands 51 byte_write :SMBus: byte write command [all …]
|
/Zephyr-latest/subsys/sd/ |
D | sd_ops.c | 4 * SPDX-License-Identifier: Apache-2.0 22 struct sdhc_command cmd; in sdmmc_read_status() local 25 cmd.opcode = SD_SEND_STATUS; in sdmmc_read_status() 26 cmd.arg = 0; in sdmmc_read_status() 27 if (!card->host_props.is_spi) { in sdmmc_read_status() 28 cmd.arg = (card->relative_addr << 16U); in sdmmc_read_status() 30 cmd.response_type = (SD_RSP_TYPE_R1 | SD_SPI_RSP_TYPE_R2); in sdmmc_read_status() 31 cmd.retries = CONFIG_SD_CMD_RETRIES; in sdmmc_read_status() 32 cmd.timeout_ms = CONFIG_SD_CMD_TIMEOUT; in sdmmc_read_status() 34 ret = sdhc_request(card->sdhc, &cmd, NULL); in sdmmc_read_status() [all …]
|
D | sdio.c | 2 * Copyright 2022-2023 NXP 4 * SPDX-License-Identifier: Apache-2.0 30 struct sdhc_command cmd = {0}; in sdio_send_ocr() local 34 cmd.opcode = SDIO_SEND_OP_COND; in sdio_send_ocr() 35 cmd.arg = ocr; in sdio_send_ocr() 36 cmd.response_type = (SD_RSP_TYPE_R4 | SD_SPI_RSP_TYPE_R4); in sdio_send_ocr() 37 cmd.timeout_ms = CONFIG_SD_CMD_TIMEOUT; in sdio_send_ocr() 40 ret = sdhc_request(card->sdhc, &cmd, NULL); in sdio_send_ocr() 50 card->num_io = (cmd.response[0] & SDIO_OCR_IO_NUMBER) in sdio_send_ocr() 52 if ((card->num_io == 0) || in sdio_send_ocr() [all …]
|
/Zephyr-latest/drivers/mdio/ |
D | mdio_adin2111.c | 4 * SPDX-License-Identifier: Apache-2.0 39 const struct mdio_adin2111_config *const cfg = dev->config; in mdio_adin2111_wait_ready() 44 ret = eth_adin2111_reg_read(cfg->adin, reg, out); in mdio_adin2111_wait_ready() 49 ret = -ETIMEDOUT; in mdio_adin2111_wait_ready() 62 const struct mdio_adin2111_config *const cfg = dev->config; in mdio_adin2111_read_c45() 64 uint32_t cmd; in mdio_adin2111_read_c45() local 68 cmd = (prtad & 0x1FU) << 21; in mdio_adin2111_read_c45() 69 cmd |= (devad & 0x1FU) << 16; in mdio_adin2111_read_c45() 70 cmd |= regad; in mdio_adin2111_read_c45() 72 ret = eth_adin2111_reg_write(cfg->adin, ADIN2111_MDIOACC0, cmd); in mdio_adin2111_read_c45() [all …]
|
/Zephyr-latest/samples/drivers/spi_fujitsu_fram/src/ |
D | main.c | 4 * SPDX-License-Identifier: Apache-2.0 27 uint8_t cmd, uint16_t addr, void *data, size_t len) in mb85rs64v_access() argument 43 access[0] = cmd; in mb85rs64v_access() 45 if (cmd == MB85RS64V_WRITE_CMD || cmd == MB85RS64V_READ_CMD) { in mb85rs64v_access() 52 if (cmd == MB85RS64V_READ_CMD) { in mb85rs64v_access() 78 return -EIO; in mb85rs64v_read_id() 82 return -EIO; in mb85rs64v_read_id() 86 return -EIO; in mb85rs64v_read_id() 90 return -EIO; in mb85rs64v_read_id() 94 return -EIO; in mb85rs64v_read_id() [all …]
|
/Zephyr-latest/dts/bindings/memory-controllers/ |
D | renesas,smartbond-nor-psram.yaml | 2 # SPDX-License-Identifier: Apache-2.0 8 compatible: "renesas,smartbond-nor-psram" 14 is-ram: 19 dev-size: 25 dev-type: 31 dev-density: 40 dev-id: 46 reset-delay-us: 52 read-cs-idle-min-ns: 59 erase-cs-idle-min-ns: [all …]
|
/Zephyr-latest/include/zephyr/drivers/ |
D | smbus.h | 4 * SPDX-License-Identifier: Apache-2.0 50 * +-+-+-+-+-+-+-+-+-+-+-+ 52 * +-+-+-+-+-+-+-+-+-+-+-+ 61 * Byte Write 65 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 67 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 73 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 75 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 82 * by read or write one byte. 85 * Byte Data Write [all …]
|
/Zephyr-latest/include/zephyr/sd/ |
D | mmc.h | 4 * SPDX-License-Identifier: Apache-2.0 24 * @brief Write blocks to MMC card from buffer 28 * @param card MMC card to write from 29 * @param wbuf write buffer 30 * @param start_block first block to write to 31 * @param num_blocks number of blocks to write 32 * @retval 0 write succeeded 33 * @retval -EBUSY: card is busy with another request 34 * @retval -ETIMEDOUT: card write timed out 35 * @retval -EIO: I/O error [all …]
|
D | sdmmc.h | 4 * SPDX-License-Identifier: Apache-2.0 24 * @brief Write blocks to SD card from buffer 28 * @param card SD card to write from 29 * @param wbuf write buffer 30 * @param start_block first block to write to 31 * @param num_blocks number of blocks to write 32 * @retval 0 write succeeded 33 * @retval -EBUSY: card is busy with another request 34 * @retval -ETIMEDOUT: card write timed out 35 * @retval -EIO: I/O error [all …]
|
/Zephyr-latest/drivers/display/ |
D | display_rm67162.c | 4 * SPDX-License-Identifier: Apache-2.0 27 uint8_t cmd; member 30 /* CMD Mode switch, select manufacture command set page 0 */ 31 {.cmd = 0xFE, .param = 0x01}, 32 {.cmd = 0x06, .param = 0x62}, 33 {.cmd = 0x0E, .param = 0x80}, 34 {.cmd = 0x0F, .param = 0x80}, 35 {.cmd = 0x10, .param = 0x71}, 36 {.cmd = 0x13, .param = 0x81}, 37 {.cmd = 0x14, .param = 0x81}, [all …]
|
D | display_nt35510.c | 4 * SPDX-License-Identifier: Apache-2.0 7 * https://github.com/STMicroelectronics/stm32-nt35510/blob/main/nt35510.c 73 uint8_t cmd[5]; member 78 {.reg = 0xf0, .cmd_len = 5, .cmd = {0x55, 0xaa, 0x52, 0x08, 0x01}}, 80 {.reg = 0xb0, .cmd_len = 3, .cmd = {0x03, 0x03, 0x03}}, 82 {.reg = 0xb6, .cmd_len = 3, .cmd = {0x46, 0x46, 0x46}}, 83 /* AVEE: -5.2V */ 84 {.reg = 0xb1, .cmd_len = 3, .cmd = {0x03, 0x03, 0x03}}, 86 {.reg = 0xb7, .cmd_len = 3, .cmd = {0x36, 0x36, 0x36}}, 87 /* VCL: -2.5V */ [all …]
|
/Zephyr-latest/drivers/smbus/ |
D | smbus_shell.c | 5 * SPDX-License-Identifier: Apache-2.0 36 * uses arbitrary SMBus commands (namely SMBus quick write to probe for 42 * https://manpages.debian.org/buster/i2c-tools/i2cdetect.8.en.html 54 return -ENODEV; in cmd_smbus_scan() 71 shell_fprintf(sh, SHELL_NORMAL, "-- "); in cmd_smbus_scan() 93 return -ENODEV; in cmd_smbus_quick() 100 shell_error(sh, "SMBus: Failed quick cmd, perip: 0x%02x", addr); in cmd_smbus_quick() 117 return -ENODEV; in cmd_smbus_byte_read() 126 return -EIO; in cmd_smbus_byte_read() 146 return -ENODEV; in cmd_smbus_byte_write() [all …]
|
/Zephyr-latest/drivers/flash/ |
D | flash_stm32_xspi.c | 4 * SPDX-License-Identifier: Apache-2.0 23 #include <zephyr/dt-bindings/flash_controller/xspi.h> 59 struct flash_stm32_xspi_data *dev_data = dev->data; in xspi_lock_thread() 61 k_sem_take(&dev_data->sem, K_FOREVER); in xspi_lock_thread() 66 struct flash_stm32_xspi_data *dev_data = dev->data; in xspi_unlock_thread() 68 k_sem_give(&dev_data->sem); in xspi_unlock_thread() 71 static int xspi_send_cmd(const struct device *dev, XSPI_RegularCmdTypeDef *cmd) in xspi_send_cmd() argument 73 struct flash_stm32_xspi_data *dev_data = dev->data; in xspi_send_cmd() 76 LOG_DBG("Instruction 0x%x", cmd->Instruction); in xspi_send_cmd() 78 dev_data->cmd_status = 0; in xspi_send_cmd() [all …]
|
D | flash_stm32_ospi.c | 5 * SPDX-License-Identifier: Apache-2.0 20 #include <zephyr/dt-bindings/flash_controller/ospi.h> 187 struct flash_stm32_ospi_data *dev_data = dev->data; in ospi_lock_thread() 189 k_sem_take(&dev_data->sem, K_FOREVER); in ospi_lock_thread() 194 struct flash_stm32_ospi_data *dev_data = dev->data; in ospi_unlock_thread() 196 k_sem_give(&dev_data->sem); in ospi_unlock_thread() 199 static int ospi_send_cmd(const struct device *dev, OSPI_RegularCmdTypeDef *cmd) in ospi_send_cmd() argument 201 const struct flash_stm32_ospi_config *dev_cfg = dev->config; in ospi_send_cmd() 202 struct flash_stm32_ospi_data *dev_data = dev->data; in ospi_send_cmd() 205 LOG_DBG("Instruction 0x%x", cmd->Instruction); in ospi_send_cmd() [all …]
|
D | flash_stm32_qspi.c | 6 * SPDX-License-Identifier: Apache-2.0 58 /* In dual-flash mode, total size is twice the size of one flash component */ 125 * If set addressed operations should use 32-bit rather than 126 * 24-bit addresses. 138 struct flash_stm32_qspi_data *dev_data = dev->data; in qspi_lock_thread() 140 k_sem_take(&dev_data->sem, K_FOREVER); in qspi_lock_thread() 145 struct flash_stm32_qspi_data *dev_data = dev->data; in qspi_unlock_thread() 147 k_sem_give(&dev_data->sem); in qspi_unlock_thread() 151 QSPI_CommandTypeDef *cmd) in qspi_set_address_size() argument 153 struct flash_stm32_qspi_data *dev_data = dev->data; in qspi_set_address_size() [all …]
|
/Zephyr-latest/drivers/sensor/tdk/icm42670/ |
D | icm42670_spi.c | 6 * SPDX-License-Identifier: Apache-2.0 10 * Bus-specific functionality for ICM42670 accessed via SPI. 22 return spi_is_ready_dt(&bus->spi) ? 0 : -ENODEV; in icm42670_bus_check_spi() 29 uint8_t cmd[] = {(start | 0x80)}; in icm42670_reg_read_spi() local 30 const struct spi_buf tx_buf = {.buf = cmd, .len = sizeof(cmd)}; in icm42670_reg_read_spi() 42 ret = spi_transceive_dt(&bus->spi, &tx, &rx); in icm42670_reg_read_spi() 53 uint8_t cmd[] = {reg & 0x7F}; in icm42670_reg_write_spi() local 54 const struct spi_buf tx_buf[2] = {{.buf = cmd, .len = sizeof(cmd)}, in icm42670_reg_write_spi() 57 int ret = spi_write_dt(&bus->spi, &tx); in icm42670_reg_write_spi() 69 .write = icm42670_reg_write_spi,
|
/Zephyr-latest/boards/renesas/da1469x_dk_pro/dts/ |
D | da1469x_dk_pro_psram.overlay | 4 * SPDX-License-Identifier: Apache-2.0 9 sram-ext = &memc; 17 /* QSPIC settings for the APS6404L-3SQR QSPI PSRAM memory in QPI mode. */ 20 is-ram; 21 dev-size = <DT_SIZE_M(64)>; 22 dev-type = <0x5D>; 23 dev-id = <0x0D>; 24 dev-density = <0xE040>; 25 reset-delay-us = <50>; 26 read-cs-idle-min-ns = <18>; [all …]
|
/Zephyr-latest/samples/drivers/mspi/mspi_async/src/ |
D | main.c | 4 * SPDX-License-Identifier: Apache-2.0 35 volatile struct user_context *usr_ctx = mspi_cb_ctx->ctx; in async_cb() 37 mspi_cb_ctx->mspi_evt.evt_data.status = status; in async_cb() 38 if (mspi_cb_ctx->mspi_evt.evt_data.packet_idx == usr_ctx->total_packets - 1) { in async_cb() 39 usr_ctx->status = 0; in async_cb() 46 .cmd = DEVICE_MEM_WRITE_INSTR, 54 .cmd = DEVICE_MEM_WRITE_INSTR, 62 .cmd = DEVICE_MEM_WRITE_INSTR, 70 .cmd = DEVICE_MEM_WRITE_INSTR, 81 .cmd = DEVICE_MEM_READ_INSTR, [all …]
|
/Zephyr-latest/drivers/disk/nvme/ |
D | nvme_cmd.c | 3 * SPDX-License-Identifier: Apache-2.0 44 { NVME_SC_ABORTED_POWER_LOSS, "ABORTED - POWER LOSS" }, 46 { NVME_SC_ABORTED_BY_REQUEST, "ABORTED - BY REQUEST" }, 47 { NVME_SC_ABORTED_SQ_DELETION, "ABORTED - SQ DELETION" }, 48 { NVME_SC_ABORTED_FAILED_FUSED, "ABORTED - FAILED FUSED" }, 49 { NVME_SC_ABORTED_MISSING_FUSED, "ABORTED - MISSING FUSED" }, 59 { NVME_SC_ATOMIC_WRITE_UNIT_EXCEEDED, "ATOMIC WRITE UNIT EXCEEDED" }, 70 { NVME_SC_NAMESPACE_IS_WRITE_PROTECTED, "NAMESPACE IS WRITE PROTECTED" }, 85 { NVME_SC_ABORT_COMMAND_LIMIT_EXCEEDED, "ABORT CMD LIMIT EXCEEDED" }, 109 { NVME_SC_SELF_TEST_IN_PROGRESS, "DEVICE SELF-TEST IN PROGRESS" }, [all …]
|
/Zephyr-latest/drivers/sensor/sensirion/scd4x/ |
D | scd4x.c | 4 * SPDX-License-Identifier: Apache-2.0 31 static int scd4x_write_command(const struct device *dev, uint8_t cmd) in scd4x_write_command() argument 33 const struct scd4x_config *cfg = dev->config; in scd4x_write_command() 37 sys_put_be16(scd4x_cmds[cmd].cmd, tx_buf); in scd4x_write_command() 39 ret = i2c_write_dt(&cfg->bus, tx_buf, sizeof(tx_buf)); in scd4x_write_command() 41 if (scd4x_cmds[cmd].cmd_duration_ms) { in scd4x_write_command() 42 k_msleep(scd4x_cmds[cmd].cmd_duration_ms); in scd4x_write_command() 50 const struct scd4x_config *cfg = dev->config; in scd4x_read_reg() 53 ret = i2c_read_dt(&cfg->bus, rx_buf, rx_buf_size); in scd4x_read_reg() 63 return -EIO; in scd4x_read_reg() [all …]
|
/Zephyr-latest/drivers/wifi/eswifi/ |
D | eswifi_bus_spi.c | 4 * SPDX-License-Identifier: Apache-2.0 46 return gpio_pin_get_dt(&spi->cfg->dr) > 0; in eswifi_spi_cmddata_ready() 56 } while (!eswifi_spi_cmddata_ready(spi) && --max_retries); in eswifi_spi_wait_cmddata_ready() 58 return max_retries ? 0 : -ETIMEDOUT; in eswifi_spi_wait_cmddata_ready() 63 struct eswifi_spi_data *spi = eswifi->bus_data; in eswifi_spi_write() 73 status = spi_write_dt(&spi->cfg->bus, &spi_tx); in eswifi_spi_write() 75 LOG_ERR("SPI write error %d", status); in eswifi_spi_write() 85 struct eswifi_spi_data *spi = eswifi->bus_data; in eswifi_spi_read() 95 status = spi_read_dt(&spi->cfg->bus, &spi_rx); in eswifi_spi_read() 105 static int eswifi_spi_request(struct eswifi_dev *eswifi, char *cmd, size_t clen, in eswifi_spi_request() argument [all …]
|