text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
<|fim_suffix|>TL1->FCCTRLSEL[1] = SYSCTL1_FCCTRLSEL_SCKINSEL(1) |
SYSCTL1_FCCTRLSEL_WSINSEL(1);
/* Select Receive I2S - Flexcomm 0 Data in from shared signal set 0 */
SYSCTL1->FCCTRLSEL[0] |= SYSCTL1_FCCTRLSEL_DATAINSEL(1);
/* Select Transmit I2S - Flexcomm 1 Data out to shared signal set 0 */
SYSCTL1->FCCTRLS... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright (c) 2019 Vestas Wind Systems A/S
* Copyright (c) 2022 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#include <zephyr/drivers/pinctrl.h>
static int twr_ke18f_pinmux_init(void)
{
int err; /* Used by pinctrl functions */
/* Declare pin configuration state for flexio pin ... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>XP_IMXRT_BOOT_HEADER
__attribute__((section(".boot_hdr.conf")))
/* Config used for booting */
const struct flexspi_nor_config_t qspi_flash_config = {
.mem_config = {
.tag = FLEXSPI_CFG_BLK_TAG,
.version = FLEXSPI_CFG_BLK_VERSION,
.read_sample_clk_src =
FLEXSPI_READ_SAMPLE_CLK_LOOPBACK_INTERNAL... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright 2018-2020 NXP
* All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "evkmimxrt1170_flexspi_nor_config.h"
#if defined(CONFIG_NXP_IMXRT_BOOT_HEADER) && defined(CONFIG_BOOT_FLEXSPI_NOR)
__attribute__((section(".boot_hdr.conf"), used))
#define FLASH_DUMMY_CYCLES 0x0... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright 2018-2020, 2022 NXP
* All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef EVKMIMXRT1170_FLEXSPI_NOR_CONFIG_
#define EVKMIMXRT1170_FLEXSPI_NOR_CONFIG_
#include <stdint.h>
#include <stdbool.h>
#include "fsl_common.h"
/* FLEXSPI memory config block related definitio... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>TIVE));
}
static int board_particle_argon_init(void)
{
/*
* On power-up the SKY13351 is left uncontrolled, so neither
* PCB nor external antenna is selected. Select the PCB
* antenna.
*/
external_antenna(false);
return 0;
}
/* needs to be done after GPIO driver init, which is at
* POST_KE... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>PRIORITY_DEVICE);
<|fim_prefix|>/*
* Copyright (c) 2019 Foundries.io
* Copyright (c) 2019 Peter Bigot Consulting, LLC
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#include <zephyr/drivers/gpio.h>
#define ANT_UFLn_GPIO_SPEC GPIO_DT_SPEC_GET(DT_NODELABEL(sky13351), vctl1_gpios)... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2019 Peter Bigot Consulting, LLC
* Copyright (c) 2019 Foundries.io
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#include <zephyr/drivers/gpio.h>
#define SKY_UFLn_GPIO_SPEC GPIO_DT_SPEC_GET(DT_NODELABEL(sky13351), vctl1_gpios)
#define SKY_PCBn_GPIO_SPEC GPIO... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright 2020-2021 NXP
* All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "dcd.h"
#if defined(CONFIG_NXP_IMXRT_BOOT_HEADER) && defined(CONFIG_BOOT_FLEXSPI_NOR)
#if defined(CONFIG_NXP_IMXRT_BOOT_HEADER) && defined(CONFIG_DEVICE_CONFIGURATION_DATA)
__attribute__((section... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright 2020 NXP
* All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef DCD_
#define <|fim_suffix|>CD_TAG_HEADER (0xD2)
#define DCD_VERSION (0x41)
#define DCD_TAG_HEADER_SHIFT (24)
#define DCD_ARRAY_SIZE 1
#endif /* DCD_ */
<|fim_middle|>DCD_
#include... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>
[4 * 8 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD,
0xD8, RADDR_SDR, FLEXSPI_1PAD, 0x18),
/* Pape Program LUTs */
[4 * 9 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD,
0x02, RADDR_SDR, FLEXSPI_1PAD, 0x18),
[4 * 9 + 1] = FLEXSPI_LUT_SEQ(WRITE_SDR, FLEXSPI_1PAD,
0x04, STOP, FLEXSPI... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright 2018-2020, 2022 NXP
* All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef PHYCORE_FLEXSPI_NOR_CONFIG_
#define PHYCORE_FLEXSPI_NOR_CONFIG_
#include <stdint.h>
#include <stdbool.h>
#include "fsl_common.h"
/* FLEXSPI memory config block related definitions */
#defin... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>((section(".boot_hdr.xmcd_data"), used))
const uint32_t xmcd_data[] = {
/* Tag = 0xC, Version = 0, Memory Interface: SEMC,
* Instance: 0 - ignored,
* Configuration block type: 0 - Ignored(Handled inside
* the SDRAM configuration structure)
* Configuration block size: 13 (4-byte header + 9-byte
... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright 2022 NXP
* All rights reserved<|fim_suffix|>def XMCD_
#define XMCD_
#include <stdint.h>
#endif /* XMCD_ */
<|fim_middle|>.
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifn<|endoftext|> | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2018 Phytec Messtechnik GmbH
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#include <soc.h>
/* Peripheral voltage ON/OFF GPIO */
#define<|fim_suffix|>(GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos);
gpio->OUTSET = BIT(PERIPH_PON_PIN);
return 0;
}
SYS_I... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright (c) 2019, MADMACHINE LIMITED
* Copyright (c) 2021, Bernhard Kraemer
*
* refer to hal_nxp board file
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <flexspi_nor_config.h>
#ifdef CONFIG_NXP_IMXRT_BOOT_HEADER
__attribute__((section(".boot_hdr.conf")))
const struct flexspi_nor_config_t qspi_fl... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2021 Synopsys
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/devicetree.h>
#include <zephyr/arch/arc/v2/mpu/arc_mpu.h>
#include <zephyr/arch/arc/arch.h>
#include <zephyr/linker/linker-defs.h>
<|fim_suffix|>_t)_image_ram_start,
(uintptr_t)__arc_rw_sram_size,
REGI... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2016-2019 Nordic Semiconductor ASA
* Copyright (c) 2018 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <soc.h>
#include <zephyr/init.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/clock_control/nrf_clock_control.h>
#include <zephyr/dri... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>3.0 volts.
*/
if ((nrf_power_mainregstatus_get(NRF_POWER) ==
NRF_POWER_MAINREGSTATUS_HIGH) &&
((NRF_UICR->REGOUT0 & UICR_REGOUT0_VOUT_Msk) ==
(UICR_REGOUT0_VOUT_DEFAULT << UICR_REGOUT0_VOUT_Pos))) {
NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos;
while (NRF_NVMC->RE... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2025 Renesas Electronics Corporation
*
* SPDX-Licens<|fim_suffix|>os[0]) || !gpio_is_ready_dt(&i3c_pullup_gpios[1])) {
LOG_ERR("I3C pull-up control is not ready");
return -ENODEV;
}
if (gpio_pin_configure_dt(&i3c_pullup_gpios[0], GPIO_INPUT) ||
gpio_pin_configure_dt(&i3c_... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2025<|fim_suffix|>_dt(&i3c_pullup_gpios[0], GPIO_INPUT) ||
gpio_pin_configure_dt(&i3c_pullup_gpios[1], GPIO_INPUT)) {
LOG_ERR("Failed to configure pull-up control");
return -EIO;
}
return 0;
}
SYS_INIT(i3c_init, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
#endif
<|f... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2025 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/devicetree.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(board_control, CONFIG_LOG_DE<|fim_suffix|>C_GET_BY_IDX(DT_PA... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>t ready");
return -ENODEV;
}
if (gpio_pin_configure_dt(&i3c_pullup_gpios[0], GPIO_INPUT) ||
gpio_pin_configure_dt(&i3c_pullup_gpios[1], GPIO_INPUT)) {
LOG_ERR("Failed to configure pull-up control");
return -EIO;
}
return 0;
}
SYS_INIT(i3c_init, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DE... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright (c) 2026 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/devicetree.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(board_control, CONFIG_LOG_DEFAULT_LEVEL);
#if defined(CONFIG_ETH_PHY_DRIV... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2025 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/devicetree.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(board_control, CONFIG_LOG_DEFAULT_LEVEL);
#if defined(CONFI... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>gpio_is_ready_dt(&rf_switch_en)) {
gpio_pin_configure_dt(&rf_switch_en, GPIO_OUTPUT_ACTIVE);
}
const struct gpio_dt_spec ant_sel = GPIO_DT_SPEC_GET(DT_NODELABEL(rf_switch), select_gpios);
if (gpio_is_ready_dt(&ant_sel)) {
#ifdef CONFIG_XIAO_ESP32C6_EXT_ANTENNA
gpio_pin_configure_dt(&ant_sel, GPIO... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>NFIG_DISPLAY
ret = device_init(DEVICE_DT_GET(DT_NODELABEL(st7796s)));
if (ret != 0) {
LOG_ERR("Failed to init st7796s display driver: %d", ret);
return ret;
}
#endif /* CONFIG_DISPLAY */
#ifdef CONFIG_INPUT_GT911
ret = device_init(DEVICE_DT_GET(DT_NODELABEL(gt911_lcd_par_s035)));
if (ret != 0) {... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> = (struct supply_cfg){
.gpio = DEVICE_DT_GET(DT_GPIO_CTLR(CCS811, supply_gpios)),
.pin = DT_GPIO_PIN(CCS811, supply_gpios),
.flags = DT_GPIO_FLAGS(CCS811, supply_gpios),
};
/* Enable the CCS811 power */
rc = enable_supply(&cfg);
if (rc < 0) {
printk("CCS811 supply not enabled: %d\n", rc);
}... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2019 Interay Solutions B.V.
* Copyright (c) 2019 Oane Kingma
* Copyright (c) 2020 Thorvald Natvig
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/sys/printk.h>
#include "em_cmu.h"
#include "board.h"
static int... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>ion_rmii_refclk, 2)
/* The driver ties CMU_CLK2 to the refclk, and pin A3 is CMU_CLK2 #1 */
#define ETH_REF_CLK_LOCATION 1
#endif /* __INC_BOARD_H */
<|fim_prefix|>/*
* Copyright (c) 2019 Interay Solutions B.V.
* Copyright (c) 2019 Oane Kingma
* Copyright (c) 2020 Thorvald Natvig
*
* SPD... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>_PIN, GPIO_OUTPUT);
gpio_pin_set(cur_dev, ETH_REF_CLK_GPIO_PIN, 0);
CMU_OscillatorEnable(cmuOsc_HFXO, true, true);
/* enable CMU_CLK2 as RMII reference clock */
CMU->CTRL |= CMU_CTRL_CLKOUTSEL2_HFXO;
CMU->ROUTELOC0 = (CMU->ROUTELOC0 & ~_CMU_ROUTELOC0_CLKOUT2LOC_MASK) |
(ETH_REF_CLK_LOCATION ... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2019 Interay Solutions B.V.
* Copyright (c) 2019 Oane Kingma
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __INC_BOARD_H
#define __INC_BOARD_H
/* Ethernet specific pins */
#if<|fim_suffix|>i)
#define ETH_PWR_ENABLE_GPIO_PIN 10
#define ETH_RESET_GPIO_NODE DT_NODELABEL(gpio... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>/arc/v2/mpu/arc_mpu.h>
#include <zephyr/linker/linker-defs.h>
/*
* for secure firmware, MPU entries are only set up for secure world.
* All regions not listed here are shared by secure world and normal world.
*/
static struct arc_mpu_region mpu_regions[] = {
#if DT_REG_SIZE(DT_INST(0, arc_iccm)) > 0
... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2018 Synopsys
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#define PMODMUX_BASE_ADDR 0xF0000000
/*
* 32-bits, offset 0x0, This register controls mapping of the peripheral device
* signals on Pmod connectors
*/
#define PMOD_MUX_CTRL 0
/* 32-bits, offset 0... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright (c) 2019 Synopsys
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/devicetree.h>
#include <zephyr/arch/arc/v2/mpu/arc_mpu.h>
#include <zephyr/linker/linker-defs.h>
static struct arc_mpu_region mpu_regions[] = {
/* Region ICCM */
MPU_REGION_ENTRY("ICCM",
DT_REG_ADDR(DT_INST(0, arc_i... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2023 Synopsys<|fim_suffix|> 0;
}
SYS_INIT(emsdp_dfss_clock_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
<|fim_middle|>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/arch/cpu.h>
#include <zephyr/init.h>
#define DFSS_SPI0_BASE 0x80010000
#define DFSS_SP... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>#define HSDK_CREG_GPIO_MUX_REG 0xf0001484
#define HSDK_CREG_GPIO_MUX_VAL 0x00000400
static int hsdk_creg_gpio_mux_init(void)
{
sys_write32(HSDK_CREG_GPIO_MUX_REG, HSDK_CREG_GPIO_MUX_VAL);
return 0;
}
SYS_INIT(hsdk_creg_gpio_mux_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
<|fim_prefix|>... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>DT_INST(0, arc_iccm)),
DT_REG_SIZE(DT_INST(0, arc_iccm)),
REGION_ROM_ATTR),
/* Region DCCM */
MPU_REGION_ENTRY("DCCM",
DT_REG_ADDR(DT_INST(0, arc_dccm)),
DT_REG_SIZE(DT_INST(0, arc_dccm)),
REGION_KERNEL_RAM_ATTR),
/* Region XCCM */
#if DT_REG_SIZE(DT_INST(0, arc_xccm)) > 0
MPU_REGI... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2017 Synopsys
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/devicetree.h>
#include <zephyr/arch/arc/v2/mpu/arc_mpu.h>
#include <zephyr/arch/arc/arch.h>
#include <zephyr/linker/linker-defs.h>
/*
* for secure firmware, MPU entries are only set up for secure world.
* ... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright (c) 2022-2023 Synopsys
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/arch/arc/cluster.h>
#include <zephyr/devicetree.h>
#include <zephyr/init.h>
#define DT_SRAM_NODE_ADDR (DT_REG_ADDR(DT_CHOSEN(zephyr_sram)) / (1024 * 1024))
#define DT_SRAM_NODE_SIZE (DT_REG_SIZE(DT_CHOSEN(zephyr_sr... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2026 Fabian Blatz <fabianblatz@gmail.com>
*
* S<|fim_suffix|>/* defined(CONFIG_I2C) && defined(GPIO_PCAL64XXA) */
<|fim_middle|>PDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#include <zephyr/drivers/i2c.h>
#if defined(CONFIG_I2C) && defined(GPIO_PCAL64XXA)
#defin... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>AL_OK;
}
<|fim_prefix|>/*
* Copyright (c) 2025 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#include <stm32_ll_rcc.h>
#include <stddef.h>
#include <errno.h>
typedef __PACKED_STRUCT
{
uint8_t additional_data[8]; /*!< 64 bits of data to fill OTP slot Ex: MB18... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>turn HAL_ERROR;
}
return HAL_OK;
}
<|fim_prefix|>/*
* Copyright (c) 2025 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#include <stm<|fim_middle|>32_ll_rcc.h>
#include <stddef.h>
#include <errno.h>
typedef __PACKED_STRUCT
{
uint8_t additional_data[8]; /*!... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>POST_KERNEL, 0);
<|fim_prefix|>/*
* Copyright (c) 2021 STMicroelectronics
* SPDX-License-Identifier<|fim_middle|>: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <zephyr/init.h>
#include <stm32_ll_adc.h>
#include <zephyr/devicetree.h>
static int enable_adc_reference(void)
{
uint8_t init_status;
... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>ming(0x0C);
}
}
<|fim_prefix|>/*
* Copyright (c) 2026 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#include <zephyr/toolchain.h>
#include <stm32_ll_rcc.h>
#include <stddef.h>
typedef struct __packed {
uint8_t additional_data[8]; /* 64 bits of data to fill ... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2025-2026 MASSDRIVER EI (massdriver.space)
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdint.h>
#include "bflb_soc.h"
#include "hbn_reg.h"
void board_early_init_hook(void)
{
/* Enable JTAG on broken out pins */
/* Clear HBN pin control */
*(volatile uint32_t *)(HBN_BA... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>e, allowing
* debuggers and flash-loaders to access the chip over JTAG.
* Also, on subsequent reboots, the bootloader skips the integrity
* check, preventing the image from being mass erased.
*
* See section 21.10: "Debugging Flash User Application Using JTAG"
* in the CC3220 TRM: http://www.ti.com/... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> Application Using JTAG"
* in the CC3220 TRM: http://www.ti.com/lit/ug/swru465/swru465.pdf
*/
#ifdef CONFIG_CC3235SF_DEBUG
__attribute__ ((section(".dbghdr")))
const unsigned long ulDebugHeader[] = {
0x5AA5A55A,
0x000FF800,
0xEFA3247D
};
#endif
<|fim_prefix|>/*
* Copyright<|fim_middle|> (c) 2017, Te... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2021 Florin Stancu
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Implements the RF driver callback to configure the on-board antenna
* switch.
*/
#define DT_DRV_COMPAT skyworks_sky13317
#include <zephyr/init.h>
#include <zephyr/device.h>
<|fim_suffix|>os); i++) {
gpio_pin_... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2021-2024 NXP
*
* Copyright (c) 2025 u-blox AG
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <flash_config.h>
__attribute__((section(".flash_conf"), used))
const fc_flexspi_nor_config_t flexspi_config = {
.memConfig = {
.tag = FC_BLOCK_TAG,
.version ... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2021-2024 NXP
*
* Copyright (c) 2025 u-blox AG
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <flash_config.h>
__attribute__((section(".flash_conf"), used))
const fc_flexspi_nor_config_t flexspi_config = {
.memConfig = {
.tag = FC_BLOCK_TAG,
.version = FC_BLOCK_VERSION... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> APL_GPIO_147
#define UP2_HAT_PIN_36_DEV APL_GPIO_DEV_N_1
#define UP2_HAT_PIN_36 APL_GPIO_45
#define UP2_HAT_PIN_37_DEV APL_GPIO_DEV_NW_1
#define UP2_HAT_PIN_37 APL_GPIO_86
#define UP2_HAT_PIN_38_DEV APL_GPIO_DEV_W_0
#define UP2_HAT_PIN_38 APL_GPIO_148
#define UP2_HAT_PIN_40_DEV APL_GPIO_DEV_W_0
#d... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>F & AFIO_SWCFG_MASK);
AFIO->PCFR1 = pcfr1;
}
#endif
}
<|fim_prefix|>/*
* Copyright (c) 2025 Andrei-Edward Popa <andrei.popa105@yahoo.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#include <zephyr/drivers/gpio.h>
#include <hal_ch32fun.h>
#define AFIO_SWCFG_MASK 0x070... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>(args.file)
print("-= Polyspace Static Code Analysis results =-")
# 3. print details
if args.details:
for f in findings:
print(
f"{f.get('File', 'unknown file')}:"
+ f"{f.get('Line', '?')}:"
+ f"{f.get('Col', '?')}: "
... | fim | zephyrproject-rtos/zephyr | python |
// SPDX-License-Identifier: MIT
/**
Doxygen Awesome
https://github.com/jothepro/doxygen-awesome-css
Copyright (c) 2021 - 2025 jothepro
*/
class DoxygenAwesomeDarkModeToggle extends HTMLElement {
// SVG icons from https://fonts.google.com/icons
// Licensed under the Apache 2.0 license:
// https://www.apa... | fim | zephyrproject-rtos/zephyr | javascript |
<|fim_suffix|>d = 'projectversion';
versionDiv.textContent = version;
cell.appendChild(versionDiv);
});
<|fim_prefix|>/*
* Copyright (c) 2021 Nordic Semiconductor ASA
* SPDX-License-Identifier: Apache-2.0
*/
window.addEventListener('DOMContentLoaded', (event) => {
/* re-inject p<|fim_middle|>roject version at... | fim | zephyrproject-rtos/zephyr | javascript |
<|fim_prefix|># Copyright (c) 2021 Zephyr Project membe<|fim_suffix|>icense-Identifier: Apache-2.0
# File intentionally empty
<|fim_middle|>rs and individual contributors
# SPDX-L<|endoftext|> | fim | zephyrproject-rtos/zephyr | python |
<|fim_prefix|># Copyright (c) 2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
from pathlib import Path
from typing import Any
import doxmlparser
from docutils import nodes
from doxmlparser.compound import DoxCompoundKind
from sphinx.util.docutils import SphinxDirective
def get_group(innergrou... | fim | zephyrproject-rtos/zephyr | python |
<|fim_prefix|># Copyright (c) 2017 Open Source Foundries Limited.
#
# SPDX-License-Identifier: Apache-2.0
'''Sphinx extensions related to managing Zephyr applications.'''
from pathlib import Path
from docutils import nodes
from docutils.parsers.rst import Directive, directives
ZEPHYR_BASE = Path(__file__).parents[3... | fim | zephyrproject-rtos/zephyr | python |
<|fim_prefix|>"""
Zephyr Extension
################
Copyright (c) 2023-2025 The Linux Foundation
SPDX-License-Identifier: Apache-2.0
This extension adds a new ``zephyr`` domain for handling the documentation of various entities
specific to the Zephyr RTOS project (ex. code samples).
Directives
----------
- ``zephyr... | fim | zephyrproject-rtos/zephyr | python |
<|fim_prefix|>/**
* Copyright (c) 2024-2025, The Linux Foundation.
* SPDX-License-Identifier: Apache-2.0
*/
var memorySliderConfigs = {};
const MEMORY_KB = 1024;
const MEMORY_MB = MEMORY_KB ** 2;
const MEMORY_GB = MEMORY_KB ** 3;
const MEMORY_DEFAULT_MAX_KIB = 64;
function parseMemoryHashParam(hashParams, key, de... | fim | zephyrproject-rtos/zephyr | javascript |
<|fim_suffix|>opy button
const copyButton = createElement("button", "copy-button");
copyButton.innerHTML = COPY_ICON;
copyButton.addEventListener(
"click",
handleCopyButtonClick(initialValues, revisionSelect, qualifierSelect, copyButton),
);
selector.appendChild(copyButton);
// Inse... | fim | zephyrproject-rtos/zephyr | javascript |
<|fim_suffix|>lightMatches(nameElement, searchQuery);
highlightMatches(descElement, searchQuery);
}
item.style.display = "";
listVisible = true;
sectionVisible = true;
} else {
item.style.display = "none";
}
});
// Show or hide ... | fim | zephyrproject-rtos/zephyr | javascript |
<|fim_prefix|>// SPDX-FileCopyrightText: 2019-2024 Léon Gersen and noUiSlider contributors
// SPDX-License-Identifier: MIT
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).no... | fim | zephyrproject-rtos/zephyr | javascript |
"""
Copyright (c) 2021 Nordic Semiconductor ASA
Copyright (c) 2024 The Linux Foundation
SPDX-License-Identifier: Apache-2.0
"""
import concurrent.futures
import os
from typing import Any
import doxmlparser
from docutils import nodes
from docutils.parsers.rst import directives
from doxmlparser.compound import DoxCompo... | fim | zephyrproject-rtos/zephyr | python |
<|fim_suffix|> fmt_pattern: Format pattern.
fmt_vars: Format variables.
outdir_var: Variable representing output directory.
Returns:
Processed Doxyfile content.
"""
with open(doxyfile) as f:
content = f.read()
content = re.sub(
r"^\s*OUTPUT_DIRECTORY\s*=.*$... | fim | zephyrproject-rtos/zephyr | python |
<|fim_suffix|>le("tippy/tippy-bundle.umd.min.js")
app.add_js_file("doxytooltip.js")
app.add_css_file("doxytooltip.css")
return {
"version": "0.1",
"parallel_read_safe": True,
"parallel_write_safe": True,
}
<|fim_prefix|>"""
Doxygen Tooltip Extension
#########################
C... | fim | zephyrproject-rtos/zephyr | python |
<|fim_suffix|> doxygenCSSNames = ['doxygen-awesome.css', 'doxygen-awesome-zephyr.css'];
for (const cssName of doxygenCSSNames) {
const cssLink = parsedDoc.querySelector(`link[href$="${cssName}"]`);
if (cssLink) {
const link = document.createElement('link')... | fim | zephyrproject-rtos/zephyr | javascript |
<|fim_suffix|>(r=a);var i,s,f={placement:"bottom",orderedModifiers:[],options:Object.assign({},K,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],p=!1,u={state:f,setOptions:function(r){var i="function"==typeof r?r(f.options):r;l(),f.options=Object.assign({},a,f.options,i),f.scrollParent... | fim | zephyrproject-rtos/zephyr | javascript |
<|fim_suffix|>me:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(tt()){var n=rt().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?n.setAttribute("data-placement",e.placement):e.attributes... | fim | zephyrproject-rtos/zephyr | javascript |
<|fim_prefix|># Copyright (c) 2020 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: Apache-2.0
"""
A Sphinx extension <|fim_suffix|>ing devicetree content. It adds a role and a
directive with the same name, 'dtcompatible'.
The directive marks the page where the :dtcompatible: role link goes.
Do not use it direct... | fim | zephyrproject-rtos/zephyr | python |
<|fim_prefix|>"""
External content
################
Copyright (c) 2021 Nordic Semiconductor ASA
SPDX-License-Identifier: Apache-2.0
Introduction
============
This extension allows to import sources from directories out of the Sphinx
source directory. They are copied to the source directory before starting the
build.... | fim | zephyrproject-rtos/zephyr | python |
<|fim_suffix|>ssue was reported from the online documentation page using the "
"'Report an issue' button."
),
}
areas = MAINTAINERS.path2areas(rel_path)
if areas:
for area in areas:
form_data["labels"].extend(area.labels)
form_data["labels"] = ",".join(form_data.... | fim | zephyrproject-rtos/zephyr | python |
<|fim_suffix|> in https://tech.signavio.com/2017/managing-sphinx-redirects
import os.path
from sphinx.builders.html import StandaloneHTMLBuilder
from sphinx.util import logging
logger = logging.getLogger(__name__)
REDIRECT_TEMPLATE = r"""
<html>
<head>
<meta http-equiv="refresh" content="0; url=$NEWURL" />
... | fim | zephyrproject-rtos/zephyr | python |
<|fim_prefix|>"""
Kconfig Extension
#################
Copyright (c) 2022 Nordic Semiconductor ASA
SPDX-License-Identifier: Apache-2.0
Introduction
============
This extension adds a new domain (``kconfig``) for the Kconfig language. Unlike
many other domains, the Kconfig options are not rendered by Sphinx directly b... | fim | zephyrproject-rtos/zephyr | python |
<|fim_prefix|>/*
* Copyright (c) 2022 Nordic Semiconductor ASA
* SPDX-License-Identifier: Apache-2.0
*/
const DB_FILE = 'kconfig.json';
const RESULTS_PER_PAGE_OPTIONS = [10, 25, 50];
let zephyr_gh_base_url;
let zephyr_version;
/* search state */
let db;
let searchOffset;
let maxResults = RESULTS_PER_PAGE_OPTIONS[0... | fim | zephyrproject-rtos/zephyr | javascript |
<|fim_suffix|>\t{trace}")
# Invalid module provided
elif module != config.link_roles_manifest_project:
logger.debug(f"Module {module} not found in the west manifest")
# Baseurl for manifest project not set
elif baseurl is None:
raise ValueError(
f"... | fim | zephyrproject-rtos/zephyr | python |
<|fim_suffix|>row += entry
tbody = nodes.tbody()
tbody.extend(rows)
tgroup += tbody
return [table]
def setup(app: Sphinx) -> dict[str, Any]:
app.add_config_value("manifest_projects_table_manifest", None, "env")
directives.register_directive("manifest-projects-table", Manifes... | fim | zephyrproject-rtos/zephyr | python |
<|fim_prefix|># Copyright (c) 2025 The Linux Foundation
# SPDX-License-Identifier: Apache-2.0
import re
from pathlib import Path
ZEPHYR_BASE = Path(__file__).parents[2]
ZEPHYR_BINDINGS = ZEPHYR_BASE / "dts" / "bindings"
BINDINGS_TXT_PATH = ZEPHYR_BINDINGS / "binding-types.txt"
ACRONYM_PATTERN = re.compile(r'([a-zA-Z... | fim | zephyrproject-rtos/zephyr | python |
<|fim_suffix|>ch_roots", "board_roots", "soc_roots", "board_dir", "board", "arch"]
)
args_find_boards = Args(
arch_roots=module_settings["arch_root"],
board_roots=module_settings["board_root"],
soc_roots=module_settings["soc_root"],
board_dir=[],
board=None,
arch=... | fim | zephyrproject-rtos/zephyr | python |
<|fim_suffix|> num_written)
def make_sidebar(compatible, vendor_name, vendor_ref_target, driver_path=None):
lines = [
".. sidebar:: Overview",
"",
f" :Name: ``{compatible}``",
f" :Vendor: :ref:`{vendor_name} <{vendor_ref_target}>`",
f" :Used in: :zephyr:board-catalog... | fim | zephyrproject-rtos/zephyr | python |
<|fim_suffix|>OSError as e:
if e.errno != errno.ENOENT:
raise
with open(path, "w", encoding="utf-8") as f:
f.write(s)
return True
<|fim_prefix|># Copyright (c) 2020 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
"""
Helper funct<|fim_middle|>ions used by gen_kconfig... | fim | zephyrproject-rtos/zephyr | python |
<|fim_prefix|>"""
Copyright (c) 2021 Zephyr Project members and individual contributors
SPDX-License-Identifier: Apache-2.0
This module contains a variable with a list of tuples (old_url, new_url) for
pages to redirect. This list allows redirecting old URLs (caused by reorganizing
doc directories)
Notes:
- Please... | fim | zephyrproject-rtos/zephyr | python |
<|fim_prefix|>/**
* Copyright (c) 2020-2023, The Godot community
* Copyright (c) 2023, Benjamin Cabé <benjamin@zephyrproject.org>
* SPDX-License-Identifier: CC-BY-3.0
*/
/* Ensure that dark mode toggle's set theme is propagated to the document element. */
(() => {
let theme;
try {
theme = localStorage.getI... | fim | zephyrproject-rtos/zephyr | javascript |
<|fim_suffix|>s*:\s*light\s*\)/gi;const r=/\(\s*prefers-color-scheme\s*:\s*dark\s*\)/gi;const n=/\b(?:dark\s+light|light\s+dark)\b/;switch(a){case e:o=o.replace(c,"$&, all").replace(r,"$& and not all").replace(n,a);break;case l:o=o.replace(r,"$&, all").replace(c,"$& and not all").replace(n,a);break}document.write(o)})(... | fim | zephyrproject-rtos/zephyr | javascript |
<|fim_prefix|>// @license © 2019 Google LLC. Licensed under the Apache License, Version 2.0.
const e=document;let t={};try{t=localStorage}catch(e){}const i="prefers-color-scheme";const a="media";const s="light";const r="dark";const h="system";const o=`(${i}:${r})`;const l=`(${i}:${s})`;const n="link[rel=stylesheet]";co... | fim | zephyrproject-rtos/zephyr | javascript |
<|fim_suffix|>n -5;
}
else if (result[0].search("samples/")>=0) {
return -5;
}
else {
return result[4];
}
},
// query matches the full name of an object
objNameMatch: 11,
// or matches in the last dotted part of the object name
objPartialMatch: 6,
// Additive scores depen... | fim | zephyrproject-rtos/zephyr | javascript |
<|fim_suffix|>o.svg")
html_favicon = str(ZEPHYR_BASE / "doc" / "_static" / "images" / "favicon.png")
html_static_path = [str(ZEPHYR_BASE / "doc" / "_static")]
html_last_updated_fmt = "%b %d, %Y"
html_domain_indices = False
html_split_index = True
html_show_sourcelink = False
html_show_sphinx = False
html_search_scorer ... | fim | zephyrproject-rtos/zephyr | python |
<|fim_suffix|>_int, 5);
zassert_equal(returns_int(), 5, NULL);
}
void test_main(void)
{
ztest_test_suite(mock_framework_tests,
ztest_unit_test(parameter_test),
ztest_unit_test(return_value_test)
);
ztest_run_test_suite(mock_framework_tests);
}
<|fim_prefix|>#include <zephyr/ztest.h>
static void expect_two_pa... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>#!/usr/bin/env python3
# Copyright (c) 2024 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
import importlib
import json
import os
import sys
from unittest import mock
import pytest
from conftest import TEST_DATA, ZEPHYR_BASE, test_filename_mock
from twisterlib.testplan import TestPlan
class... | fim | zephyrproject-rtos/zephyr | python |
<|fim_prefix|>/*
* Copyright (c) 2024 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/drivers/sensor.h>
#define ACCEL_TRIGGERS \
{ SENSOR_TRIG_DRDY, SENSOR_STREAM_DATA_INCLUDE }, \
{ SENSOR_TRIG_TAP, SENSOR_STREAM_DATA_NOP }
#define ACCEL_ALIAS(id) DT_ALIAS(CONCAT(accel, id))
... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>e_buffer(&temp_ctx, buf, buf_len);
printk("Temperature for %s channel 0 " PRIsensor_q31_data ", channel 1 "
PRIsensor_q31_data "\n",
dev->name,
PRIsensor_q31_data_arg(temp_data[0], 0),
PRIsensor_q31_data_arg(temp_data[1], 0));
}
}
k_msleep(1);
}
<|fim_prefix|>/*
* Cop... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2024 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/drivers/sensor.h>
const struct device *const accel0 = DEVICE_DT_GET(DT_ALIAS(accel0));
static struct tap_count_state {
struct sensor_trigger trig;
uint32_t count;
} tap_count_state = {
.trig = ... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|>/drivers/sensor.h>
#define TEMP_CHANNEL {SENSOR_CHAN_AMBIENT_TEMP, 0}
const struct device *const temp0 = DEVICE_DT_GET(DT_ALIAS(temp0));
SENSOR_DT_READ_IODEV(temp_iodev, DT_ALIAS(temp0), TEMP_CHANNEL);
RTIO_DEFINE(temp_ctx, 1, 1);
int main(void)
{
int rc;
uint8_t buf[8];
struct sensor_q31_data temp... | fim | zephyrproject-rtos/zephyr | c |
/*
* Copyright (c) 2025 Analog Devices, Inc.
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/logging/log.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/sys/u... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> \
.key_index = DT_NODE_CHILD_IDX(node_id), \
.press_mv = DT_PROP_BY_IDX(node_id, prop, idx), \
}
#define ADC_AD4114_DEVICE(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_ad4130_adc
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#<|fim_suffix|>_size);
if (ret) {
return ret;
}
reg_write_tx_buf[0] = reg_addr;
switch (reg_size) {
case 1:
... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2025 Analog Devices, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/byteorder.h>
LOG_MODULE_REGISTER(adc_... | fim | zephyrproject-rtos/zephyr | c |
<|fim_prefix|>/*
* Copyright (c) 2023 Grinn
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT adi_ad559x_adc
#include <zephyr/drivers/adc.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/drivers/mfd/ad559x.h>
#define ADC_CONTEXT_USES_KERNEL_TIMER
#include "adc_context... | fim | zephyrproject-rtos/zephyr | c |
<|fim_suffix|> struct device *dev)
{
const struct adc_ad7124_config *config = dev->config;
struct adc_ad7124_data *data = dev->data;
int ret;
data->dev = dev;
k_sem_init(&data->acquire_signal, 0, 1);
if (!spi_is_ready_dt(&config->bus)) {
LOG_ERR("spi bus %s not ready", config->bus.bus->name);
return -ENODE... | 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.