text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_suffix|>dai_nxp_micfil_probe, .remove = dai_nxp_micfil_remove, .config_set = dai_nxp_micfil_set_config, .config_get = dai_nxp_micfil_get_config, .get_properties = dai_nxp_micfil_get_properties, .trigger = dai_nxp_micfil_trigger, }; static int micfil_init(const struct device *dev) { const struct dai_n...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> } /* get default configurations */ get_bclk_default_config(&tx_config->bitClock); get_fsync_default_config(&tx_config->frameSync); get_serial_default_config(&tx_config->serialData); get_fifo_default_config(&tx_config->fifo); /* note1: this may be obvious but enabling multiple SAI * channels (o...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* Copyright 2023 NXP * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_DAI_NXP_SAI_H_ #define ZEPHYR_DRIVERS_DAI_NXP_SAI_H_ #include <zephyr/drivers/clock_control.h> #include <zephyr/drivers/pinctrl.h> #include <zephyr/logging/log.h> #include <fsl_sai.h> LOG_MODULE_REGISTER(nxp_dai_...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2026 by Sven Hädrich <sven.haedrich@sevenlab.de> * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT zephyr_dali_pwm #include <inttypes.h> #include <zephyr/drivers/dali.h> #include <zephyr/drivers/counter.h> #include <zephyr/drivers/gpio.h> #include <zephyr/drivers/pwm....
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2026 by Sven Hädrich <sven.haedrich@sevenlab.de> * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_DALI_TIMINGS_H_ #define ZEPHYR_DRIVERS_DALI_TIMINGS_H_ /* timing definitions given by the DALI standard - for use by DALI driver implementations */ /* IEC 62386-101:2022 4.10 Table 4...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>x1UL << ATBFUNNEL_CTRLREG_ENS2_Pos) #define ATBFUNNEL_CTRLREG_ENS3_Pos (3UL) #define ATBFUNNEL_CTRLREG_ENS3_Msk (0x1UL << ATBFUNNEL_CTRLREG_ENS3_Pos) #define ATBFUNNEL_CTRLREG_ENS4_Pos (4UL) #define ATBFUNNEL_CTRLREG_ENS4_Msk (0x1UL << ATBFUNNEL_CTRLREG_ENS4_Pos) #define ATBFUNNEL_CTRLREG_ENS5_Pos (5UL) #...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>, size_t buf_word_len) { mem_addr_t etr = DT_REG_ADDR(DT_NODELABEL(etr)); coresight_unlock(etr); sys_write32(buf_word_len, etr + ETR_RSZ_OFFSET); sys_write32(buf, etr + ETR_RWP_OFFSET); sys_write32(buf, etr + ETR_DBALO_OFFSET); sys_write32(0UL, etr + ETR_DBAHI_OFFSET); sys_write32(ETR_FFCR_ENFT_M...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ #include <stdint.h> #include <zephyr/kernel.h> #include <zephyr/drivers/uart.h> #include <zephyr/cache.h> #include <zephyr/shell/shell.h> #include <zephyr/logging/log.h> #include <zephyr/logging/log_output.h> ...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2025 Silicon Laboratories Inc. * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/drivers/pinctrl.h> #include <rail.h> #define DT_DRV_COMPAT silabs_pti struct silabs_pti_config { const struct pinctrl_dev_config *pcfg; RAIL_PtiMode_t mode; uint32_t baud; }; int silabs_pti_init(con...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2016 Intel Corporation. * Copyright (c) 2022-2024 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ #include <string.h> #include <zephyr/types.h> #include <zephyr/sys/__assert.h> #include <zephyr/sys/util.h> #include <zephyr/drivers/disk.h> #include <errno.h> #in...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>e DISK_IOCTL_GET_SECTOR_COUNT: acquire_disk(disk); if (!ctx->initialised) { release_disk(disk); return -EINVAL; } *(uint32_t *)buff = dhara_map_capacity(&ctx->dhara_map); release_disk(disk); break; case DISK_IOCTL_GET_SECTOR_SIZE: acquire_disk(disk); if (!ctx->initialised) { re...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2023-2024 Embedded Solutions GmbH * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/drivers/disk.h> #include <zephyr/fs/fs.h> #include <zephyr/fs/fs_interface.h> #include <zephyr/logging/log.h> #include <zephyr/sys/util.h> #include <zephyr/drivers/loopback_disk.h> LOG_M...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>; DT_INST_FOREACH_STATUS_OKAY(DISK_ACCESS_MMC_INIT) <|fim_prefix|>/* * Copyright 2022 NXP * * SPDX-License-Identifier: Apache-2.0 */ /* * MMC disk driver using zephyr SD subsystem */ #define DT_DRV_COMPAT zephyr_mmc_disk #include <zephyr/sd/mmc.h> #include <zephyr/drivers/disk.h> enum sd_status...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2022 Intel Corporation * SPDX-License-Identifier: Apache-2.0 * * Derived from FreeBSD original driver made by Jim Harris * with contributions from Alexander Motin and Wojciech Macek */ #ifndef ZEPHYR_DRIVERS_DISK_NVME_NVME_H_ #define ZEPHYR_DRIVERS_DISK_NVME_NVME_H_ #include "nv...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>qpair->cpl, 0, qpair->num_entries * sizeof(struct nvme_completion)); } static int nvme_cmd_qpair_fill_prp_list(struct nvme_cmd_qpair *qpair, struct nvme_request *request, int n_prp) { struct nvme_prp_list *prp_list; uintptr_t p_addr; int idx; prp_list = nvme_prp_list_alloc(); if (...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2022 Intel Corporation * SPDX-License-Identifier: Apache-2.0 * * Derived from FreeBSD original driver made by Jim Harris * with contributions from Alexander Motin and Wojciech Macek */ #ifndef ZEPHYR_DRIVERS_DISK_NVME_NVME_COMMAND_H_ #define ZEPHYR_DRIVERS_DISK_NVME_NVME_COMMAND_H_ #include <...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>uct nvme_completion_poll_status status = NVME_CPL_STATUS_POLL_INIT(status); nvme_ctrlr_cmd_identify_controller(nvme_ctrlr, nvme_completion_poll_cb, &status); nvme_completion_poll(&status); if (nvme_cpl_status_is_error(&status)) { LOG_ERR("Could not identify the controller"); nvme_complet...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2022 Intel Corporation * SPDX-License-Identifier: Apache-2.0 * * Derived from FreeBSD original driver made by Jim Harris */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(nvme, CONFIG_NVME_LOG_LEVEL); #include <zephyr/kernel.h> #include <zephyr/sys/byteorder.h> #include <str...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2022 Intel Corporation * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(nvme, CONFIG_NVME_LOG_LEVEL); #include <zephyr/kernel.h> #include <zephyr/sys/byteorder.h> #include "nvme.h" static int nvme_disk_status(struct disk_info *disk) { r...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> NVME_NS_DATA_DPC_PIT1_SHIFT (0) #define NVME_NS_DATA_DPC_PIT1_MASK (0x1) /* protection information type 2 */ #define NVME_NS_DATA_DPC_PIT2_SHIFT (1) #define NVME_NS_DATA_DPC_PIT2_MASK (0x1) /* protection information type 3 */ #define NVME_NS_DATA_DPC_PIT3_SHIFT (2) #define NVME_NS_DATA_DPC_PIT3...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2022 Intel Corporation * SPDX-License-Identifier: Apache-2.0 * * Derived from FreeBSD original driver made by Jim Harris */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(nvme, CONFIG_NVME_LOG_LEVEL); #include <zephyr/kernel.h> #include <zephyr/sys/byteorder.h> #include <stdio.h> #includ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>o disk; uint32_t id; uint32_t flags; uint32_t boundary; char name[NVME_NAMESPACE_NAME_MAX_LENGTH]; }; enum nvme_namespace_flags { NVME_NS_DEALLOCATE_SUPPORTED = 0x1, NVME_NS_FLUSH_SUPPORTED = 0x2, }; uint32_t nvme_namespace_get_sector_size(struct nvme_namespace *ns); uint64_t nvme_namespace_get_...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2016 Intel Corporation. * Copyright (c) 2021,2023 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ #include <string.h> #include <zephyr/types.h> #include <zephyr/drivers/disk.h> #include <errno.h> #include <zephyr/init.h> #include <zephyr/device.h> #include <zep...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> { struct stm32_sdmmc_priv *priv = CONTAINER_OF(item, struct stm32_sdmmc_priv, work); if (stm32_sdmmc_card_present(priv)) { LOG_DBG("card inserted"); priv->status = DISK_STATUS_UNINIT; } else { LOG_DBG("card removed"); stm32_sdmmc_access_deinit(priv); priv->status = DIS...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>_read, .write = disk_sdmmc_access_write, .erase = disk_sdmmc_access_erase, .ioctl = disk_sdmmc_access_ioctl, }; static int disk_sdmmc_init(const struct device *dev) { const struct sdmmc_config *config = dev->config; struct sdmmc_data *data = dev->data; data->status = SD_UNINIT; data->disk_info.na...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> enum display_pixel_format current_pixel_format) { return state != NULL && state->converted_buf != NULL && state->input_format != PIXEL_FORMAT_I_4 && state->input_format == current_pixel_format; } void display_color_dither_patch_caps(struct display_color_dither_state *state, ...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2026 Fabian Blatz <fabianblatz@gmail.com> * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT eink_ac057tc1 #include <zephyr/device.h> #include <zephyr/kernel.h> #include <zephyr/drivers/gpio.h> #include <zephyr/drivers/display.h> #include <zephyr/drivers/display/ac057tc1.h> #inclu...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2026 Qualcomm Innovation Center, Inc. * * SPDX-License-Identifier: Apache-2.0 * * Display driver for a monochrome / grayscale LED matrix driven by * charlieplexed GPIOs. * * Charlieplexing drives up to N*(N-1) LEDs from N GPIO lines: each LED sits * between an ordered pair of l...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright 2025 NXP * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT chipone_co5300 #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(co5300, CONFIG<|fim_suffix|>e <zephyr/drivers/mipi_dsi.h> #include <zephyr/drivers/gpio.h> #include <zephyr/sys/byteorder.h> #include <zephyr/ke...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2018 Jan Van Winkel <jan.van_winkel@dxplore.eu> * Copyright (c) 2021 Nordic Semiconductor * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT zephyr_dummy_dc #include <errno.h> #include <string.h> #include <zephyr/drivers/display.h> #include <zephyr/device.h> struc...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2026 The Zephyr Project Contributors * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT eink_ed2208_gca #include <string.h> #include <zephyr/device.h> #include <zephyr/drivers/display.h> #include <zephyr/drivers/display/color_dither.h> #include <zephyr/drivers/display/...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>C9X01X_CMD_PWRCTRL3, regs->pwrctrl3, sizeof(regs->pwrctrl3)); if (ret < 0) { return ret; } ret = gc9x01x_transmit(dev, GC9X01X_CMD_PWRCTRL4, regs->pwrctrl4, sizeof(regs->pwrctrl4)); if (ret < 0) { return ret; } ret = gc9x01x_transmit(dev, GC9X01X_CMD_GAMMA1, regs->gamma1, sizeof(regs->gamma1)); ...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/** * Copyright (c) 2023 Mr Beam Lasers GmbH. * Copyright (c) 2023 Amrith Venkat Kesavamoorthi <amrith@mr-beam.org> * Copyright (c) 2023 Mart<|fim_suffix|> 0x30U /* Partial Area */ #define GC9X01X_CMD_VSCRDEF 0x33U /* Vertical Scrolling Definition */ #define GC9X01X_CMD_TEOFF 0x34U /* Tearing...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2025 Siratul Islam <email@sirat.me> * SPDX-License-Identifier: Apache-2.0 * * Driver for 32x16 monochrome P10 LED panels with HUB12 interface. */ #include <zephyr/kernel.h> #include <zephyr/device.h> #include <zephyr/drivers/display.h> #include <zephyr/drivers/gpio.h> #include <ze...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2026 Andrew Yong <me@ndoo.sg> * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT himax_hx8353e #include <string.h> #include <zephyr/kernel.h> #include <zephyr/drivers/display.h> #include <zephyr/drivers/mipi_dbi.h> #include <zephyr/sys/byteorder.h> #include <zephyr/l...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright 2025, Charles Dias * * SPDX-License-Identifier: Apache-2.0 * * Driver implementation based on ST code sample DSI_VideoMode_SingleBuffer from : * https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/STM32U5x9J-DK/ */ #define DT_DRV_COMPAT himax_hx8379c #include <zephyr/drivers/dis...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright 2023, NXP * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT himax_hx8394 #include <zephyr/drivers/display.h> #include <zephyr/drivers/mipi_dsi.h> #include <zephyr/drivers/gpio.h> #include <zephyr/kernel.h> #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(hx8394, CON...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2025 CATIE * * SPDX-License-Identifier: Apache-2.0 */ #include "display_ili9163c.h" #include "display_ili9xxx.h" #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(display_ili9163c, CONFIG_DISPLAY_LOG_LEVEL); int ili9163c_regs_init(const struct device *dev) { const struct ili9x...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>UM_IDX(DT_INST(n, ilitek_ili9163c), pwctrl4)}, \ .pwctrl5 = {DT_ENUM_IDX(DT_INST(n, ilitek_ili9163c), pwctrl5)}, \ .vmctrl1 = DT_PROP(DT_INST(n, ilitek_ili9163c), vmctrl1), \ .vmctrl2 = DT_PROP(DT_INST(n, ilitek_ili9163c), vmctrl2), ...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2020 Teslabs Engineering S.L. * * SPDX-License-Identifier: Apache-2.0 */ #include "display_ili9340.h" #include "display_ili9xxx.h" #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(display_ili9340, CONFIG_DISPLAY_LOG_LEVEL); int ili9340_regs_init(const struct device *dev) { const struct ili...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2020 Teslabs Engineering S.L. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_DISPLAY_DISPLAY_ILI9340_H_ #define ZEPHYR_DRIVERS_DISPLAY_DISPLAY_ILI9340_H_ #include <zephyr/device.h> /* Commands/registers. */ #define ILI9340_GAMSET 0x26 #define ILI9340_FRMCTR1 0xB...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2020 Teslabs Engineering S.L. * Copyright (c) 2021 Krivorot Oleg <krivorot.oleg@gmail.com> * Copyright (c) 2022 Konstantinos Papadopoulos <kostas.papadopulos@gmail.com> * * SPDX-License-Identifier: Apache-2.0 */ #include "display_ili9341.h" #include "display_ili9xxx.h" #include ...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2020 Teslabs Engineering S.L. * Copyright (c) 2021 Krivorot Oleg <krivorot.oleg@gmail.com> * Copyright (c) 2022 Konstantinos Papadopoulos <kostas.papadopulos@gmail.com> * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_DISPLAY_DISPLAY_ILI9341_H_ #define ZEPHYR_DRIV...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>R_LEN); if (r < 0) { return r; } LOG_HEXDUMP_DBG(regs->disctrl, ILI9342C_DISCTRL_LEN, "DISCTRL"); r = ili9xxx_transmit(dev, ILI9342C_DISCTRL, regs->disctrl, ILI9342C_DISCTRL_LEN); if (r < 0) { return r; } LOG_HEXDUMP_DBG(regs->etmod, ILI9342C_ETMOD_LEN, "ETMOD"); r = ili9xxx_transmit...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2020 Teslabs Engineering S.L. * Copyright (c) 2021 Krivorot Oleg <krivorot.oleg@gmail.com> * Copyright (c) 2022 Konstantinos Papadopoulos <kostas.papadopulos@gmail.com> * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_DISPLAY_DISPLAY_ILI9342C_H_ #define ZEPHYR_DRI...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2020 Teslabs Engineering S.L. * * SPDX-License-Identifier: Apache-2.0 */ #include "display_ili9488.h" #include "display_ili9xxx.h" #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(display_ili9488, CONFIG_DISPLAY_LOG_LEVEL); int ili9488_regs_init(const struct device *dev) { co...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2020 Teslabs Engineering S.L. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_DISPLAY_DISPLAY_ILI9488_H_ #define ZEPHYR_DRIVERS_DISPLAY_DISPLAY_ILI9488_H_ #include <zephyr/device.h> /* Commands/registers. */ #define ILI9488_FRMCTR1 0xB1 #define ILI9488_DISCTRL 0x...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Renesas Electronics Corporation * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT ilitek_ili9806e #include <zephyr/kernel.h> #include <zephyr/drivers/display.h> #include <zephyr/drivers/mipi_dsi.h> #include <zephyr/drivers/gpio.h> #include <zephyr/sys/byteorder...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>LINE - LCD_VTIMMING_BACK_PORCH - LCD_VTIMMING_SYNC #endif /* ZEPHYR_DRIVERS_DISPLAY_ILITEK_ILI9806E_H_ */ <|fim_prefix|>/* * Copyright (c) 2024 Renesas Electronics Corporation * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_DISPLAY_ILITEK_ILI9806E_H_ #define ZEPHYR_DRIVERS_DISPLAY_...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2017 Jan Van Winkel <jan.van_winkel@dxplore.eu> * Copyright (c) 2019 Nordic Semiconductor ASA * Copyright (c) 2020 Teslabs Engineering S.L. * Copyright (c) 2021 Krivorot Oleg <krivorot.oleg@gmail.com> * SPDX-License-Identifier: Apache-2.0 */ #include "display_ili9xxx.h" #include ...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2017 Jan Van Winkel <jan.van_winkel@dxplore.eu> * Copyright (c) 2019 Nordic Semiconductor ASA * Copyright (c) 2020 Teslabs Engineering S.L. * Copyright (c) 2021 Krivorot Oleg <krivorot.oleg@gmail.com> * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_DISPLAY_DISPL...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>requested dimensions. Compute * the pitch and adjust the start address center our canvas. */ uint16_t adj_x; uint16_t adj_y; uint32_t *buffer; adj_x = info->fb_width - config->width; adj_y = info->fb_height - config->height; data->pitch = (info->fb_pitch / 4) + adj_x; adj_x /= 2U; ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>fig = dev->config; memset(caps, 0, sizeof(struct display_capabilities)); caps->x_resolution = config->width; caps->y_resolution = config->height; caps->supported_pixel_formats = PIXEL_FORMAT_MONO10 | PIXEL_FORMAT_MONO01; caps->current_pixel_format = PIXEL_FORMAT_MONO01; caps->current_orientation = ...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024<|fim_suffix|>SC_CONTROL 0x2a #define IST3931_CMD_DRIVER_DISPLAY_CONTROL 0x60 #define IST3931_CMD_SW_RESET 0x76 #define IST3931_CMD_SET_DUTY_LSB 0x90 #define IST3931_CMD_SET_DUTY_MSB 0xa0 #define IST3931_CMD_DISPLAY_ON_OFF 0x3c #...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2026 The Zephyr Project Contributors * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT ite_it8951 #include <stdint.h> #include <string.h> #include <zephyr/device.h> #include <zephyr/drivers/display.h> #include <zephyr/drivers/gpio.h> #include <zephyr/drivers/spi.h>...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 TOKITA Hiroshi * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT led_strip_matrix #include <zephyr/drivers/display.h> #include <zephyr/drivers/led_strip.h> #include <zephyr/sys/util.h> #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(led_strip_matrix, CONFI...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>T(0x07E0, color); uint8_t b = FIELD_GET(0x001F, color); r >>= 4; g >>= 5; b >>= 4; return (r << 2) | (g << 1) | b; } /* Pack one row of RGB565 pixels into panel format */ static void lpm_pack_row(const struct device *dev, uint8_t *dst, const uint16_t *src) { const struct lpm013m126_config *cfg = d...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>("Failed to set scan limit"); return ret; } ret = max7219_transmit_all(dev, MAX7219_REG_SHUTDOWN, MAX7219_LEAVE_SHUTDOWN_MODE); if (ret < 0) { LOG_ERR("Failed to leave shutdown state"); return ret; } const struct display_buffer_descriptor desc = { .buf_size = dev_config->num_cascading * MAX...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright 2023-2026 NXP * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT nxp_dcnano_lcdif #include <zephyr/drivers/clock_control.h> #include <zephyr/drivers/display.h> #include <zephyr/drivers/gpio.h> #include <zephyr/drivers/reset.h> #include <zephyr/kernel.h> #include <zephyr/...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright 2019-24, NXP * Copyright (c) 2022, Basalte bv * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT nxp_imx_elcdif #include <zephyr/drivers/display.h> #include <zephyr/drivers/pinctrl.h> #include <zephyr/drivers/gpio.h> #include <zephyr/kernel.h> #include <fsl_elcdif.h> #...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright 2026 NXP * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT nxp_imx_lcdifv2 #include <zephyr/drivers/display.h> #include <zephyr/drivers/pinctrl.h> #include <zephyr/drivers/gpio.h> #include <zephyr/kernel.h> #include <fsl_lcdifv2.h> #ifdef CONFIG_HAS_MCUX_CACHE #include...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>onfig.panelWidth, display_config.panelHeight); LCDIFV3_EnableLayer(base, 0, true); LCDIFV3_EnablePlanePanic(base); LCDIFV3_SetLayerBufferAddr(base, 0, (uint32_t)(uintptr_t)data->fb[0]); LCDIFV3_TriggerLayerShadowLoad(base, 0); LCDIFV3_EnableInterrupts(base, kLCDIFV3_VerticalBlankingInterrupt); LOG_...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2021, Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/drivers/display.h> #include <zephyr/devicetree.h> #include <zephyr/dt-bindings/gpio/gpio.h> #include <soc.h> #include <hal/nrf_timer.h> #ifdef PWM_PRESENT #include <hal/nrf_pwm.h> #endif #inc...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>& ret == 0; i++) { ret = nt35510_write_reg(dev, cmd->reg, cmd->cmd, cmd->cmd_len); cmd++; } return ret; } /* Initialization, configuration turn on sequence */ static int nt35510_config(const struct device *dev) { struct nt35510_data *data = dev->data; int ret; ret = nt35510_write_sequence(dev, ...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Erik Andersson <erian747@gmail.com> * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_DISPLAY_DISPLAY_NT35510_H_ #define ZEPHYR_DRIVERS_DISPLAY_DISPLAY_NT35510_H_ /** * @name Controller registers * @{ */ /* NT35510 ID */ #define NT35510_ID 0x80U #define ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>backlight, 0); if (ret) { LOG_ERR("Disable backlight failed! (%d)", ret); return ret; } } return otm8009a_dcs_write(dev, MIPI_DCS_SET_DISPLAY_OFF, NULL, 0); } static int otm8009a_blanking_off(const struct device *dev) { const struct otm8009a_config *cfg = dev->config; int ret; if (cfg->b...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2023 bytes at work AG * Copyright (c) 2020 Teslabs Engineering S.L. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_DISPLAY_DISPLAY_OTM8009A_H_ #define ZEPHYR_DRIVERS_DISPLAY_DISPLAY_OTM8009A_H_ /** * @name General parameters. * @{ */ /** ID1 */ #define OTM8...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2026 Maximilian Zimmermann * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT qemu_ramfb #include <stdint.h> #include <errno.h> #include <zephyr/devicetree.h> #include <zephyr/device.h> #include <zephyr/drivers/display.h> #include <zephyr/drivers/firmware/qemu_fwcfg/...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2023 Renesas Electronics Corporation * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT renesas_smartbond_display #include <zephyr/drivers/pinctrl.h> #include <zephyr/drivers/gpio.h> #include <zephyr/irq.h> #include <zephyr/kernel.h> #include <zephyr/device.h> #incl...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>incfg != NULL) { err = pinctrl_apply_state(config->pincfg, PINCTRL_STATE_DEFAULT); if (err) { LOG_ERR("pin function initial failed"); return err; } } k_sem_init(&data->frame_buf_sem, 0, 1); err = clock_control_on(config->clock_dev, (clock_control_subsys_t)&config->clock_glcdc_su...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024-2025 Renesas Electronics Corporation * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_DISPLAY_RENESAS_RA_H_ #define ZEPHYR_DRIVERS_DISPLAY_RENESAS_RA_H_ #include <zephyr/drivers/display.h> #define ROUND_UP_64BYTES(x) ROUND_UP(x, NUM_BITS(uint64_t)) #defin...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>+= wlen; local_src += wlen + len_sent / (desc->width * data->bytes_per_pixel) * ((desc->pitch - desc->width) * data->bytes_per_pixel); } else { local_src += wlen; } len -= wlen; /* All future commands should use WRITE_MEMORY_CONTINUE */ msg.cmd = MIPI_DCS_WRITE_MEMORY_CONTINUE; } ret...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright 2026 NXP * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT raydium_rm67199 #include <zephyr/drivers/display.h> #include <zephyr/drivers/gpio.h> #include <zephyr/drivers/mipi_dsi.h> #include <zephyr/kernel.h> #include <zephyr/logging/log.h> #include <zephyr/sys/byteorder...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>dcs_write(dev, 0x83, &param, 1); param = 0x12; rm68200_dcs_write(dev, 0x84, &param, 1); param = 0x08; rm68200_dcs_write(dev, 0x85, &param, 1); param = 0x3F; rm68200_dcs_write(dev, 0x86, &param, 1); param = 0x3F; rm68200_dcs_write(dev, 0x87, &param, 1); param = 0x3F; rm68200_dcs_write(dev, 0...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>am; ret = mipi_dsi_dcs_write(config->mipi_dsi, config->channel, cmd, &param, 1); if (ret < 0) { return ret; } } k_sleep(K_MSEC(80)); ret = mipi_dsi_dcs_write(config->mipi_dsi, config->channel, MIPI_DCS_SOFT_RESET, NULL, 0); if (ret < 0) { return ret; } /* Delay 80 ms before enter DSI mo...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> \ CONFIG_DISPLAY_INIT_PRIORITY, &rpi_bcm2711_fb_api); DT_INST_FOREACH_STATUS_OKAY(RPI_BCM2711_FB_DEFINE) <|fim_prefix|>/* * Copyright (c) 2026 Muhammad Waleed Badar * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT raspberrypi_bcm2711_framebuffer #i...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>32_t *pix_ptr; uint8_t *buf8; __ASSERT((desc->pitch * desc->height) <= (desc->buf_size * 8U), "Read buffer is too small"); for (uint32_t h_idx = 0U; h_idx < desc->height; ++h_idx) { for (uint32_t w_idx = 0U; w_idx < desc->width; ++w_idx) { pix_ptr = (const uint32_t *)read_buf + h_idx * desc->pit...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>erer != NULL) { SDL_DestroyRenderer(*params->renderer); *params->renderer = NULL; } if (*params->window != NULL) { SDL_DestroyWindow(*params->window); *params->window = NULL; } } <|fim_prefix|>/* * Copyright (c) 2018 Jan Van Winkel <jan.van_winkel@dxplore.eu> * Copyright (c) 2023 Nordic Semi...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>write_params *params); int sdl_display_read_bottom(const struct sdl_display_read_params *params); void sdl_display_blanking_off_bottom(const struct sdl_display_blanking_off_params *params); void sdl_display_blanking_on_bottom(void *renderer); void sdl_display_cleanup_bottom(const struct sdl_display_cleanu...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2025 MASSDRIVER EI (massdriver.space) * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(sh1122, CONFIG_DISPLAY_LOG_LEVEL); #include <string.h> #include <zephyr/device.h> #include <zephyr/init.h> #include <zephyr/drivers/display.h> #incl...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>ilities, .get_framebuffer = dpu_get_framebuffer, }; /* Use 4 Bpp to calculate the largest possible framebuffer size. */ #define DPU_FRAMEBUFFER_DECL(id) \ static uint8_t __aligned(32) ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> \ \ DEVICE_DT_DEFINE(node_id, ssd1306_init, NULL, &data##node_id, &config##node_id, \ POST_KERNEL, CONFIG_DISPLAY_INIT_PRIORITY, &ssd1306_driver_api); DT_FOREACH_STATUS_OKAY_VARGS(sol...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>h, 1); if (err < 0) { return err; } err = config->write_cmd(dev, SSD1320_SET_OSC_FREQ, &config->oscillator_freq, 1); if (err < 0) { return err; } err = config->write_cmd(dev, SSD1320_LINEAR_LUT, NULL, 0); if (err < 0) { return err; } err = config->write_cmd(dev, SSD1320_SET_PRECHARGE_VOLTAG...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Savoir-faire Linux * Copyright (c) 2025-2026 MASSDRIVER EI (massdriver.space) * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(ssd1327_5, CONFIG_DISPLAY_LOG_LEVEL); #include <string.h> #include <zephyr/device.h> #include <zephyr/...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2025 MASSDRIVER EI (massdriver.space) * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(ssd1331, CONFIG_DISPLAY_LOG_LEVEL); #include <string.h> #include <zephyr/device.h> #include <zephyr/init.h> #include <zephyr/drivers/display.h> #inc...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2025 MASSDRIVER EI (massdriver.space) * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(ssd135x, CONFIG_DISPLAY_LOG_LEVEL); #include <string.h> #include <zephyr/device.h> #include <zephyr/init.h> #include <zephyr/drivers/display.h> #inc...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> 1}; err = config->write_cmd(dev, SSD1363_SET_COLUMN_ADDR, x_position, sizeof(x_position)); if (err < 0) { return err; } err = config->write_cmd(dev, SSD1363_SET_ROW_ADDR, y_position, sizeof(y_position)); if (err < 0) { return err; } return config->write_cmd(dev, SSD1363_WRITE_RAM, NULL, 0); }...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2025 MASSDRIVER EI (massdriver.space) * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(st730x, CONFIG_DISPLAY_LOG_LEVEL); #include <string.h> #include <zephyr/device.h> #include <zephyr/init.h> #in<|fim_suffix|>x40) >> 3 | (buf[ip...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>YSCALE; ret = st75256_write_command(dev, ST75256_COLOR_MODE, data, 1); if (ret < 0) { return ret; } #else data[0] = ST75256_MONO; ret = st75256_write_command(dev, ST75256_COLOR_MODE, data, 1); if (ret < 0) { return ret; } #endif ret = st75256_write_command(dev, config->lsb_invdir ? ST75256_LS...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2025 MASSDRIVER EI (massdriver.space) * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(display_st7567, CONFIG_DISPLAY_LOG_LEVEL); #include <string.h> #include <zephyr/device.h> #include <zephyr/init.h> #include <zephyr/drivers/display....
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>* Inversion controls */ #define ST7567_SET_NORMAL_DISPLAY 0xA6 #define ST7567_SET_REVERSE_DISPLAY 0xA7 /* COM invdir */ #define ST7567_SET_COM_OUTPUT_SCAN_FLIPPED 0xC8 #define ST7567_SET_COM_OUTPUT_SCAN_NORMAL 0xC0 /* SEG invdir */ #define ST7567_SET_SEGMENT_MAP_FLIPPED 0xA1 #define ST7567_SET_SEGMENT...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>= { 0, x / ST7586S_PPC, 0, ((x + width) / ST7586S_PPC) - 1 }; ret = st7586s_write_command(dev, ST7586S_SET_ROW_RANGE, y_position, 4); if (ret < 0) { return ret; } return st7586s_write_command(dev, ST7586S_SET_COL_RANGE, x_position, 4); } static int st7586s_start_write(const struct device *dev) { ...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2025 Arduino SA * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT sitronix_st7701 #include <zephyr/kernel.h> #include <zephyr/drivers/display.h> #include <zephyr/drivers/mipi_dsi.h> #include <zephyr/drivers/gpio.h> #include <zephyr/pm/device.h> #include <zephyr/sys/...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2017 Jan Van Winkel <jan.van_winkel@dxplore.eu> * Copyright (c) 2019 Nordic Semiconductor ASA * Copyright (c) 2019 Marc Reilly * Copyright (c) 2019 PHYTEC Messtechnik GmbH * Copyright (c) 2020 Endian Technologies AB * Copyright (c) 2020 Kim Bøndergaard <kim@fam-boendergaard.dk> *...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2020 Kim Bøndergaard <kim@fam-boendergaard.dk> * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ST7735R_DISPLAY_DRIVER_H__ #define ST7735R_DISPLAY_DRIVER_H__ #include <zephyr/kernel.h> #define ST7735R_CMD_SW_RESET 0x01 #define ST7735R_CMD_RDDID 0x04 #def...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2017 Jan Van Winkel <jan.van_winkel@dxplore.eu> * Copyright (c) 2019 Nordic Semiconductor ASA * Copyright (c) 2019 Marc Reilly * Copyright (c) 2019 PHYTEC Messtechnik GmbH * Copyright (c) 2020 Endian Technologies AB * Copyright (c) 2022 Basalte bv * SPDX-FileCopyrightText: 2026 A...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2019 Marc Reilly * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ST7789V_DISPLAY_DRIVER_H__ #define ST7789V_DISPLAY_DRIVER_H__ #include <zephyr/kernel.h> #define ST7789V_CMD_NOP 0x00 #define ST7789V_CMD_SW_RESET 0x01 #define ST7789V_CMD_SLEEP_IN 0x10 #define ST7789V_CMD...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright 2023, NXP * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT sitronix_st7796s #include <zephyr/device.h> #include <zephyr/drivers/display.h> #include <zephyr/pm/device.h> #include <zephyr/sys/byteorder.h> #include <zephyr/drivers/mipi_dbi.h> #include <zephyr/logging/log...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright 2023, NXP * * SPDX-License-Identifier: Apache-2.0 */ #ifndef _ZEPHYR_DRIVERS_DISPLAY_ST7796S_H_ #define _ZEPHYR_DRIVERS_DISPLAY_ST7796S_H_ #define ST7796S_CMD_SLPIN 0x10 /* Sleep in */ #define ST7796S_CMD_SLPOUT 0x11 /* Sleep out */ #define ST7796S_CMD_INVOFF 0x20 /* Display inversion...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2022 Byte-Lab d.o.o. <dev@byte-lab.com> * Copyright 2023 NXP * Copyright (c) 2024 STMicroelectronics * * SP<|fim_suffix|>SSERT(data->front_buf != pend_buf, "Buffers must be different"); k_sem_reset(&data->sem); data->pend_buf = pend_buf; __HAL_LTDC_CLEAR_FLAG(&data->hltdc, LT...
fim
zephyrproject-rtos/zephyr
c