text stringlengths 9 39.2M | dir stringlengths 25 226 | lang stringclasses 163
values | created_date timestamp[s] | updated_date timestamp[s] | repo_name stringclasses 751
values | repo_full_name stringclasses 752
values | star int64 1.01k 183k | len_tokens int64 1 18.5M |
|---|---|---|---|---|---|---|---|---|
```c
/*
*
* Based on adc_mcux_adc16.c and adc_mcux_adc12.c, which are:
*
*/
#define DT_DRV_COMPAT nxp_lpc_lpadc
#include <errno.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/sys/util.h>
#include <zephyr/drivers/regulator.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/pinctrl.h>
#defi... | /content/code_sandbox/drivers/adc/adc_mcux_lpadc.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 5,073 |
```c
/* TI ADS7052 ADC
*
*
*/
#define DT_DRV_COMPAT ti_ads7052
#include <zephyr/device.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/logging/log.h>
#include <zephyr/kernel.h>
LOG_MODULE_REGISTER(adc_ads7052);
#define ADC_CONTEXT_USES_KERNEL_TIMER
#include "adc_context.h"
#d... | /content/code_sandbox/drivers/adc/adc_ads7052.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,330 |
```c
/*
*
*/
#include <stdbool.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/logging/log.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/util.h>
#define ADC_CONTEXT_USES_KERNEL_TIMER
... | /content/code_sandbox/drivers/adc/adc_max1125x.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 8,039 |
```c
/*
*
*/
/**
* @file
* @brief ADC driver for the LMP90xxx AFE.
*/
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/adc/lmp90xxx.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/crc.h>
#define LOG_LEV... | /content/code_sandbox/drivers/adc/adc_lmp90xxx.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 9,248 |
```unknown
# IADC configuration options
config ADC_GECKO_IADC
bool "Gecko Incremental ADC driver"
default y
depends on DT_HAS_SILABS_GECKO_IADC_ENABLED
select SOC_GECKO_IADC
select ADC_CONFIGURABLE_INPUTS
help
Enable the driver implementation for the Silabs GeckoEXX32 Incremental ADC
config ADC_GECKO_ADC
b... | /content/code_sandbox/drivers/adc/Kconfig.gecko | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 140 |
```c
/*
* an affiliate of Cypress Semiconductor Corporation
*
*/
/**
* @brief ADC driver for Infineon CAT1 MCU family.
*/
#define DT_DRV_COMPAT infineon_cat1_adc
#include <zephyr/drivers/adc.h>
#include <cyhal_adc.h>
#include <cyhal_utils_impl.h>
#define ADC_CONTEXT_USES_KERNEL_TIMER
#include "adc_context.h"
... | /content/code_sandbox/drivers/adc/adc_ifx_cat1.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,200 |
```c
/*
*
*/
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/logging/log.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/util.h>
#define ADC_CONTEXT_USES_KE... | /content/code_sandbox/drivers/adc/adc_max11102_17.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,429 |
```unknown
config ADC_CC13XX_CC26XX
bool "CC13XX/CC26XX ADC driver"
default y
depends on DT_HAS_TI_CC13XX_CC26XX_ADC_ENABLED
help
Enable the TI CC13XX/CC26XX ADC driver.
``` | /content/code_sandbox/drivers/adc/Kconfig.cc13xx_cc26xx | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 57 |
```unknown
# ADC configuration options
config ADC_STM32
bool "STM32 ADC driver"
default y
depends on DT_HAS_ST_STM32_ADC_ENABLED
help
Enable the driver implementation for the stm32xx ADC
if ADC_STM32
config ADC_STM32_DMA
bool "STM32 MCU ADC DMA Support"
select DMA
help
Enable the ADC DMA mode for ADC i... | /content/code_sandbox/drivers/adc/Kconfig.stm32 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 98 |
```c
/*
*
*/
#define DT_DRV_COMPAT atmel_sam_afec
/** @file
* @brief Atmel SAM MCU family ADC (AFEC) driver.
*
* This is an implementation of the Zephyr ADC driver using the SAM Analog
* Front-End Controller (AFEC) peripheral.
*/
#include <errno.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/sys/util.h>... | /content/code_sandbox/drivers/adc/adc_sam_afec.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,832 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/irq.h>
#include <Adc_Sar_Ip_HwAccess.h>
#include <Adc_Sar_Ip.h>
#include <Adc_Sar_Ip_Irq.h>
#define ADC_CONTEXT_USES_KERNEL_TIMER
#include "adc_context.h"
#define DT_DRV_COMPAT nxp_s32_... | /content/code_sandbox/drivers/adc/adc_nxp_s32_adc_sar.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,751 |
```c
/*
*
*/
#define DT_DRV_COMPAT renesas_smartbond_adc
#define ADC_CONTEXT_USES_KERNEL_TIMER
#include <DA1469xAB.h>
#include <da1469x_pd.h>
#include "adc_context.h"
#include <zephyr/dt-bindings/adc/smartbond-adc.h>
#define LOG_LEVEL CONFIG_ADC_LOG_LEVEL
#include <zephyr/logging/log.h>
#include <zephyr/irq.h>
#in... | /content/code_sandbox/drivers/adc/adc_smartbond_gpadc.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,042 |
```c
/*
*
*/
#include <zephyr/drivers/adc.h>
int adc_gain_invert(enum adc_gain gain,
int32_t *value)
{
struct gain_desc {
uint8_t mul;
uint8_t div;
};
static const struct gain_desc gains[] = {
[ADC_GAIN_1_6] = {.mul = 6, .div = 1},
[ADC_GAIN_1_5] = {.mul = 5, .div = 1},
[ADC_GAIN_1_4] = {.mul = 4... | /content/code_sandbox/drivers/adc/adc_common.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 589 |
```unknown
# MCP320x ADC configuration options
config ADC_MCP320X
bool "MCP3204/MCP3208 driver"
default y
depends on DT_HAS_MICROCHIP_MCP3204_ENABLED || DT_HAS_MICROCHIP_MCP3208_ENABLED
select SPI
help
Enable MCP3204/MCP3208 ADC driver.
The MCP3204/MCP3208 are 4/8 channel 12-bit A/D converters
with SPI... | /content/code_sandbox/drivers/adc/Kconfig.mcp320x | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 202 |
```unknown
config ADC_NXP_S32_ADC_SAR
bool "NXP S32 ADC SAR driver"
default y
depends on DT_HAS_NXP_S32_ADC_SAR_ENABLED
help
This option enables the NXP S32 ADC SAR driver.
``` | /content/code_sandbox/drivers/adc/Kconfig.nxp_s32 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 54 |
```c
/*
*
*/
#define DT_DRV_COMPAT raspberrypi_pico_adc
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/drivers/reset.h>
#include <zephyr/logging/log.h>
#include <hardware/adc.h>
#include <zephyr/irq.h>
LOG_MODULE_REGISTER(adc_rpi, CON... | /content/code_sandbox/drivers/adc/adc_rpi_pico.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,592 |
```c
/*
*
*/
#define DT_DRV_COMPAT nuvoton_npcx_adc
#include <assert.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/adc/adc_npcx_threshold.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/kernel.h>
#include <zephyr/pm/policy.h>
#include <soc.h>
#define ... | /content/code_sandbox/drivers/adc/adc_npcx.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 6,848 |
```c
/*
*
*/
#include <zephyr/drivers/adc.h>
#include <zephyr/internal/syscall_handler.h>
#include <zephyr/kernel.h>
static inline int z_vrfy_adc_channel_setup(const struct device *dev,
const struct adc_channel_cfg *user_channel_cfg)
{
struct adc_channel_cfg channel_cfg;
K_OOPS(K_SYSCALL_DRIVER_ADC(dev, ... | /content/code_sandbox/drivers/adc/adc_handlers.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 647 |
```unknown
config ADC_AD559X
bool "AD559x ADC driver"
default y
depends on DT_HAS_ADI_AD559X_ADC_ENABLED
select MFD
help
Enable the AD559x ADC driver.
config ADC_AD559X_ACQUISITION_THREAD_STACK_SIZE
int "Stack size for the ADC data acquisition thread"
depends on ADC_AD559X
default 384
help
Size of the ... | /content/code_sandbox/drivers/adc/Kconfig.ad559x | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 148 |
```unknown
#
config ADC_ESP32
bool "ESP32 ADC driver"
default y
depends on DT_HAS_ESPRESSIF_ESP32_ADC_ENABLED
help
Enable the driver implementation for the ESP32 ADC
if ADC_ESP32
config ADC_ESP32_DMA
bool "ESP32 ADC DMA Support"
default n
depends on DT_HAS_ESPRESSIF_ESP32_GDMA_ENABLED
help
Enable the A... | /content/code_sandbox/drivers/adc/Kconfig.esp32 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 109 |
```c
/*
*
*/
#define DT_DRV_COMPAT silabs_gecko_iadc
#include <zephyr/drivers/adc.h>
#include <em_iadc.h>
#include <em_cmu.h>
#define ADC_CONTEXT_USES_KERNEL_TIMER
#include "adc_context.h"
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(iadc_gecko, CONFIG_ADC_LOG_LEVEL);
/* Number of channels available. */
... | /content/code_sandbox/drivers/adc/iadc_gecko.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,478 |
```unknown
# Renesas RA Family
config ADC_RENESAS_RA
bool "Renesas RA ADC"
default y
depends on DT_HAS_RENESAS_RA_ADC_ENABLED
select USE_RA_FSP_ADC
help
Enable Renesas RA ADC Driver.
``` | /content/code_sandbox/drivers/adc/Kconfig.renesas_ra | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 56 |
```c
/*
*
*/
#define ADC_CONTEXT_USES_KERNEL_TIMER
#include "adc_context.h"
#include <nrfx_adc.h>
#include <zephyr/dt-bindings/adc/nrf-adc.h>
#define LOG_LEVEL CONFIG_ADC_LOG_LEVEL
#include <zephyr/logging/log.h>
#include <zephyr/irq.h>
LOG_MODULE_REGISTER(adc_nrfx_adc);
#define DT_DRV_COMPAT nordic_nrf_adc
/* En... | /content/code_sandbox/drivers/adc/adc_nrfx_adc.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,075 |
```unknown
# ADC configuration options
config ADC_VF610
bool "VF610 ADC driver"
depends on DT_HAS_NXP_VF610_ADC_ENABLED
default y
help
Enable the VF610 ADC driver.
``` | /content/code_sandbox/drivers/adc/Kconfig.vf610 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 43 |
```c
/*
*
*/
#define DT_DRV_COMPAT ite_it8xxx2_adc
#define LOG_LEVEL CONFIG_ADC_LOG_LEVEL
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(adc_ite_it8xxx2);
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/pinctrl.h>
#include <soc.h>
#include <soc_dt.h>
#include <errno.h>
#include <assert.h>
#include <z... | /content/code_sandbox/drivers/adc/adc_ite_it8xxx2.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,840 |
```unknown
# NUMAKER ADC Driver configuration options
config ADC_NUMAKER
bool "Nuvoton NuMaker MCU ADC driver"
default y
select HAS_NUMAKER_ADC
depends on DT_HAS_NUVOTON_NUMAKER_ADC_ENABLED
help
This option enables the ADC driver for Nuvoton NuMaker family of
processors.
Say y if you wish to enable NuMa... | /content/code_sandbox/drivers/adc/Kconfig.numaker | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 81 |
```c
/*
*
*/
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/adc/ads114s0x.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/dt-bindings/adc/ads114s0x_adc.h>
#include <zephyr/logging/log.h>
#include <zephyr/kernel.h>... | /content/code_sandbox/drivers/adc/adc_ads114s0x.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 15,802 |
```objective-c
/*
*
*/
#ifndef ZEPHYR_DRIVERS_ADC_ADC_CONTEXT_H_
#define ZEPHYR_DRIVERS_ADC_ADC_CONTEXT_H_
#include <zephyr/drivers/adc.h>
#include <zephyr/sys/atomic.h>
#ifdef __cplusplus
extern "C" {
#endif
struct adc_context;
/*
* Each driver should provide implementations of the following two functions:
* ... | /content/code_sandbox/drivers/adc/adc_context.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,888 |
```c
/*
*
*/
#define DT_DRV_COMPAT nuvoton_numaker_adc
#include <zephyr/kernel.h>
#include <zephyr/drivers/reset.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/clock_control/clock_control_numaker.h>
#include <zephyr/logging/l... | /content/code_sandbox/drivers/adc/adc_numaker.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,091 |
```c
/*
*
*/
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/util.h>
#define ADC_CONTEXT_USES_KERNEL_TIMER 1
#include "adc_contex... | /content/code_sandbox/drivers/adc/adc_ads1112.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,878 |
```c
/*
*
*/
#define DT_DRV_COMPAT atmel_sam_adc
#include <soc.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/drivers/clock_control/atmel_sam_pmc.h>
#define ADC_CONTEXT_USES_KERNEL_TIMER
#include "adc_context.h"
#include <zephyr/logging/log.h>
#include <zephyr/irq.h>
LOG_M... | /content/code_sandbox/drivers/adc/adc_sam.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,085 |
```c
/*
*
*/
#define DT_DRV_COMPAT espressif_esp32_adc
#include <errno.h>
#include <hal/adc_hal.h>
#include <hal/adc_types.h>
#include <soc/adc_periph.h>
#include <esp_adc_cal.h>
#include <esp_clk_tree.h>
#include <esp_private/periph_ctrl.h>
#include <esp_private/sar_periph_ctrl.h>
#include <esp_private/adc_share_h... | /content/code_sandbox/drivers/adc/adc_esp32.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 6,037 |
```unknown
# ADC configuration options
config ADC_ITE_IT8XXX2
bool "ITE IT8XXX2 ADC driver"
default y
depends on DT_HAS_ITE_IT8XXX2_ADC_ENABLED
help
This option enables the ADC driver for IT8XXX2
family of processors.
Voltage range 0 to 3000mV.
Support 10-bit resolution.
Support 8 channels: ch0~ch7... | /content/code_sandbox/drivers/adc/Kconfig.it8xxx2 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 152 |
```unknown
config ADC_TLA2021
bool "Texas Instruments TLA2021 Low-Power ADC"
default y
depends on DT_HAS_TI_TLA2021_ENABLED
select I2C
help
TLA202x Cost-Optimized, Ultra-Small, 12-Bit, System-Monitoring ADCs
if ADC_TLA2021
config ADC_TLA2021_INIT_PRIORITY
int "Priority for the driver initialization"
defaul... | /content/code_sandbox/drivers/adc/Kconfig.tla2021 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 225 |
```c
/* TI ADS1X1X ADC
*
*
*/
#include <stdbool.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/logging/log.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/util.h>
#define ADC_CONTEXT_... | /content/code_sandbox/drivers/adc/adc_ads1x1x.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 6,375 |
```c
/* LLTC LTC2451 ADC
*
*
*/
#include <zephyr/device.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/byteorder.h>
LOG_MODULE_REGISTER(ltc2451, CONFIG_ADC_LOG_LEVEL);
#define DT_DRV_COMPAT lltc_ltc2451
struct ltc2451_config {
struct i2c_d... | /content/code_sandbox/drivers/adc/adc_ltc2451.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 707 |
```unknown
# ADS1X1X ADC configuration options
config ADC_ADS1X1X
bool "ADS1X1X driver"
default y
depends on DT_HAS_TI_ADS1013_ENABLED || DT_HAS_TI_ADS1014_ENABLED || \
DT_HAS_TI_ADS1015_ENABLED || DT_HAS_TI_ADS1113_ENABLED || \
DT_HAS_TI_ADS1114_ENABLED || DT_HAS_TI_ADS1115_ENABLED || \
DT_HAS_TI_A... | /content/code_sandbox/drivers/adc/Kconfig.ads1x1x | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 274 |
```c
/*
*
*/
#define DT_DRV_COMPAT atmel_sam0_adc
#include <soc.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/logging/log.h>
#include <zephyr/irq.h>
LOG_MODULE_REGISTER(adc_sam0, CONFIG_ADC_LOG_LEVEL);
#define ADC_CONTEXT_USES_KERNEL_TIMER
#include "adc_context.h"
#if de... | /content/code_sandbox/drivers/adc/adc_sam0.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 4,375 |
```c
/*
*
*/
/**
* @file
* @brief ADC driver for the MCP3204/MCP3208 ADCs.
*/
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/util.h>
LOG_MODULE_REGI... | /content/code_sandbox/drivers/adc/adc_mcp320x.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,330 |
```c
/*
*
*/
#define DT_DRV_COMPAT renesas_ra_adc
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/drivers/reset.h>
#include <zephyr/logging/log.h>
#include <instances/r_adc.h>
#include <zephyr/irq.h>
LOG_MODULE_REGISTER(adc_ra, CONFIG_... | /content/code_sandbox/drivers/adc/adc_renesas_ra.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,926 |
```unknown
config ADC_EMUL
bool "ADC emulator"
default y
depends on DT_HAS_ZEPHYR_ADC_EMUL_ENABLED
help
Enable the ADC emulator driver. This is a fake driver in that it
does not talk to real hardware. It pretends to be actual ADC. It
is used for testing higher-level API for ADC devices.
if ADC_EMUL
conf... | /content/code_sandbox/drivers/adc/Kconfig.adc_emul | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 191 |
```c
/*
*
*/
#define DT_DRV_COMPAT nxp_kinetis_adc16
#include <errno.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/pinctrl.h>
#ifdef CONFIG_ADC_MCUX_ADC16_ENABLE_EDMA
#include <zephyr/drivers/dma.h>
#endif
#include <fsl_adc16.h>
#define LOG_LEVEL CONFIG_ADC_LOG_LEVEL
#include <zephyr/logging/log.h>
... | /content/code_sandbox/drivers/adc/adc_mcux_adc16.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,975 |
```c
/*
*/
#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.h"
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(adc_ad559x, CONFIG_... | /content/code_sandbox/drivers/adc/adc_ad559x.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,074 |
```unknown
# ADC configuration options
config ADC_SMARTBOND_GPADC
bool "Renesas SmartBond(tm) ADC driver for ADC"
default y
depends on DT_HAS_RENESAS_SMARTBOND_ADC_ENABLED
select ADC_CONFIGURABLE_INPUTS
help
Enable support for ADC driver for Renesas SmartBond(tm) MCU series.
config ADC_SMARTBOND_SDADC
bool ... | /content/code_sandbox/drivers/adc/Kconfig.smartbond | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 146 |
```unknown
# ADC configuration options
config ADC_GD32
bool "GD32 ADC driver"
default y
depends on DT_HAS_GD_GD32_ADC_ENABLED
help
Enable GigaDevice GD32 ADC driver
``` | /content/code_sandbox/drivers/adc/Kconfig.gd32 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 47 |
```unknown
# ADC configuration options
config ADC_SAM_AFEC
bool "SAM ADC Driver"
default y
depends on DT_HAS_ATMEL_SAM_AFEC_ENABLED
help
Enable Atmel SAM MCU Family Analog-to-Digital Converter (ADC) driver
based on AFEC module.
``` | /content/code_sandbox/drivers/adc/Kconfig.sam_afec | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 62 |
```unknown
# Microchip XEC ADC configuration
config ADC_XEC
bool "Microchip XEC series ADC driver"
default y
depends on DT_HAS_MICROCHIP_XEC_ADC_ENABLED
help
Enable ADC driver for Microchip XEC MCU series.
``` | /content/code_sandbox/drivers/adc/Kconfig.xec | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 54 |
```unknown
#
config ADC_ADS1119
bool "Texas instruments ADS1119 I2C"
default y
depends on DT_HAS_TI_ADS1119_ENABLED
select I2C
select ADC_CONFIGURABLE_INPUTS
help
Enable the driver implementation for the ADS1119
if ADC_ADS1119
config ADC_ADS1119_ASYNC_THREAD_INIT_PRIO
int "ADC ADS1119 async thread priority... | /content/code_sandbox/drivers/adc/Kconfig.ads1119 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 142 |
```unknown
# NPCX ADC driver configuration options
config ADC_NPCX
bool "Nuvoton NPCX embedded controller (EC) ADC driver"
default y
depends on DT_HAS_NUVOTON_NPCX_ADC_ENABLED
help
This option enables the ADC driver for NPCX family of
processors.
Say y if you wish to use ADC channels on NPCX MCU.
if ADC... | /content/code_sandbox/drivers/adc/Kconfig.npcx | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 175 |
```unknown
# MAX1125X ADC configuration options
config ADC_MAX1125X
bool "MAX1125X driver"
default y
depends on DT_HAS_MAXIM_MAX11254_ENABLED || DT_HAS_MAXIM_MAX11253_ENABLED
select SPI
select ADC_CONFIGURABLE_INPUTS
help
Enable the driver implementation for the MAX1125X
if ADC_MAX1125X
config ADC_MAX1125X... | /content/code_sandbox/drivers/adc/Kconfig.max1125x | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 233 |
```c
/*
*
*/
#define DT_DRV_COMPAT nxp_gau_adc
#include <zephyr/drivers/adc.h>
#include <zephyr/irq.h>
#include <errno.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(adc_mcux_gau_adc, CONFIG_ADC_LOG_LEVEL);
#define ADC_CONTEXT_USES_KERNEL_TIMER
#include "adc_context.h"
#include <fsl_adc.h>
#define NUM_A... | /content/code_sandbox/drivers/adc/adc_mcux_gau_adc.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,424 |
```unknown
# ADC configuration options
config ADC_NRFX_ADC
bool "nRF ADC nrfx driver"
default y
depends on DT_HAS_NORDIC_NRF_ADC_ENABLED
select NRFX_ADC
select ADC_CONFIGURABLE_INPUTS
help
Enable support for nrfx ADC driver for nRF51 MCU series.
config ADC_NRFX_ADC_CHANNEL_COUNT
int "Number of ADC channels... | /content/code_sandbox/drivers/adc/Kconfig.nrfx | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 197 |
```c
/*
*/
#define DT_DRV_COMPAT nxp_vf610_adc
#include <errno.h>
#include <zephyr/drivers/adc.h>
#include <adc_imx6sx.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(vf610_adc, CONFIG_ADC_LOG_LEVEL);
#define ADC_CONTEXT_USES_KERNEL_TIMER
#include "adc_context.h"
struct vf610_adc_config {
ADC_Type *base;
... | /content/code_sandbox/drivers/adc/adc_vf610.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,754 |
```c
/*
*
*/
#define DT_DRV_COMPAT gd_gd32_adc
#include <errno.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/clock_control/gd32.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/reset.h>
#include <zephyr/devicetree.h>
#include <zephyr/irq.h>
#i... | /content/code_sandbox/drivers/adc/adc_gd32.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 4,125 |
```c
/*
*
*/
#define DT_DRV_COMPAT silabs_gecko_adc
#include <zephyr/drivers/adc.h>
#include <em_adc.h>
#include <em_cmu.h>
#define ADC_CONTEXT_USES_KERNEL_TIMER
#include "adc_context.h"
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(adc_gecko, CONFIG_ADC_LOG_LEVEL);
/* Number of channels available. */
#de... | /content/code_sandbox/drivers/adc/adc_gecko.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,142 |
```unknown
# ADC configuration options
#
# ADC options
#
menuconfig ADC
bool "Analog-to-Digital Converter (ADC) drivers"
# All platforms that implement the ADC driver are now required to
# provide relevant DTS entries.
help
Enable ADC (Analog to Digital Converter) driver configuration.
if ADC
config ADC_SHEL... | /content/code_sandbox/drivers/adc/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 735 |
```c
/*
*
* Based on adc_mcux_adc16.c, which is:
*
*/
#define DT_DRV_COMPAT nxp_kinetis_adc12
#include <zephyr/drivers/adc.h>
#include <fsl_adc12.h>
#include <zephyr/drivers/pinctrl.h>
#define LOG_LEVEL CONFIG_ADC_LOG_LEVEL
#include <zephyr/logging/log.h>
#include <zephyr/irq.h>
LOG_MODULE_REGISTER(adc_mcux_adc1... | /content/code_sandbox/drivers/adc/adc_mcux_adc12.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,351 |
```unknown
config ADC_CC32XX
bool "CC32XX ADC driver"
default y
depends on DT_HAS_TI_CC32XX_ADC_ENABLED
help
This option enables the CC32XX ADC driver.
``` | /content/code_sandbox/drivers/adc/Kconfig.cc32xx | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 44 |
```unknown
config ADC_LTC2451
bool "LTC2451 driver"
default y
depends on DT_HAS_LLTC_LTC2451_ENABLED
select I2C
``` | /content/code_sandbox/drivers/adc/Kconfig.ltc2451 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 38 |
```c
/*
*
*/
#define DT_DRV_COMPAT st_stm32_adc
#include <errno.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/device.h>
#include <zephyr/kernel.h>
#include <zephyr/init.h>
#include <soc.h>
#include <zephyr/pm/device.h>
#include <zephyr/pm/policy.h>
#include <stm32_ll_adc.h... | /content/code_sandbox/drivers/adc/adc_stm32.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 15,721 |
```c
/*
*
*/
#define DT_DRV_COMPAT telink_b91_adc
/* Local driver headers */
#define ADC_CONTEXT_USES_KERNEL_TIMER
#include "adc_context.h"
/* Zephyr Device Tree headers */
#include <zephyr/dt-bindings/adc/b91-adc.h>
/* Zephyr Logging headers */
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(adc_b91, CONFIG_... | /content/code_sandbox/drivers/adc/adc_b91.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,076 |
```c
/*
*
*/
#include <zephyr/shell/shell.h>
#include <stdlib.h>
#include <zephyr/drivers/adc.h>
#include <ctype.h>
#include <zephyr/sys/util.h>
#include <zephyr/devicetree.h>
#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(adc_shell);
#define CMD_HELP_ACQ_TIME \
... | /content/code_sandbox/drivers/adc/adc_shell.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 4,757 |
```c
/*
*
*/
#define DT_DRV_COMPAT ambiq_adc
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/pm/device.h>
#include <zephyr/pm/device_runtime.h>
#include <zephyr/kernel.h>
#define ADC_CONTEXT_USES_KERNEL_TIMER
#include "adc_context.h"
/* ambiq-sdk includes */
#include <am_mcu_a... | /content/code_sandbox/drivers/adc/adc_ambiq.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,034 |
```unknown
# Infineon CAT1 ADC configuration options
# an affiliate of Cypress Semiconductor Corporation
#
config ADC_INFINEON_CAT1
bool "Infineon CAT1 ADC driver"
default y
depends on DT_HAS_INFINEON_CAT1_ADC_ENABLED
select USE_INFINEON_ADC
select ADC_CONFIGURABLE_INPUTS
help
This option enables the ADC dri... | /content/code_sandbox/drivers/adc/Kconfig.ifx_cat1 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 86 |
```unknown
# XMC4XXX ADC configuration options
config ADC_XMC4XXX
bool "XMC4XXX ADC"
default y
depends on DT_HAS_INFINEON_XMC4XXX_ADC_ENABLED
help
Enable XMC4XXX adc driver.
``` | /content/code_sandbox/drivers/adc/Kconfig.xmc4xxx | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 54 |
```unknown
config ADC_SAM0
bool "Atmel SAM0 series ADC Driver"
default y
depends on DT_HAS_ATMEL_SAM0_ADC_ENABLED
select ADC_CONFIGURABLE_INPUTS
help
Enable Atmel SAM0 MCU Family Analog-to-Digital Converter (ADC) driver.
``` | /content/code_sandbox/drivers/adc/Kconfig.sam0 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 63 |
```c
/**
* @file
*
* @brief Emulated ADC driver
*/
/*
*
*/
#define DT_DRV_COMPAT zephyr_adc_emul
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/adc/adc_emul.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/util.h>
LOG_MODULE_REGISTE... | /content/code_sandbox/drivers/adc/adc_emul.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,939 |
```c
/*
* Organisation (CSIRO) ABN 41 687 119 230.
*
*/
/*
* This is not a real ADC driver. It is used to instantiate struct
* devices for the "vnd,adc" devicetree compatible used in test code.
*/
#define DT_DRV_COMPAT vnd_adc
#include <zephyr/drivers/adc.h>
#include <zephyr/device.h>
#include <zephyr/kernel.h... | /content/code_sandbox/drivers/adc/adc_test.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 302 |
```unknown
#
menuconfig ADC_ADS114S0X
bool "Texas instruments ADS114S0x"
default y
depends on DT_HAS_TI_ADS114S08_ENABLED
select SPI
select ADC_CONFIGURABLE_INPUTS
select ADC_CONFIGURABLE_EXCITATION_CURRENT_SOURCE_PIN
select ADC_CONFIGURABLE_VBIAS_PIN
help
Enable the driver implementation for the ADS114S0X ... | /content/code_sandbox/drivers/adc/Kconfig.ads114s0x | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 316 |
```unknown
# LMP90xxx ADC configuration options
config ADC_LMP90XXX
bool "LMP90xxx driver"
default y
depends on DT_HAS_TI_LMP90077_ENABLED || DT_HAS_TI_LMP90078_ENABLED || \
DT_HAS_TI_LMP90079_ENABLED || DT_HAS_TI_LMP90080_ENABLED || \
DT_HAS_TI_LMP90097_ENABLED || DT_HAS_TI_LMP90098_ENABLED || \
DT... | /content/code_sandbox/drivers/adc/Kconfig.lmp90xxx | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 369 |
```unknown
config ADC_ENE_KB1200
bool "ENE KB1200 ADC driver"
default y
depends on DT_HAS_ENE_KB1200_ADC_ENABLED
select PINCTRL
help
Enable ADC driver for ENE KB1200.
``` | /content/code_sandbox/drivers/adc/Kconfig.ene | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 54 |
```unknown
config ADC_TELINK_B91
bool "Telink Semiconductor B91 ADC driver"
default y
depends on DT_HAS_TELINK_B91_ADC_ENABLED
select ADC_CONFIGURABLE_INPUTS
help
Enables Telink B91 ADC driver.
if ADC_TELINK_B91
config ADC_B91_ACQUISITION_THREAD_STACK_SIZE
int "Stack size for the ADC data acquisition thread... | /content/code_sandbox/drivers/adc/Kconfig.b91 | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 155 |
```unknown
config ADC_RPI_PICO
bool "Raspberry Pi Pico ADC driver"
default y
depends on DT_HAS_RASPBERRYPI_PICO_ADC_ENABLED
select PICOSDK_USE_ADC
depends on RESET
``` | /content/code_sandbox/drivers/adc/Kconfig.rpi_pico | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 49 |
```c
/*
*
*/
#define DT_DRV_COMPAT ti_cc32xx_adc
#include <errno.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/device.h>
#include <zephyr/kernel.h>
#include <zephyr/init.h>
#include <soc.h>
/* Driverlib includes */
#include <inc/hw_types.h>
#include <driverlib/pin.h>
#include <driverlib/rom.h>
#include <dri... | /content/code_sandbox/drivers/adc/adc_cc32xx.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,294 |
```objective-c
/*
*
*/
#ifndef ZEPHYR_DRIVERS_PSCI_PSCI_H_
#define ZEPHYR_DRIVERS_PSCI_PSCI_H_
#include <zephyr/drivers/pm_cpu_ops/psci.h>
#ifdef CONFIG_64BIT
#define PSCI_FN_NATIVE(version, name) PSCI_##version##_FN64_##name
#else
#define PSCI_FN_NATIVE(version, name) PSCI_##version##_FN_##name
#endif
/* PSCI v0... | /content/code_sandbox/drivers/pm_cpu_ops/pm_cpu_ops_psci.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,941 |
```c
/*
*
*/
#include <zephyr/kernel.h>
int __weak pm_cpu_on(unsigned long cpuid, uintptr_t entry_point)
{
return -ENOTSUP;
}
int __weak pm_cpu_off(void)
{
return -ENOTSUP;
}
``` | /content/code_sandbox/drivers/pm_cpu_ops/pm_cpu_ops_weak_impl.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 52 |
```unknown
# CPU power management driver configuration options
menuconfig PM_CPU_OPS
bool "CPU power management drivers"
help
Enable CPU power management drivers configuration
if PM_CPU_OPS
module = PM_CPU_OPS
module-str = pm_cpu_ops
source "subsys/logging/Kconfig.template.log_config"
config PM_CPU_OPS_HAS_DR... | /content/code_sandbox/drivers/pm_cpu_ops/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 259 |
```c
/*
*
*/
#include <zephyr/shell/shell.h>
#include <zephyr/drivers/pm_cpu_ops.h>
/* Zephyr kernel start address. */
extern void __start(void);
static int cmd_reboot_warm(const struct shell *shctx, size_t argc, char **argv)
{
ARG_UNUSED(shctx);
ARG_UNUSED(argc);
ARG_UNUSED(argv);
int ret;
ret = pm_system_r... | /content/code_sandbox/drivers/pm_cpu_ops/psci_shell.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 497 |
```c
/*
*
*
*/
#define DT_DRV_COMPAT arm_psci_0_2
#define LOG_LEVEL CONFIG_PM_CPU_OPS_LOG_LEVEL
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(psci);
#include <zephyr/kernel.h>
#include <zephyr/arch/cpu.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/pm_cpu_ops.h>
#include "... | /content/code_sandbox/drivers/pm_cpu_ops/pm_cpu_ops_psci.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,655 |
```c
/*
*
*/
/** @file
*
* @brief Per-thread errno accessor function
*
* Allow accessing the errno for the current thread without involving the
* context switching.
*/
#include <zephyr/kernel.h>
#include <zephyr/internal/syscall_handler.h>
/*
* Define _k_neg_eagain for use in assembly files as errno.h is
*... | /content/code_sandbox/kernel/errno.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 259 |
```unknown
#
menu "SMP Options"
config SMP
bool "Symmetric multiprocessing support"
depends on USE_SWITCH
depends on !ATOMIC_OPERATIONS_C
help
When true, kernel will be built with SMP support, allowing
more than one CPU to schedule Zephyr tasks at a time.
config USE_SWITCH
bool "Use new-style _arch_switch ... | /content/code_sandbox/kernel/Kconfig.smp | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,185 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <ksched.h>
#include <zephyr/spinlock.h>
extern struct k_spinlock _sched_spinlock;
# ifdef CONFIG_SMP
/* Right now we use a two byte for this mask */
BUILD_ASSERT(CONFIG_MP_MAX_NUM_CPUS <= 16, "Too many CPUs for mask word");
# endif /* CONFIG_SMP */
static int cpu_... | /content/code_sandbox/kernel/cpu_mask.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 451 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/kernel_structs.h>
#include <zephyr/toolchain.h>
#include <ksched.h>
#include <wait_q.h>
#include <zephyr/internal/syscall_handler.h>
#include <zephyr/init.h>
#ifdef CONFIG_OBJ_CORE_CONDVAR
static struct k_obj_type obj_type_condvar;
#endif /* CONFIG_OBJ_CORE_C... | /content/code_sandbox/kernel/condvar.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,080 |
```c
/*
*
*/
/**
* @file
* @brief Message queues.
*/
#include <zephyr/kernel.h>
#include <zephyr/kernel_structs.h>
#include <zephyr/toolchain.h>
#include <zephyr/linker/sections.h>
#include <string.h>
#include <ksched.h>
#include <wait_q.h>
#include <zephyr/sys/dlist.h>
#include <zephyr/sys/math_extras.h>
#inc... | /content/code_sandbox/kernel/msg_q.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,509 |
```c
/*
*
*/
/**
* @file
*
* Second generation work queue implementation
*/
#include <zephyr/kernel.h>
#include <zephyr/kernel_structs.h>
#include <wait_q.h>
#include <zephyr/spinlock.h>
#include <errno.h>
#include <ksched.h>
#include <zephyr/sys/printk.h>
static inline void flag_clear(uint32_t *flagp,
... | /content/code_sandbox/kernel/work.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 7,939 |
```c
/*
*
*/
/**
* @file
* @brief Kernel thread support
*
* This module provides general purpose thread support.
*/
#include <zephyr/kernel.h>
#include <zephyr/spinlock.h>
#include <zephyr/sys/math_extras.h>
#include <zephyr/sys_clock.h>
#include <ksched.h>
#include <kthread.h>
#include <wait_q.h>
#include <ze... | /content/code_sandbox/kernel/thread.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 8,185 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/internal/syscall_handler.h>
#include <zephyr/kernel_structs.h>
#include <zephyr/toolchain.h>
static struct k_object *validate_kernel_object(const void *obj,
enum k_objects otype,
enum _obj_init_check init)
{
struct k_object *ko;
int ... | /content/code_sandbox/kernel/userspace_handler.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 591 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/irq_offload.h>
/* Make offload_sem visible outside testing, in order to release
* it outside when error happened.
*/
K_SEM_DEFINE(offload_sem, 1, 1);
void irq_offload(irq_offload_routine_t routine, const void *parameter)
{
#ifdef CONFIG_IRQ_OFFLOAD_NESTED
... | /content/code_sandbox/kernel/irq_offload.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 141 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <kswap.h>
#include <ksched.h>
#include <ipi.h>
static int slice_ticks = DIV_ROUND_UP(CONFIG_TIMESLICE_SIZE * Z_HZ_ticks, Z_HZ_ms);
static int slice_max_prio = CONFIG_TIMESLICE_PRIORITY;
static struct _timeout slice_timeouts[CONFIG_MP_MAX_NUM_CPUS];
static bool slice_e... | /content/code_sandbox/kernel/timeslicing.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 850 |
```c
/*
*
*/
/**
* @brief fixed-size stack object
*/
#include <zephyr/sys/math_extras.h>
#include <zephyr/kernel.h>
#include <zephyr/kernel_structs.h>
#include <zephyr/toolchain.h>
#include <ksched.h>
#include <wait_q.h>
#include <zephyr/sys/check.h>
#include <zephyr/init.h>
#include <zephyr/internal/syscall_han... | /content/code_sandbox/kernel/stack.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,427 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/kernel_structs.h>
#include <zephyr/toolchain.h>
#include <zephyr/linker/sections.h>
#include <zephyr/sys/dlist.h>
#include <zephyr/init.h>
#include <zephyr/sys/check.h>
#include <zephyr/sys/iterable_sections.h>
#include <string.h>
/* private kernel APIs */
#i... | /content/code_sandbox/kernel/mem_slab.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,483 |
```c
/*
*
*/
void __do_global_ctors_aux(void);
void __do_init_array_aux(void);
void z_init_static(void)
{
#if defined(CONFIG_STATIC_INIT_GNU)
__do_global_ctors_aux();
__do_init_array_aux();
#elif defined(__CCAC__) /* ARC MWDT */
__do_global_ctors_aux();
#endif
}
/**
* @section - Constructor module
* @brief
*... | /content/code_sandbox/kernel/init_static.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 463 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/internal/syscall_handler.h>
#include <kernel_arch_interface.h>
int z_impl_k_float_disable(struct k_thread *thread)
{
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
return arch_float_disable(thread);
#else
ARG_UNUSED(thread);
return -ENOTSUP;
#endif ... | /content/code_sandbox/kernel/float.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 282 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/init.h>
#include <zephyr/linker/linker-defs.h>
#include <zephyr/sys/iterable_sections.h>
/* private kernel APIs */
#include <ksched.h>
#include <wait_q.h>
void k_heap_init(struct k_heap *heap, void *mem, size_t bytes)
{
z_waitq_init(&heap->wait_q);
sys_heap... | /content/code_sandbox/kernel/kheap.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,247 |
```c
/*
*
*/
/**
* @file
*
* @brief Pipes
*/
#include <zephyr/kernel.h>
#include <zephyr/kernel_structs.h>
#include <zephyr/toolchain.h>
#include <ksched.h>
#include <wait_q.h>
#include <zephyr/init.h>
#include <zephyr/internal/syscall_handler.h>
#include <kernel_internal.h>
#include <zephyr/sys/check.h>
stru... | /content/code_sandbox/kernel/pipes.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 5,673 |
```c
/**
*/
#include <zephyr/kernel.h>
#include <kswap.h>
#include <ksched.h>
#include <ipi.h>
#ifdef CONFIG_TRACE_SCHED_IPI
extern void z_trace_sched_ipi(void);
#endif
void flag_ipi(uint32_t ipi_mask)
{
#if defined(CONFIG_SCHED_IPI_SUPPORTED)
if (arch_num_cpus() > 1) {
atomic_or(&_kernel.pending_ipi, (atomic_v... | /content/code_sandbox/kernel/ipi.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 787 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/kernel/obj_core.h>
static struct k_spinlock lock;
sys_slist_t z_obj_type_list = SYS_SLIST_STATIC_INIT(&z_obj_type_list);
struct k_obj_type *z_obj_type_init(struct k_obj_type *type,
uint32_t id, size_t off)
{
sys_slist_init(&type->list);
sys_slist_... | /content/code_sandbox/kernel/obj_core.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,767 |
```unknown
# Kernel configuration options
menu "Memory Domains"
config MAX_DOMAIN_PARTITIONS
int "Maximum number of partitions per memory domain"
default 16
range 0 $(UINT8_MAX)
depends on USERSPACE
help
Configure the maximum number of partitions per memory domain.
config ARCH_MEM_DOMAIN_DATA
bool
depends... | /content/code_sandbox/kernel/Kconfig.mem_domain | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 534 |
```c
/*
*
*/
#include <stddef.h>
#include <string.h>
#include <zephyr/device.h>
#include <zephyr/sys/atomic.h>
#include <zephyr/sys/iterable_sections.h>
#include <zephyr/sys/kobject.h>
#include <zephyr/internal/syscall_handler.h>
#include <zephyr/toolchain.h>
/**
* @brief Initialize state for all static devices.
... | /content/code_sandbox/kernel/device.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,272 |
```c
/*
*
*/
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <zephyr/kernel_structs.h>
#include <kernel_internal.h>
#include <zephyr/sys/__assert.h>
#include <stdbool.h>
#include <zephyr/spinlock.h>
#include <zephyr/sys/check.h>
#include <zephyr/sys/libc-hooks.h>
#include <zephyr/logging/log.h>
LOG_MODU... | /content/code_sandbox/kernel/mem_domain.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,324 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.