text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
<|fim_prefix|>/*
* SPDX-FileCopyrightText: <text>Copyright (c) 2026 Infineon Technologies AG,
* or an affiliate of Infineon Technologies AG. All rights reserved.</text>
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @brief MFD driver for the Infineon HPPASS CSG (Comparator Slope Generator).
*
* The CSG block... | fim | zephyrproject-rtos/zephyr | c |
/*
* SPDX-FileCopyrightText: <text>Copyright (c) 2026 Infineon Technologies AG,
* or an affiliate of Infineon Technologies AG. All rights reserved.</text>
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief HPPASS internal register helpers (composed constants, TRM citations).
*
* Internal driver h... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2024 ITE Corporation. All Rights Reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT ite_it8801_altctrl
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/mfd/mfd_ite_it8801.h>
#include <zephyr/dt-bindings/mfd/mfd_it8801_altctrl.h>
#include <zephyr/lo... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>_init(&data->callback_list);
/* Alert response enable */
ret = i2c_reg_write_byte_dt(&config->i2c_dev, IT8801_REG_SMBCR, IT8801_REG_MASK_ARE);
if (ret != 0) {
LOG_ERR("Failed to initialization setting (ret %d)", ret);
return ret;
}
gpio_pin_configure_dt(&config->irq_gpios, GPIO_INPUT);
/* Ini... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2026 The Zephyr Project Contributors
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT m5stack_m5pm1
#include <errno.h>
#include <zephyr/device.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/mfd/m5pm1.h>
#include <zephyr/kernel.h>
#include <zephyr/logg... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>ULL);
DT_INST_FOREACH_STATUS_OKAY(MFD_MA20335_DEFINE)
<|fim_prefix|>/*
* Copyright (c) 2023 Grinn
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT maxim_max20335
#include <errno.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/sys/util.h>
#define MAX20335_REG_CHIP_ID 0x00
#define ... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>x = { \
.spi = SPI_DT_SPEC_INST_GET(index, SPI_OP_MODE_MASTER | SPI_WORD_SET(8U)), \
.gpio_int = GPIO_DT_SPEC_INST_GET_OR(index, int_gpios, {0}), \
.gpio_reset = GPIO_DT_SPEC_INST_GET_OR(index, rst_gpios, {0}), \
.crc_mod... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> struct mfd_max2221x_config *config = dev->config;
if (!spi_is_ready_dt(&config->spi)) {
LOG_ERR("SPI device %s not ready", config->spi.bus->name);
return -ENODEV;
}
return 0;
}
#define MAX2221X_DEFINE(inst) \
static const str... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright (c) 2024 SILA Embedded Solutions GmbH
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT maxim_max31790
#include <zephyr/device.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/mfd/max31790.h>
#include <zephyr/sys/util.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2025 Vogl Electronic GmbH
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT adi_maxq10xx
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/drivers/mfd/mfd_maxq10xx.h>
#include <zephyr/logging/log.h>
LOG_MODULE_RE... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>(value, RTC_EXT_TARGET);
k_spin_unlock(&data->lock, key);
}
#define MFD_MC146818_DEFINE(inst) \
static struct mfd_mc146818_data data##inst; \
DEVICE_DT_INST_DEFINE(inst, NULL, NULL, &data##inst, NULL, \
POST_KERNEL, \
CONFIG_MFD_MOTOROLA_MC146818_INIT_PRIORITY, \
... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (C) 2025 Microchip Technology Inc.<|fim_suffix|> Operating Mode to %d", dev->name, config->mode);
return 0;
}
#define SAM_FLEXCOMM_INIT(n) \
\
static const struct sam_flexcomm_config sam_flexcomm_config_##n = { \
.reg = (flexcom_registers_t *)DT_INST_REG_ADDR(n), \
... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2023 Google, LLC
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT nuvoton_nct38xx
#include <zephyr/drivers/i2c.h>
struct mfd_nct38xx_config {
const struct i2c_dt_spec i2c_dev;
};
struct mfd_nct38xx_data {
/* lock NC38xx register access */
struct k_sem lo<|fim_suf... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2026 Nordic Semiconductor ASA
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT nordic_npm10xx
#include <zephyr/drivers/mfd/npm10xx.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/dt-bindings/gpio/nordic-npm10xx-gpio.h>
#include <ze... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>config->host_int_gpios.port, &mfd_data->gpio_cb);
if (ret < 0) {
return ret;
}
mfd_data->work.handler = work_callback;
ret = gpio_pin_interrupt_configure_dt(&config->host_int_gpios,
GPIO_INT_EDGE_TO_ACTIVE);
if (ret < 0) {
return ret;
}
}
ret = mfd_npm13xx_reg_write(dev,... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2024 Nordic Semiconductor ASA
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT nordic_npm2100
#include <errno.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/g... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>_CMOS BIT(2)
#define NPM6001_BUCKMODEPADCONF_BUCKMODE0PULLD_ENABLED BIT(4)
#define NPM6001_BUCKMODEPADCONF_BUCKMODE1PULLD_ENABLED BIT(5)
#define NPM6001_BUCKMODEPADCONF_BUCKMODE2PULLD_ENABLED BIT(6)
/* nPM6001 PADDRIVESTRENGTH fields */
#define NPM6001_PADDRIVESTRENGTH_READY_HIGH BIT(2)
#define NPM6001_... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright 2024 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT nxp_lp_flexcomm
#include <errno.h>
#include <zephyr/device.h>
#include <zephyr/drivers/reset.h>
#include <zephyr/irq.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/drivers/mfd/nxp_lp_flexcomm.h... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>in interrupt
*
* If MCU like RT595 or RT798 has the dedicated pin interrupt for PMIC
* instead of GPIO interrupt, should set to enable the dedicated pin interrupt
*/
imxrt_enable_pmic_interrupt();
/* Clear PCA9422 interrupt registers */
/* Read all interrupt registers */
ret = i2c_reg_read_by... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2024 Arduino SA
* SPDX-License-Identifier: <|fim_suffix|>ne PF1550_REG_CHIP_ID 0x00
#define PF1550_CHIP_ID_VAL ((15 << 3) | 4)
struct mfd_pf1550_config {
struct i2c_dt_spec bus;
};
static int mfd_pf1550_init(const struct device *dev)
{
const struct mfd_pf1550_config *config = dev-... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2025 Baylibre SAS
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/sys/util.h>
#i<|fim_suffix|>;
if (err) {
LOG_ERR("failed to write reg addr 0x%02x, len %d (err %d)", addr, len, ... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright (c) 2026, tinyvision.ai
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT nxp_sc18is606
#include <zephyr/logging/log.h>
#include "mfd_sc18is606.h"
LOG_MODULE_REGISTER(nxp_sc18is606, CONFIG_MFD_LOG_LEVEL);
int nxp_sc18is606_transfer(const struct device *dev, const uint8_t *tx_data, u... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c), 2025 tinyvision.ai Inc
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief MFD SC18IS606 interface
*
*/
#ifndef ZEPHYR_DRIVERS_MFD_SC18IS606_H_
#define ZEPHYR_DRIVERS_MFD_SC18IS606_H_
#include <stdint.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2024 SILA Embedded Solutions GmbH
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT infineon_tle9104
#include <errno.h>
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/mfd/tle91... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright 2025 MASSDRIVER EI (massdriver.space)
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT bflb_dbi
#include <zephyr/drivers/spi.h>
#include <zephyr/drivers/dma.h>
#include <zephyr/drivers/mipi_dbi.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/pinct... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>_BY_IDX_OR(n, data_gpios, 14, {0}), \
GPIO_DT_SPEC_INST_GET_BY_IDX_OR(n, data_gpios, 15, {0})}, \
.data_bus_width = DT_INST_PROP_LEN(n, data_gpios), \
.rd = GPIO_DT_SPEC_INST_GET_OR(n, rd_gpios, {}), ... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>ct periph clock */
ret = esp_clk_tree_src_get_freq_hz(
cfg->clock_source, ESP_CLK_TREE_SRC_FREQ_PRECISION_APPROX, &clock_source_freq_hz);
if (ret != ESP_OK) {
LOG_ERR("Failed to get clock source frequency (%d)", ret);
return -EINVAL;
}
lcd_ll_select_clk_src(hal->dev, cfg->clock_source);
lcd_l... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>
{
const struct mcux_dcnano_lcdif_dbi_config *config = dev->config;
struct mcux_dcnano_lcdif_dbi_data *lcdif_data = dev->data;
uint8_t bus_type = dbi_config->mode & 0xFU;
uint8_t color_coding = dbi_config->color_coding & 0xF0U;
lcdif_dbi_config_t lcdif_dbi_config = config->dbi_config;
status_t statu... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright 2023, 2026 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT nxp_mipi_dbi_flexio_lcdif
#include <zephyr/drivers/dma.h>
#include <zephyr/drivers/display.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/drivers/mipi_dbi.h>
#incl... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright 2023 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT nxp_lcdic
#include <zephyr/drivers/mipi_dbi.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/pm/device.h>
#include <zephyr/pm/policy.h>
#include <zephyr/drivers/s... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>id, prop, idx, current_idx) \
(DT_PHA_BY_IDX(node_id, prop, idx, consecutive_pins) * (idx < current_idx))
#define GET_DISCARDED_PINS_BY_IDX(node_id, prop, idx) \
DT_FOREACH_PROP_ELEM_SEP_VARGS(node_id, prop, DISCARD... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2025, Qingsong Gou <gouqs@hotmail.com>
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT sifli_sf32lb_lcdc_mipi_dbi
#include <zephyr/kernel.h>
#include <zephyr/drivers/clock_control/sf32lb.h>
#include <zephyr/drivers/mipi_dbi.h>
#include <zephyr/drivers/pinctrl.h>
#incl... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> writing
* any value to LCDC_INTERRUPT_REG.
*/
data->underflow_flag = LCDC_STATUS_REG_GET_FIELD(LCDC_STICKY_UNDERFLOW);
/* Default interrupt mode is level triggering so interrupt should be cleared */
da1469x_lcdc_te_set_status(false, DT_INST_PROP_OR(0, te_polarity, false));
k_sem_give(&data->syn... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright 2023 NXP
* Copyright 2024-2025 TiaC Systems
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT zephyr_mipi_dbi_spi
#include <zephyr/drivers/mipi_dbi.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/l... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2024 Bootlin
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT st_stm32_fmc_mipi_dbi
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/mipi_dbi.h>
#include <zephyr/drivers/clock_control/stm32_clock_control.h>
#include <zephyr/drivers/memc/memc_stm32.h>
#incl... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>dsi_xfer.txData = msg->tx_buf;
dsi_xfer.rxDataSize = msg->rx_len;
dsi_xfer.rxData = msg->rx_buf;
switch (msg->type) {
case MIPI_DSI_DCS_READ:
LOG_ERR("DCS Read not yet implemented or used");
return -ENOTSUP;
case MIPI_DSI_DCS_SHORT_WRITE:
dsi_xfer.sendDcsCmd = true;
dsi_xfer.dcsCmd = msg->c... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright 2023,2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
/* Based on dsi_mcux.c, which is (c) 2022 NXP */
#define DT_DRV_COMPAT nxp_mipi_dsi_2l
#include <zephyr/kernel.h>
#include <zephyr/drivers/display.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/mipi_dsi.h>
#include <z... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>\
.escClkFreq_Hz = 20000000, \
.btaTo_Ns = 10000, \
.hsTxTo_Ns = 60000, \
.lpRxTo_Ns = 60000, \
}, ... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2024-2025 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT renesas_ra_mipi_dsi
#include <soc.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/drivers/clock_control/renesas_ra_cgc.h>
#include <zephyr/driv... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2023 bytes at work AG
* Copyright (c) 2020 Teslabs Engineering S.L.
* based on dsi_mcux.c
* Copyright (c) 2022, NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT st_stm32_mipi_dsi
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/sys/... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>H_STATUS_OKAY(VND_MIPI_DSI_INIT)
<|fim_prefix|>/*
* Copyright (c) 2024 TOKITA Hiroshi
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* This is not a real mipi-dsi driver. It is used to instantiate struct
* devices for the "vnd,mipi-dsi" devicetree compatible used in test code.
*/
#include <zephyr/... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>n = len
};
return mipi_dsi_transfer(dev, channel, &msg);
}
ssize_t mipi_dsi_dcs_write(const struct device *dev, uint8_t channel,
uint8_t cmd, const void *buf, size_t len)
{
struct mipi_dsi_msg msg = {
.cmd = cmd,
.tx_buf = buf,
.tx_len = len
};
switch (len) {
case 0U:
msg.type = MIP... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> \
static struct devmux_data devmux_data_##_n = { \
.selected = DEVMUX_SELECTED(_n), \
}; \
... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>ite32((c->mode & TA_MODE_MASK), base + TA_MODE);
sys_write32((c->histbin & TA_HISTBIN_MASK), base + TA_HISTBIN);
sys_write32(c->histcnt, base + TA_HISTCNT);
}
/* DT helpers: use fast-memory-region if present; else NULL/0. */
#define ETHOSU_FAST_BASE(n) ... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* SPDX-FileCopyrightText: <text>Copyright 2021-2022, 2024-2025 Arm Limited and/or its
* affiliates <open-source-office@arm.com></text>
* SPDX-License-Identifier: Apache-2.0
*/
#include "zephyr/sys_clock.h"
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/kernel.h>
#includ... | fim | zephyrproject-rtos/zephyr | c |
/*
* SPDX-FileCopyrightText: <text>Copyright 2021-2022, 2024-2025 Arm Limited and/or its
* affiliates <open-source-office@arm.com></text>
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_DRIVERS_MISC_ETHOS_U_ETHOS_U_COMMON_H_
#define ZEPHYR_DRIVERS_MISC_ETHOS_U_ETHOS_U_COMMON_H_
#include <ethosu_driver.h>
... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* SPDX-FileCopyrightText: <text>Copyright (c) 2026 Infineon Technologies AG,
* or an affiliate of Infineon Technologies AG. All rights reserved.</text>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/irq.h>
#include <zephyr/init.h>
#include <zephyr/device.h>
#include <zephyr/devicetre... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2025 Nuvoton Technology Corporation.
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT nuvoton_numaker_npu
#include <zephyr/kernel.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/clock_control/clock_control_numaker.h>
#include <zephyr/drivers/r... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2025 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/irq.h>
#include <zephyr/init.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/logging/log.h>
#include <ethosu_driver.h>
#include <zephyr/drivers/clock_contr... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> \
.irq_gpio = GPIO_DT_SPEC_INST_GET(idx, irq_gpios), \
}; \
DEVICE_DT_INST_DEFINE(idx, ft8xx_init, NULL, &ft8xx_##idx##_data, &ft8xx_##idx##_config, ... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2020 Hubert Miś
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/drivers/misc/ft8xx/ft8xx_common.h>
#include <zephyr/sys/byteorder.h>
#include "ft8xx_drv.h"
void ft8xx_wr8(const struct device *dev, uint32_t address, uint8_t data)
{
int err;
err = ft8xx_drv_write(dev... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright (c) 2020 Hubert Miś
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/drivers/misc/ft8xx/ft8xx_copro.h>
#include <stdint.h>
#include <string.h>
#include <zephyr/drivers/misc/ft8xx/ft8xx_common.h>
#include <zephyr/drivers/misc/ft8xx/ft8xx_memory.h>
#include "ft8xx_dev_data.h"
#include "ft... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2024 Hubert Miś
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief FT8XX device driver data structure
*/
#ifndef ZEPHYR_DRIVERS_MISC_FT8XX_FT8XX_DEV_DATA_H_
#define ZEPHYR_DRIVERS_MISC_FT8XX_FT8XX_DEV_DATA_H_
#include <stdint.h>
#include <zephyr/drivers/gpio.h>
#... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> spi_buf_set tx_bufs = {
.buffers = &tx,
.count = 1,
};
struct spi_buf rx[] = {
{
.buf = dummy_read_buf,
.len = sizeof(dummy_read_buf),
},
{
.buf = data,
.len = length,
},
};
struct spi_buf_set rx_bufs = {
.buffers = rx,
.count = 2,
};
ret = spi_transceive_dt(&dev_data... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2020 Hubert Miś
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief FT8XX serial driver API
*/
#ifndef ZEPHYR_DRIVERS_DISPLAY_FT8XX_FT8XX_DRV_H_
#define ZEPHYR_DRIVERS_DISPLAY_FT8XX_FT8XX_DRV_H_
#include <stdint.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>TIVE = 0,
STANDBY = 0x41,
SLEEP = 0x42,
PWRDOWN = 0x50,
CLKEXT = 0x44,
CLK48M = 0x62,
CLK36M = 0x61,
CORERST = 0x68
};
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_DRIVERS_DISPLAY_FT8XX_FT8XX_HOST_COMMANDS_H_ */
<|fim_prefix|>/*
* Copyright (c) 2020 Hubert Miś
*
* SPDX-License-Identifie... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>k_sleep(K_MSEC(5));
}
uint8_t glcd_display_state_get(const struct device *dev)
{
struct glcd_data *data = dev->data;
return data->display_switch;
}
void glcd_input_state_set(const struct device *dev, uint8_t opt)
{
const struct glcd_config *config = dev->config;
struct glcd_data *data = dev->data... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>nk_set(dev, peripheral, event);
}
#include <zephyr/syscalls/renesas_elc_link_set_mrsh.c>
int z_vrfy_renesas_elc_link_break(const struct device *dev, elc_peripheral_t peripheral)
{
K_OOPS(K_SYSCALL_DRIVER_RENESAS_ELC(dev, link_break));
return z_impl_renesas_elc_link_break(dev, peripheral);
}
#include <z... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> \
}; \
static struct renesas_ra_elc_data renesas_ra_elc_data_##inst; \
DEVICE_DT_INST_DEFINE(inst, renesas_ra_elc_init, NULL, &renesas_ra_elc_data_##inst, ... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2025 Analog Devices Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT adi_max2221x_misc
#include <zephyr/drivers/mfd/max2221x.h>
#include <zephyr/drivers/misc/max2221x/max2221x.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
struct misc_max2221x_... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> MCUX_FLEXIO_TIMER_COUNT_MAX(n) \
ARRAY_SIZE(((FLEXIO_Type *)DT_INST_REG_ADDR(n))->TIMCTL)
#define MCUX_FLEXIO_INIT(n) \
static void mcux_flexio_irq_config_func_##n(const struct device *dev); \
static void mcux_flexio_irq_enable_func_##n(void); \
static void mcux_flexio_irq_disable_func_##n(voi... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> \
\
static const struct nordic_vpr_launcher_config config##inst = { \
.vpr = (NRF_VPR_Type *)DT_INST_REG_ADDR(inst), \
IF_EN... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> base->INT_STATUS |= FLEXRAM_INT_STATUS_DTCM_ERR_STATUS_MASK;
flexram_callback(flexram_dtcm_access_error, flexram_user_data);
}
if (base->INT_STATUS & FLEXRAM_INT_STATUS_ITCM_ERR_STATUS_MASK) {
base->INT_STATUS |= FLEXRAM_INT_STATUS_ITCM_ERR_STATUS_MASK;
flexram_callback(flexram_itcm_access_error,... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright 2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT nxp_imx93_mediamix
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(mediamix, CONFIG_MEDIAMIX_LOG_LEVEL);
#include <fsl_common.h>
/* Required by DEVICE_MMIO_NAMED_* ... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright 2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/drivers/misc/nxp_rtxxx_dsp_ctrl/nxp_rtxxx_dsp_ctrl.h>
#include <zephyr/dt-bindings/misc/nxp_rtxxx_dsp_ctrl.h>
#include <fsl_device_registers.h>
#include <fsl_dsp.h>
#include <fsl_clock.h>
#include <fsl_power.h>
#include <errno.h>... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright 2023, 2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#define LOG_MODULE_NAME nxp_s32_emios
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(LOG_MODULE_NAME, CONFIG_NXP_S32_EMIOS_LOG_LEVEL);
#include <Emios_Mcl_Ip.h>
#include <Emios_Mcl_... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>f (retval < 0) {
return -EBUSY;
}
*sm = (size_t)retval;
return 0;
}
static int pio_rpi_pico_init(const struct device *dev)
{
const struct pio_rpi_pico_config *config = dev->config;
int ret;
ret = clock_control_on(config->clk_dev, config->clk_id);
if (ret < 0) {
return ret;
}
ret = reset_l... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2025 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT renesas_ra_drw
#include <zephyr/kernel.h>
#include <zephyr/irq.h>
#include <soc.h>
#include <r_drw_base.h>
#include <r_drw_cfg.h>
#define DRW_PRV_IRQCTL_DLISTIRQ_ENABLE BIT(1)
#d... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>data = dev->data;
if ((port_num != data->callback.port_num) || (pin != data->callback.pin)) {
return;
}
irq_disable(config->irq);
k_sem_give(&data->irq_sem);
}
void gpio_ra_isr(const struct device *dev)
{
const struct gpio_ra_irq_data *data = dev->data;
data->callback.isr(data->callback.port, ... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright (c) 2025 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <string.h>
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/gpio/gpio_utils.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/irq.h>... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>gpio_rx_interrupt_init(dev); \
}; \
DEVICE_DT_INST_DEFINE(index, gpio_rx_irq_init##index, NULL, &gpio_rx_irq_data##index, \
&gpio_rx_irq_config##index, PRE... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright 2025 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <errno.h>
#include <zephyr/device.h>
#include <zephyr/kernel.h>
#include <zephyr/init.h>
#include <soc.h>
#include <zephyr/drivers/clock_control/stm32_clock_control.h>
#define DT_DRV_COMPAT st_stm32n6_<|fim_... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2023 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Module for tracking page use within memory banks
*
* The memory management drivers may use the routines within this module
* to track page use within their memory banks. This information in ... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> /*
* Grab the flags of the old mapped page
* so the new page can map to the same flags.
*/
ret = sys_mm_drv_page_flag_get(va_old, &flags);
if (ret != 0) {
__ASSERT(false, "cannot query page %p\n", va_old);
/*
* Reset the already mapped virtual addresses.
* Note the offset is a... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2021 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_DRIVERS_SYSTEM_MM_DRV_COMMON_H_
#define ZEPHYR_DRIVERS_SYSTEM_MM_DRV_COMMON_H_
#include <zephyr/kernel.h>
#include <zephyr/toolchain.h>
#include <zephyr/drivers/mm/system_mm.h>
extern struct k_spinl... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright (c) 2022 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Header for aggregating all defines for mm
*
*/
#ifndef ZEPHYR_DRIVERS_SYSTEM_MM_DRV_INTEL_MTL_
#define ZEPHYR_DRIVERS_SYSTEM_MM_DRV_INTEL_MTL_
#define DT_DRV_COMPAT intel_adsp_mtl_tlb
#include <zephyr/de... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2021 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Driver to utilize TLB on Intel Audio DSP
*
* TLB (Translation Lookup Buffer) table is used to map between
* physical and virtual memory. This is global to all cores
* on the DSP, as changes... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright (c) 2022 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Driver handling memory regions related
* functions
*/
#include "mm_drv_intel_adsp.h"
/* virtual memory regions table, last item is an end marker */
struct sys_mm_drv_region
virtual_memory_regions[CONFIG... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2021 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Driver to utilize TLB on Intel Audio DSP
*
* TLB (Translation Lookup Buffer) table is used to map between
* physical and virtual memory. This is global to all cores
* on the DSP, as changes... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> * @param addr_translate_config Pointer to config struct for the RAT module
* @param region_num Number of regions being initialised
* @param enable Region status
*/
static void address_trans_set_region(struct address_trans_region_config *region_config,
uint16_t region_num, uint32_t enable)
{
uint3... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2024 Trackunit Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <zephyr/shell/shell.h>
#include <zephyr/modem/at/user_pipe.h>
#include <zephyr/modem/chat.h>
#include <zephyr/modem/pipelink.h>
#include <zephyr/sys/atomic.h>
#include <zephyr... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>t_util_pipe_access, timeout) < 0) {
return -EBUSY;
}
if (!atomic_test_bit(&at_util_state, AT_UTIL_STATE_OPENED_BIT)) {
/* Pipe is available but underlying channel closed while waiting */
k_sem_give(&at_util_pipe_access);
return -EPERM;
}
/* Drain any pending bytes that the previous user may ... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2023 Bjarki Arge Andreasen
* Copyright (c) 2026 Leica Geosystems AG
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/cellular.h>
#include <zephyr/drivers/modem/modem_cellular.... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright (c) 2026 Leica Geosystems AG
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/device.h>
#include <zephyr/drivers/modem/modem_cellular.h>
#include <zephyr/shell/shell.h>
static bool device_is_modem_cellular(const struct device *dev)
{
return dev->api == &modem_cellular_api;
}
static voi... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>len);
ret = process_cmd(cmd, match_len, data);
if (ret == -EAGAIN) {
k_sem_give(&data->sem_parse_lock);
break;
} else if (ret < 0) {
LOG_ERR("process cmd [%s] (len:%zu, ret:%d)",
cmd->cmd, match_len, ret);
}
/*
* make sure we didn't run out of data during
* comman... | fim | zephyrproject-rtos/zephyr | c |
/** @file
* @brief Modem command handler header file.
*
* Text-based command handler implementation for modem context driver.
*/
/*
* Copyright (c) 2019 Foundries.io
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_DRIVERS_MODEM_MODEM_CMD_HANDLER_H_
#define ZEPHYR_INCLUDE_DRIVERS_MODEM_MODEM_... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>4_ADDR_LEN) {
return -ENOMEM;
}
if (net_addr_ntop(NET_AF_INET, &net_sin(addr)->sin_addr,
buf, buf_size) == NULL) {
return -ENOMEM;
}
return 0;
}
LOG_ERR("Unknown IP address family:%d", addr->sa_family);
if (buf_size < sizeof(unknown_str)) {
return -ENOMEM;
}
strcpy(buf, unknown... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/** @file
* @brief Modem context header file.
*
* A modem context driver allowing application to handle all
* aspects of received protocol data.
*/
/*
* Copyright (c) 2019 Foundries.io
*
* SPDX-License-Identi<|fim_suffix|> id.
*
* @retval modem context or NULL.
*/
struct modem_context *modem_c... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>out occurred
*/
static inline int modem_iface_uart_rx_wait(struct modem_iface *iface, k_timeout_t timeout)
{
struct modem_iface_uart_data *data = (struct modem_iface_uart_data *)iface->iface_data;
return k_sem_take(&data->rx_sem, timeout);
}
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_INCLUDE_DRIVE... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2022, Commonwealth Scientific and Industrial Research
* Organisation (CSIRO) ABN 41 687 119 230.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/logging/log.h>
#include <zephyr/kernel.h>
#include <zephyr/drivers/uart.h>
#include "modem_context.h"
#include "modem_iface... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>n 0;
}
<|fim_prefix|>/** @file
* @brief interface for modem context
*
* UART-based modem interface implementation for modem context driver.
*/
/*
* Copyright (c) 2019 Foundries.io
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(modem_iface_uart, CON... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> size, buf);
k_sem_init(&ctx->rx_sem, 0, 1);
ret = mdm_receiver_get(ctx);
if (ret < 0) {
return ret;
}
mdm_receiver_setup(ctx);
return 0;
}
<|fim_prefix|>/** @file
* @brief Modem receiver driver
*
* A modem receiver driver allowing application to handle all
* aspects of received protocol dat... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/** @file
* @brief Modem receiver header file.
*
* A modem receiver driver allowing application to handle all
* aspects of received protocol data.
*/
/*
* Copyright (c) 2018 Foundries.io
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_DRIVERS_MODEM_MODEM_RECEIVER_H_
#define ZE... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> "Please enter a modem index\n");
return -EINVAL;
}
/* <index> of modem receiver */
i = (int)strtol(argv[arg], &endptr, 10);
if (*endptr != '\0') {
shell_fprintf(sh, SHELL_ERROR,
"Please enter a modem index\n");
return -EINVAL;
}
mdm_ctx = ms_context_from_id(i);
if (!mdm_ctx)... | fim | zephyrproject-rtos/zephyr | c |
/** @file
* @brief Modem socket / packet size handler
*
* Generic modem socket and packet size implementation for modem context
*/
/*
* Copyright (c) 2019-2020 Foundries.io
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <zephyr/sys/fdtable.h>
#include "modem_socket.h"
/*
* P... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>ocket_put.
*
* @note If socket id is automatically assigned, the socket id will be a value between
* base_socket_id and (base_socket_id + socket_len).
* Otherwise, the socket id will be assigned to (base_socket_id + socket_len) when allocated.
*
* @param cfg The modem socket config which the modem s... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>script, nordic_nrf91_slm_init_chat_script_cmds,
abort_matches, modem_cellular_chat_callback_handler, 10);
MODEM_CHAT_SCRIPT_CMDS_DEFINE(nordic_nrf91_slm_network_cmds,
MODEM_CHAT_SCRIPT_CMD_RESP("AT+CEREG=1", ok_match),
MODEM_CHAT_SCRIPT_CMD_RESP("AT+CEREG?", ok_match),
MODE... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2026 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/drivers/modem/modem_cellular.h>
#define DT_DRV_COMPAT nordic_nrf93m1
MODEM_CELLULAR_COMMON_CHAT_MATCHES();
MODEM_CHAT_MATCH_DEFINE(pwd_match, "POWERED DOWN", "", NULL);
MODEM_CHAT_MATCHES_D... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> \
\
MODEM_CELLULAR_DEFINE_AND_INIT_USER_PIPES(inst, (user_pipe_0, 3), (user_pipe_1, 4)) \
... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2026 Embeint Inc
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/drivers/modem/modem_cellular.h>
#define DT_DRV_COMPAT quectel_eg25_g
MODEM_CELLULAR_COMMON_CHAT_MATCHES();
MODEM_CHAT_MATCHES_DEFINE(quectel_eg25_g_unsol, MODEM_CELLULAR_COMMON_UNSOL_MATCHES);
MODEM_CH... | fim | zephyrproject-rtos/zephyr | c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.