text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_suffix|>BOLS_PER_OCTET 2 /* see section 12.2.1 */ /* ACK is 2 bytes for PHY header + 2 bytes MAC header + 2 bytes MAC footer */ #define IEEE802154_ACK_FRAME_OCTETS 6 /* IEEE 802.15.4-2006 MAC PIB attributes (7.4.2) * * The macAckWaitDuration attribute does not include aUnitBackoffPeriod for * non-beacon enab...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>ktConf = { .bRepeatOk = true, .bRepeatNok = true, .bUseCrc = true, .filterOp = true, }, .rxConf = { .bAutoFlushIgnored = true, .bAutoFlushCrcErr = true, .bAppendRssi = true, .bAppendStatus = true, }, /* Last preamble byte and SFD for uncoded 2-FSK SUN PHY, phySunFskSfd = 0,...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>dv; volatile rfc_propRxOutput_t cmd_prop_rx_adv_output; volatile rfc_CMD_PROP_CS_t cmd_prop_cs; RF_CmdHandle rx_cmd_handle; }; #endif /* ZEPHYR_DRIVERS_IEEE802154_IEEE802154_CC13XX_CC26XX_SUBG_H_ */ <|fim_prefix|>/* * Copyright (c) 2019 Brett Witherspoon * Copyright (c) 2020 Friedt Professional Eng...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* ieee802154_cc2520.c - TI CC2520 driver */ #define DT_DRV_COMPAT ti_cc2520 /* * Copyright (c) 2016 Intel Corporation. * * SPDX-License-Identifier: Apache-2.0 */ #define LOG_MODULE_NAME ieee802154_cc2520 #define LOG_LEVEL CONFIG_IEEE802154_DRIVER_LOG_LEVEL #include <zephyr/logging/log.h> LOG_MODU...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* ieee802154_cc2520.h - Registers definition for TI CC2520 */ /* * Copyright (c) 2016 Intel Corporation. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_IEEE802154_IEEE802154_CC2520_H_ #define ZEPHYR_DRIVERS_IEEE802154_IEEE802154_CC2520_H_ #include <zephyr/linker/sections.h> #inc...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* ieee802154_cc2520_regs.h - Registers definition for TI CC2520 */ /* * Copyright (c) 2016 Intel Corporation. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_IEEE802154_IEEE802154_CC2520_REGS_H_ #define ZEPHYR_DRIVERS_IEEE802154_IEEE802154_CC2520_REGS_H_ /* Instructions (see chap...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2020 PHYTEC Messtechnik GmbH * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(dw1000, LOG_LEVEL_INF); #include <errno.h> #include <zephyr/kernel.h> #include <zephyr/arch/cpu.h> #include <zephyr/debug/stack.h> #include <zephyr/device.h>...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2020 PHYTEC Messtechnik GmbH * * SPDX-License-Identifier: Apache-2.0 * * This file is based on dw1000_regs.h and dw1000_mac.c from * https://github.com/Decawave/mynewt-dw1000-core.git * (d6b1414f1b4527abda7521a304baa1c648244108) * The content was modified and restructured to mee...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>eee802154_dev.c */ net_time_us = net_pkt_timestamp_ns(pkt) / NSEC_PER_USEC; err = esp_ieee802154_transmit_at(data->tx_psdu, tx_mode == IEEE802154_TX_MODE_TXTIME_CCA, (uint32_t)net_time_us); break; default: LOG_ERR("TX mode %d not supported", tx_mode); return -ENOTSUP; } err ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>t *ack_frame_info; /* Callback handler of the currently ongoing energy scan. * It shall be NULL if energy scan is not in progress. */ energy_scan_done_cb_t energy_scan_done; }; #endif /* ZEPHYR_DRIVERS_IEEE802154_IEEE802154_ESP32_H_ */ <|fim_prefix|>/* * Copyright (c) 2024 A Labs GmbH * * SPDX-...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>, irqsts, (unsigned int)ZLL->PHY_CTRL, seq_state); kw41z_tmr3_disable(); rx_len = (ZLL->IRQSTS & ZLL_IRQSTS_RX_FRAME_LENGTH_MASK) >> ZLL_IRQSTS_RX_FRAME_LENGTH_SHIFT; if (irqsts & ZLL_IRQSTS_RXIRQ_MASK) { if (rx_len != 0U) { kw41z_rx(&kw41z_context_data, ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>4_TRCV_MSK; } return write_reg_phy_ctrl4(dev, ctrl4); } /** Set an timeout value for the given compare register */ static int mcr20a_timer_set(const struct device *dev, uint8_t cmp_reg, uint32_t timeout) { uint32_t now = 0U; uint32_t next; bool retval; if (!read_burst_event_timer(de...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2017 PHYTEC Messtechnik GmbH * * Portions of this file are derived from ieee802154_cc2520.h that is * Copyright (c) 2016 Intel Corporation. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_IEEE802154_IEEE802154_MCR20A_H_ #define ZEPHYR_DRIVERS_IEEE802154_IEEE802...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* ieee802154_mcr20a_regs.h - Registers definition for NXP MCR20A */ /* * Copyright (c) 2017 PHYTEC Messtechnik GmbH * * SPDX-License-Identifier: Apache-2.0 * * This file is based on MCR20reg.h, it was modified to meet the * coding style and restructured to make it easier to read. * Additional ide...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* ieee802154_mcxw.c - NXP MCXW 802.15.4 driver */ /* * Copyright 2025-2026 NXP * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT nxp_mcxw_ieee802154 #define LOG_MODULE_NAME ieee802154_mcxw #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include <zephyr/kerne...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>_thread; /* RX message queue */ struct k_msgq rx_msgq; /* RX message queue buffer */ char rx_msgq_buffer[NMAX_RXRING_BUFFERS * sizeof(mcxw_rx_frame)]; /* TX synchronization semaphore */ struct k_sem tx_wait; /* TX synchronization semaphore */ struct k_sem cca_wait; /* Radio state */ mcxw_radio_s...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>rShort): case (ModeDstAddrNone | ModeSrcAddrExt): case (ModeDstAddrShort | ModeSrcAddrShort): case (ModeDstAddrShort | ModeSrcAddrExt): case (ModeDstAddrExt | ModeSrcAddrShort): present = true; break; default: present = false; } } else { present = ((fcf & MaskSrcAddrMode) != 0) &&...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>void set_csl_ie(uint8_t *pdu, uint16_t length, uint16_t period, uint16_t phase); <|fim_prefix|>/* ieee802154_mcxw_utils.h - NXP MCXW 802.15.4 driver utils*/ /* <|fim_middle|>* Copyright 2025 NXP * * SPDX-License-Identifier: Apache-2.0 * */ bool is_frame_version_2015(uint8_t *pdu, uint16_t length); ...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* ieee802154_nrf5.c - nRF5 802.15.4 driver */ /* * Copyright (c) 2017-2023 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT nordic_nrf_ieee802154 #define LOG_MODULE_NAME ieee802154_nrf5 #if defined(CONFIG_IEEE802154_DRIVER_LOG_LEVEL) #define LOG_LEVEL CONFI...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* ieee802154_nrf5.h - nRF5 802.15.4 driver */ /* * Copyright (c) 2017-2023 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_IEEE802154_IEEE802154_NRF5_H_ #define ZEPHYR_DRIVERS_IEEE802154_IEEE802154_NRF5_H_ #include <zephyr/net/ieee802154_radio.h> #define ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>A(inst); \ \ COND_CODE_1(CONFIG_IEEE802154_RAW_MODE, \ (IEEE802154_RF2XX_RAW_DEVICE_INIT(inst);), \ (IEEE802154_RF2XX_NET_DEVICE_INIT(inst);)) DT_INST_FOREACH_STATUS_OKAY(IEEE802154_RF2XX_INIT) <|fim_prefix|>/* ieee802154_rf2xx.c - ATMEL RF2XX IEEE 802.15.4 Driver */ #define DT_...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* ieee802154_rf2xx.h - IEEE 802.15.4 Driver definition for ATMEL RF2XX */ /* * Copyright (c) 2019-2020 Gerson Fernando Budke * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_IEEE802154_IEEE802154_RF2XX_H_ #define ZEPHYR_DRIVERS_IEEE802154_IEEE802154_RF2XX_H_ /* Runtime context str...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* ieee802154_rf2xx_iface.c - ATMEL RF2XX IEEE 802.15.4 Interface */ /* * Copyright (c) 2019-2020 Gerson Fernando Budke * * SPDX-License-Identifier: Apache-2.0 */ #define LOG_MODULE_NAME ieee802154_rf2xx_iface #define LOG_LEVEL CONFIG_IEEE802154_DRIVER_LOG_LEVEL #include <zephyr/logging/log.h> LOG_...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/<|fim_suffix|>the read bit(s) */ uint8_t rf2xx_iface_bit_read(const struct device *dev, uint8_t addr, uint8_t mask, uint8_t pos); /** * @brief Subregister write * * @param[in] dev Transceiver device instance * @param[in] reg_addr Offset of the register * @param[i...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* ieee802154_rf2xx_regs.h - ATMEL RF2XX transceiver registers */ /* * Copyright (c) 2019 Gerson Fernando Budke * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_IEEE802154_IEEE802154_RF2XX_REGS_H_ #define ZEPHYR_DRIVERS_IEEE802154_IEEE802154_RF2XX_REGS_H_ /*- Definitions ----------...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * SPDX-FileCopyrightText: Copyright (c) 2026 Silicon Laboratories Inc. * SPDX-License-Identifier: Apache-2.0 */ /* ieee802154_silabs_efr32.c - Silabs EFR32 802.15.4 driver */ #define DT_DRV_COMPAT silabs_efr32_ieee802154 #include <stdint.h> #include <errno.h> #include <string.h> #include <zephyr...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>nt8_t short_addr_count; uint8_t ext_addr_count; }; struct sl_802154_config { void (*irq_config_func)(const struct device *dev); /* HFXO worst-case accuracy in ± ppm. Always counted toward * get_sch_acc because the radio's awake-time timing reference * (RAIL/protimer) is derived from HFXO. */ u...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>.length = 0; ret = stm32wba_802154_ral_radio_reset(); if (ret != STM32WBA_802154_RAL_ERROR_NONE) { return -EIO; } break; default: LOG_ERR("Unsupported configuration type: %d", type); return -EINVAL; } return 0; } static int stm32wba_802154_attr_get_extended(enum ieee802154_stm32wba_a...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>nnel_free; /* TX synchronization semaphore. Unlocked when frame has been * sent or send procedure failed. */ struct k_sem tx_wait; /* TX buffer. First byte is PHR (length), remaining bytes are * MPDU data. */ uint8_t tx_psdu[STM32WBA_PHR_LENGTH + IEEE802154_MAX_PHY_PACKET_SIZE]; /* TX resu...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2016 Intel Corporation. * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT zephyr_ieee802154_uart_pipe #define LOG_MODULE_NAME ieee802154_uart_pipe #define LOG_LEVEL CONFIG_IEEE802154_DRIVER_LOG_LEVEL #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(LOG_MODULE_NA...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>_H_ */ <|fim_prefix|>/* ieee802154_uart_pipe.h - Private header for UART PIPE fake radio driver */ /* * Copyright (c) 2016 Intel Corporation. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_IEEE802154_IEEE802154_UART_PIPE_H_ #define ZEPHYR_DRIVERS_IEEE802154_IEEE802154_UART_PIPE_H_...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>.bus = I2C_DT_SPEC_INST_GET(inst), \ .polling_interval_ms = DT_INST_PROP(inst, polling_interval_ms), \ }; \ ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> \ \ DEVICE_DT_INST_DEFINE(n, adc_keys_init, NULL, &adc_keys_data_##n, &adc_keys_cfg_##n, \ POST_KERNEL, CONFIG_INPUT_INIT_PRIORITY, NULL)...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright 2023 Google LLC * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT analog_axis #include <stdlib.h> #include <zephyr/device.h> #include <zephyr/drivers/adc.h> #include <zephyr/input/input.h> #include <zephyr/input/input_analog_axis.h> #include <zephyr/kernel.h> #include <...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>ngs save errord: %d", ret); return ret; } return 0; } <|fim_prefix|>/* * Copyright 2023 Google LLC * * SPDX-License-Identifier: Apache-2.0 */ #include <stdlib.h> #include <zephyr/device.h> #include <zephyr/input/input_analog_axis.h> #include <zephyr/input/input_analog_axis_settings.h> #include <...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2026, Realtek Semiconductor Corporation * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT realtek_bee_keyscan #include <zephyr/kernel.h> #include <zephyr/arch/cpu.h> #include <zephyr/sys/__assert.h> #include <soc.h> #include <zephyr/init.h> #include <zephyr/linker/sections.h> #in...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2025 MASSDRIVER EI (massdriver.space) * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT bflb_irx #include <zephyr/device.h> #include <zephyr/input/input.h> #include <zephyr/kernel.h> #include <zephyr/drivers/gpio.h> #include <zephyr/drivers/clock_control.h> #include <zephyr/irq.h> ...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2022 Keiya Nobuta * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT microchip_cap12xx #include <zephyr/drivers/i2c.h> #include <zephyr/drivers/gpio.h> #include <zephyr/input/input.h> #include <zephyr/logging/log.h> #include <zephyr/math/ilog2.h> LOG_MODULE_REGISTER(...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> XY_COORD_H] & 0x70) << 4 | buffer[1 + X_COORD_L]; y = (uint16_t)(buffer[1 + XY_COORD_H] & 0x07) << 8 | buffer[1 + Y_COORD_L]; data->pressed = true; if (!data->pressed_old) { /* Finger pressed */ input_report_abs(dev, INPUT_ABS_X, x, false, K_FOREVER); input_report_abs(dev, INPUT_ABS_Y, y,...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2026 MASSDRIVER EI (massdriver.space) * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT wch_ch9350l #include <zephyr/device.h> #include <zephyr/input/input.h> #include <zephyr/kernel.h> #include <zephyr/drivers/uart.h> #include <zephyr/sys/byteorder.h> #include <zephyr...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2025 Basalte bv * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT chipsemi_chsc5x #include <zephyr/drivers/gpio.h> #include <zephyr/drivers/i2c.h> #include <zephyr/input/input.h> #include <zephyr/input/input_touch.h> #include <zephyr/logging/log.h> #include <zephyr/...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Nicolas Goualard <nicolas.goualard@sfr.fr> * Copyright (c) 2026 Muhammad Waleed Badar * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/sys/byteorder.h> #include <zephyr/input/input.h> #include <zephyr/input/input_touch.h> #include <zephyr/drivers/i2c.h> #include <z...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>VALIDATE_CACHE arch_dcache_invd_range(&evt->data.rx.buf[evt->data.rx.offset], evt->data.rx.len); #endif /* Process received data chunk */ crsf_process_bytes(dev, &evt->data.rx.buf[evt->data.rx.offset], evt->data.rx.len); break; case UART_RX_BUF_REQUEST: /* Provide the next buffer to keep recep...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2021 Qingsong Gou <gouqs@hotmail.com> * Copyright (c) 2022 Jakob Krantz <mail@jakobkrantz.se> * Copyright (c) 2023 Daniel Kampert <kontakt@daniel-kampert.de> * Copyright (c) 2025 ZSWatch Project * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT hynitron_cst8xx #i...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>uld not configure reset GPIO pin (%d)", ret); return; } k_usleep(5); ret = gpio_pin_set_dt(&config->rst_gpio, 0); if (ret < 0) { LOG_ERR("Could not set reset GPIO pin (%d)", ret); return; } } static int cy8cmbr3xxx_init(const struct device *dev) { const struct cy8cmbr3xxx_config *config = d...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>ONFIG_SOC_SERIES_ESP32) */ touch_hal_read_trigger_status_mask(&pad_status); #if defined(CONFIG_SOC_SERIES_ESP32) touch_hal_clear_trigger_status_mask(); #endif /* defined(CONFIG_SOC_SERIES_ESP32) */ for (int i = 0; i < num_channels; i++) { uint32_t channel_status; channel_cfg = &dev_cfg->channel_c...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2020,2023 NXP * Copyright (c) 2020 Mark Olsson <mark@markolsson.se> * Copyright (c) 2020 Teslabs Engineering S.L. * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT focaltech_ft5336 #include <zephyr/drivers/gpio.h> #include <zephyr/drivers/i2c.h> #include <zephyr/i...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>%d", ret); return ret; } gpio_init_callback(&data->int_cb, ft6146_isr_handler, BIT(config->int_gpio.pin)); ret = gpio_add_callback(config->int_gpio.port, &data->int_cb); if (ret < 0) { LOG_ERR("Failed to add callback: %d", ret); return ret; } #else /* Initialize polling timer */ k_timer_init...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright 2023 Google LLC * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT gpio_kbd_matrix #include <stdint.h> #include <stdlib.h> #include <zephyr/device.h> #include <zephyr/drivers/gpio.h> #include <zephyr/input/input_kbd_matrix.h> #include <zephyr/kernel.h> #include <zephyr/...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>ode_id) \ { \ .spec = GPIO_DT_SPEC_GET(node_id, gpios), \ .zephyr_code = DT_PROP(node_id, zephyr_code), ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>ec_pin_suspend(dev, false); data->prev_step = gpio_qdec_get_step(dev); data->acc = 0; gpio_qdec_idle_mode(dev); break; default: return -ENOTSUP; } return 0; } #endif #define QDEC_GPIO_INIT(n) \ BUILD_ASSERT(!(DT_INST_NODE_HAS_PROP(n, led_gpios) && \ DT_INST_NODE_HAS_PRO...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2020, 2025 NXP * Copyright (c) 2020 Mark Olsson <mark@markolsson.se> * Copyright (c) 2020 Teslabs Engineering S.L. * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT goodix_gt911 #include <zephyr/drivers/gpio.h> #include <zephyr/drivers/i2c.h> #include <zephyr/inpu...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Joel Jaldemark * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT ilitek_ili2132a #include <zephyr/drivers/gpio.h> #include <zephyr/drivers/i2c.h> #include <zephyr/input/input.h> #include <zephyr/pm/device.h> #include <zephyr/sys/byteorder.h> #include <zephyr/l...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2025 ITE Corporation. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT ite_it51xxx_kbd #include <errno.h> #include <soc.h> #include <soc_dt.h> #include <zephyr/device.h> #include <zephyr/drivers/gpio.h> #include <zephyr/drivers/interrupt_controlle...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>01_config *const config = dev->config; int ret; uint8_t value; ret = i2c_reg_read_byte_dt(&config->i2c_dev, config->reg_ksidr, &value); if (ret != 0) { LOG_ERR("Failed to read row (ret %d)", ret); } /* Bits are active-low, so invert returned levels */ return (~value) & 0xff; } static void it88...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>SSERT(DT_INST_PROP(0, col_size) < 18 || DT_INST_NODE_HAS_PROP(0, kso17_gpios), "kso17-gpios must be defined in dts when col-size is 18"); <|fim_prefix|>/* * Copyright (c) 2021 ITE Corporation. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT ite_it8xxx2_k...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>ommon_row_bits - 1)) { return true; } } } return false; } static void input_kbd_matrix_drive_column(const struct device *dev, int col) { const struct input_kbd_matrix_common_config *cfg = dev->config; const struct input_kbd_matrix_api *api = cfg->api; api->drive_column(dev, col); #ifdef ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>t); } else { k_work_schedule(&drv_data->work, K_MSEC(CONFIG_INPUT_KPP_PERIOD_MS)); } } static void kpp_isr(const struct device *dev) { const struct kpp_config *config = dev->config; struct kpp_data *drv_data = dev->data; uint16_t status = KPP_GetStatusFlag(config->base); if ((status & kKPP_keyD...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>; } ch->prev_active = ch->active; } } static void mcux_tsi_isr(const struct device *dev) { const struct mcux_tsi_config *config = dev->config; struct mcux_tsi_data *data = dev->data; TSI_Type *base = config->base; uint32_t status; status = TSI_GetStatusFlags(base); if (status & kTSI_EndOfSc...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>RIORITY, NULL); DT_INST_FOREACH_STATUS_OKAY(MODULINO_BUTTONS_INIT) <|fim_prefix|>/* * Copyright<|fim_middle|> 2025 Google LLC * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT arduino_modulino_buttons #include <zephyr/device.h> #include <zephyr/drivers/i2c.h> #include <zephyr/input/...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>); if (ret < 0) { LOG_ERR("keyboard scan pinctrl setup failed (%d)", ret); return ret; } ret = input_kbd_matrix_common_init(dev); if (ret < 0) { LOG_ERR("keyboard scan common init failed (%d)", ret); return ret; } /* Configure wake-up input and callback for keyboard input signal */ for (i...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Bootlin * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT nintendo_nunchuk #include <zephyr/device.h> #include <zephyr/drivers/i2c.h> #include <zephyr/logging/log.h> #include <zephyr/input/input.h> #include <zephyr/kernel.h> #include <zephyr/timing/timing.h> #i...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright 2024 Google LLC * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT pixart_pat912x #include <stdint.h> #include <stdlib.h> #include <zephyr/device.h> #include <zephyr/drivers/gpio.h> #include <zephyr/drivers/i2c.h> #include <zephyr/input/input.h> #include <zephyr/input/i...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright 2024 Google LLC * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT pixart_paw32xx #include <stdint.h> #include <stdlib.h> #include <zephyr/device.h> #include <zephyr/drivers/gpio.h> #include <zephyr/drivers/spi.h> #include <zephyr/input/input.h> #include <zephyr/input/i...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Ilia Kharin * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT cirque_pinnacle #include <zephyr/device.h> #include <zephyr/drivers/gpio.h> #if DT_ANY_INST_ON_BUS_STATUS_OKAY(i2c) #include <zephyr/drivers/i2c.h> #endif #if DT_ANY_INST_ON_BUS_STATUS_OKAY(spi) #inc...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>_ERR("Invalid product id: %02x", val); return -ENOTSUP; } /* Power-up init sequence */ ret = pmw3610_spi_clk_on(dev); if (ret < 0) { return ret; } ret = pmw3610_write_reg(dev, PMW3610_OBSERVATION1, 0); if (ret < 0) { return ret; } k_sleep(K_MSEC(INIT_OBSERVATION_DELAY_MS)); ret = pmw36...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>ignore_mask = DT_INST_PROP_OR(0, kso_ignore_mask, 0x00), }; static struct rts5912_kbd_data rts5912_kbd_data_0; PM_DEVICE_DT_INST_DEFINE(0, input_kbd_matrix_pm_action_rts5912); DEVICE_DT_INST_DEFINE(0, &rts5912_kbd_init, PM_DEVICE_DT_INST_GET(0), &rts5912_kbd_data_0, &rts5912_kbd_cfg_0, POST_KER...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2025 Renesas Electronics Corporation * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/kernel.h> #include <zephyr/drivers/pinctrl.h> #include <zephyr/drivers/gpio.h> #include <zephyr/irq.h> #include <zephyr/input/input.h> #include <zephyr/sys/math_extras.h> #include <zeph...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> \ .prev_wheels_position = prev_wheels_position_##idx, \ .curr_wheels_position = curr_wheels_position_##idx, \ .work_phase = INITIALIZING, \ CTSU_HAL_CONFIG_D...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 CogniPilot Foundation * Copyright (c) 2024 NXP Semiconductors * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT futaba_sbus #include <zephyr/device.h> #include <zephyr/input/input.h> #include <zephyr/irq.h> #include <zephyr/kernel.h> #include <zephyr/logging/l...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2020 Jabil Inc. * Copyright (c) 2023 Nordic Semiconductor * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT zephyr_input_sdl_touch #include <stdbool.h> #include <zephyr/input/input.h> #include <zephyr/logging/log.h> #include "input_sdl_touch_bottom.h" LOG_MODULE_R...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2020 Jabil Inc. * Copyright (c) 2023 Nordic Semiconductor * * SPDX-License-Identifier: Apache-2.0 */ #include <SDL.h> #include "input_sdl_touch_bottom.h" static bool event_targets_display(SDL_Event *event, struct sdl_in<|fim_suffix|>D); } else { return false; } if (!window)...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> #ifdef __cplusplus extern "C" { #endif /* Note: None of these are public interfaces. But internal to the SDL input driver */ struct sdl_input_data { const void *dev; /* device structure pointer */ const void *display_dev; void (*callback)(struct sdl_input_data *data); int x; int y; bool pressed;...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/** * Copyright (c) 2023 Antmicro <www.antmicro.com> * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT st_stmpe811 #include <zephyr/kernel.h> #include <zephyr/drivers/gpio.h> #include <zephyr/drivers/i2c.h> #include <zephyr/input/input.h> #include <zephyr/input/input_touch.h> #include <ze...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> sizeof(read_buf)); if (ret == 0) { /* Check for application mode signature */ if ((read_buf[0] == 0x02U && read_buf[1] == 0x00U) || read_buf[1] == 0xFFU) { LOG_INF("TMA525B entered application mode"); break; } } k_sleep(K_MSEC(TMA525B_BOOT_DELAY_MS)); retry++; } if (re...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright <|fim_suffix|>res screen-height"); __ASSERT(cfg->inverted_x == (cfg->screen_width > 0), "X coordinate inversion requires screen-width"); const uint32_t reported_x_code = cfg->swapped_x_y ? INPUT_ABS_Y : INPUT_ABS_X; const uint32_t reported_y_code = cfg->swapped_x_y ? INPUT_ABS_X : IN...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2024 Arif Balik <arifbalik@outlook.com> * SPDX-License-Identifier: Apache-2.0 */ #include <soc.h> #include <stdlib.h> #include <stdbool.h> #include <autoconf.h> #include <zephyr/irq.h> #include <zephyr/kernel.h> #include <zephyr/device.h> #include <zephyr/devicetree.h> #include <zep...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2025 Bastien Jauny <bastien.jauny@smile.fr> * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT vishay_vs1838b #include <zephyr/device.h> #include <zephyr/drivers/gpio.h> #include <zephyr/logging/log.h> #include <zephyr/input/input.h> #include <zephyr/kernel.h> LOG_MODULE_REGISTER(in...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2019 Intel Corporation * Copyright (c) 2022 Microchip Technology Inc. * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT microchip_xec_kbd #include <cmsis_core.h> #include <errno.h> #include <soc.h> #include <zephyr/device.h> #include <zephyr/drivers/pinctrl.h> #include <zephyr/dt-b...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|> byte 0. Second command starts at byte 2. */ static uint8_t tbuf[9] = { [0] = START | CHANNEL(CH_Z1) | POWER_ON, [2] = START | CHANNEL(CH_Z2) | POWER_ON, [4] = START | CHANNEL(CH_X) | POWER_ON, [6] = START | CHANNEL(CH_Y) | POWER_OFF, }; static void xpt2046_isr_handler(const struct device *dev, stru...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright 2023 Google LLC * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT zephyr_native_linux_evdev #include <cmdline.h> #include <nsi_host_trampolines.h> #include <posix_native_task.h> #include <zephyr/device.h> #include <zephyr/input/input.h> #include <zephyr/kernel.h> #include <zephyr/log...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright 2023 Google LLC * * SPDX-License-Identifier: Apache-2.0 */ #include <errno.h> #include <fcntl.h> #include <linux/input.h> #include <nsi_tracing.h> #include <string.h> #include <unistd.h> #include "linux_evdev_bottom.h" int linux_evdev_read(int fd, uint16_t *type, uint16_t <|fim_suffi...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>DEV_NO_DATA INT32_MIN int linux_evdev_read(int fd, uint16_t *type, uint16_t *code, int32_t *value); int linux_evdev_open(const char *path); #endif /* ZEPHYR_DRIVERS_INPUT_LINUX_EVDEV_BOTTOM_H_ */ <|fim_prefix|>/* * Copyright 2023 Google LLC * * SPD<|fim_middle|>X-License-Identifier: Apache-2.0 */ #...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>pt controller register */ io_reg_write((PU_REGISTER_BASE + ACP_DSP_SW_INTR_CNTL), sw_intr_ctrl_reg.u32all); /* Enabling software interuppts */ irq_enable(IRQ_NUM_EXT_LEVEL3); } /* Disable ACP DSP software interrupt */ void acp_dsp_sw_intr_disable(void) { acp_dsp_sw_intr_cntl_t sw_intr_ctrl_reg; /* ...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* SPDX-FileCopyrightText: Copyright The Zephyr Project Contributors */ /* * Copyright (c) 2026 AMD * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_ACP_H_ #define ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_ACP_H_ #include <zephyr/typ<|fim_suffix|> struct ac...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2014 Wind River Systems, Inc. * Copyright (c) 2020-2022 Synopsys. * * SPDX-License-Identifier: Apache-2.0 */ /** * @file * @brief ARCv2 Interrupt Unit device driver * * The ARCv2 interrupt unit has 16 allocated exceptions associated with * vectors 0 to 15 and 240 interrupts a...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2017 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT intel_cavs_intc #include <zephyr/arch/cpu.h> #include <zephyr/device.h> #include <zephyr/devicetree/interrupt_controller.h> #include <zephyr/irq.h> #include <zephyr/irq_nextlevel.h> #include <z...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2017 Intel Corporation. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_CAVS_H_ #define ZEPHYR_DRIVERS_INTER<|fim_suffix|>r; }; struct cavs_registers { uint32_t disable_il; /* il_msd - offset 0x00 */ uint32_t enable_il; /* il_mcd - off...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>RIND access" #endif } static int clic_init(const struct device *dev) { struct clic_data *data = dev->data; if (IS_ENABLED(CONFIG_NUCLEI_ECLIC)) { /* Configure the interrupt level threshold. */ union CLICMTH clicmth = {.b = {.mth = 0x0}}; write_clic32(dev, CLIC_MTH, clicmth.qw); /* Detect the...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2021 Tokita, Hiroshi <tokita.hiroshi@gmail.com> * Copyright (c) 2025 Andes Technology Corporation * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_CLIC_H_ #define ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_CLIC_H_ /* CLIC relative CSR number */ #define ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>ne_state(const struct device *dev, unsigned int irq) { const struct dw_ictl_config *config = dev->config; volatile struct dw_ictl_registers * const regs = (struct dw_ictl_registers *)config->base_addr; if (config->numirqs > 32) { if ((regs->irq_inten_h & BIT(irq - 32)) != 0) { return...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2017 Intel Corporation. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_DW_H_ #define ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_DW_H_ #include <zephyr/types.h> #ifdef __cplusplus extern "C" { #endif typedef void (*dw_ictl_config_irq_t)(...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2022 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ #define DT_DRV_COMPAT intel_ace_intc #include <zephyr/device.h> #include <zephyr/devicetree.h> #include <zephyr/devicetree/interrupt_controller.h> #include <zephyr/irq_nextlevel.h> #include <zephyr/arch/xtensa/irq.h...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2021-2025 Espressif Systems (Shanghai) Co., Ltd. * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/kernel.h> #include <zephyr/irq.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <soc.h> #include <zephyr/drive...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2016 Open-RnD Sp. z o.o. * Copyright (c) 2017 RnDity Sp. z o.o. * Copyright (c) 2019-23 Linaro Limited * Copyright (C) 2025 Savoir-faire Linux, Inc. * Copyright (c) 2025 Alexander Kozhinov <ak.alexander.kozhinov@gmail.com> * * SPDX-License-Identifier: Apache-2.0 */ /** * @brie...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2025 Alexander Kozhinov <ak.alexander.kozhinov@gmail.com> * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_EXTI_STM32_PRIV_H_ #define ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_EXTI_STM32_PRIV_H_ #include <zephyr/device.h> #include <zephyr/...
fim
zephyrproject-rtos/zephyr
c
<|fim_prefix|>/* * Copyright (c) 2021 Teslabs Engineering S.L. * *<|fim_suffix|>line5_9), EXTI_LINE_IRQ_COND(CONFIG_GPIO_GD32, line5_9), EXTI_LINE_IRQ_COND(CONFIG_GPIO_GD32, line5_9), EXTI_LINE_IRQ_COND(CONFIG_GPIO_GD32, line5_9), EXTI_LINE_IRQ_COND(CONFIG_GPIO_GD32, line10_15), EXTI_LINE_IRQ_COND(CONFIG_GPIO_G...
fim
zephyrproject-rtos/zephyr
c
/* * Copyright (c) 2018 Marvell * Copyright (c) 2018 Lexmark International, Inc. * Copyright (c) 2019 Stephanos Ioannidis <root@stephanos.io> * Copyright 2024 NXP * * SPDX-License-Identifier: Apache-2.0 */ /* * NOTE: This driver implements the GICv1 and GICv2 interfaces. */ #include <zephyr/device.h> #includ...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>r Extended SPI Range */ #define GIC_ESPI_START 4096 #define GIC_ESPI_END 5119 #define GIC_DIST_IGROUPRnE 0x1000 #define GIC_DIST_ISENABLERnE 0x1200 #define GIC_DIST_ICENABLERnE 0x1400 #define GIC_DIST_ISPENDRnE 0x1600 #define GIC_DIST_ICPENDRnE 0x1800 #define GIC_DIST_ISACTIVERn...
fim
zephyrproject-rtos/zephyr
c
<|fim_suffix|>gic_reg_regions[idx].size; do { val = arm_gic_get_typer(rdist_addr + GICR_TYPER); uint64_t gicr_aff = GICR_TYPER_AFFINITY_VALUE_GET(val); if (arm_gic_aff_matching(gicr_aff, aff)) { return rdist_addr; } if (GIC_REDISTRIBUTOR_STRIDE > 0) { rdist_addr += GIC_REDISTRIBUTOR_STRIDE; ...
fim
zephyrproject-rtos/zephyr
c