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 |
|---|---|---|---|---|---|---|---|---|
```yaml
sample:
name: SPI FRAM Module Sample
tests:
sample.drivers.spi.fujitsu_fram:
tags:
- drivers
- fram
harness: fram
depends_on:
- gpio
- spi
filter: dt_alias_exists("spi-1")
``` | /content/code_sandbox/samples/drivers/spi_fujitsu_fram/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 64 |
```c
/*
*
*/
#include <errno.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/device.h>
#include <zephyr/drivers/spi.h>
/**
* @file Sample app using the Fujitsu MB85RS64V FRAM through SPI.
*/
#define MB85RS64V_MANUFACTURER_ID_CMD 0x9f
#define MB85RS64V_WRITE_ENABLE_CMD 0x06
#define M... | /content/code_sandbox/samples/drivers/spi_fujitsu_fram/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,680 |
```restructuredtext
.. zephyr:code-sample:: sx1509b
:name: SX1509B RGB LED
:relevant-api: led_interface
Control an RGB LED connected to an SX1509B driver chip.
Overview
********
This sample controls the intensity of the color LEDs in a Thingy:52 lightwell.
The red, green and blue LED fade up one by one, and... | /content/code_sandbox/samples/drivers/led_sx1509b_intensity/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 169 |
```unknown
#
#
#
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_MODE_MINIMAL=n
CONFIG_I2C=y
``` | /content/code_sandbox/samples/drivers/led_sx1509b_intensity/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 29 |
```yaml
#
#
#
sample:
description: Demonstration of the SX1509B LED driver intensity functionality
name: SX1509B intensity sample
tests:
sample.drivers.led.sx1509b_intensity:
platform_allow: thingy52/nrf52832
tags: LED
depends_on: i2c
``` | /content/code_sandbox/samples/drivers/led_sx1509b_intensity/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 72 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/gpio/gpio_sx1509b.h>
#define NUMBER_OF_LEDS 3
#define GREEN_LED DT_GPIO_PIN(DT_NODELABEL(led0), gpios)
#define BLUE_LED DT_GPIO_PIN(DT_NODELABEL(led1), gpios)
#define RED_LED DT_GPIO_PIN(DT_N... | /content/code_sandbox/samples/drivers/led_sx1509b_intensity/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 669 |
```unknown
*
*/
&sx1509b {
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/led_sx1509b_intensity/boards/thingy52_nrf52832.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 15 |
```restructuredtext
.. zephyr:code-sample:: auxdisplay
:name: Auxiliary display
:relevant-api: auxdisplay_interface
Output "Hello World" to an auxiliary display.
Overview
********
This sample shows how to use the :ref:`auxiliary display driver <auxdisplay_api>`
by outputting a sample "Hello World" text to ... | /content/code_sandbox/samples/drivers/auxdisplay/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 232 |
```unknown
CONFIG_AUXDISPLAY=y
CONFIG_LOG=y
``` | /content/code_sandbox/samples/drivers/auxdisplay/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 10 |
```yaml
sample:
description: Demonstration of auxdisplay driver
name: Auxiliary display sample
tests:
sample.drivers.auxdisplay:
tags: auxdisplay
harness_config:
fixture: fixture_auxdisplay
platform_allow: nucleo_f746zg
integration_platforms:
- nucleo_f746zg
``` | /content/code_sandbox/samples/drivers/auxdisplay/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 72 |
```c
/*
*
*/
#include <string.h>
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/auxdisplay.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(auxdisplay_sample, LOG_LEVEL_DBG);
int main(void)
{
int rc;
const struct device *const dev = DEVICE_DT_GET(DT_NODELABEL(auxdisplay_0));... | /content/code_sandbox/samples/drivers/auxdisplay/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 210 |
```unknown
/*
* Character HD44780 module driven by the PCF8574 gpio.
*/
&i2c0 {
aux_display_gpio: pcf8574@27 {
compatible = "nxp,pcf857x";
reg = <0x27>;
gpio-controller;
ngpios = <8>;
#gpio-cells = <2>;
};
};
/ {
auxdisplay_0: hd44780 {
compatible = "hit,hd44780";
columns = <16>;
rows = <2>;
mo... | /content/code_sandbox/samples/drivers/auxdisplay/boards/esp_wrover_kit.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 312 |
```unknown
/*
*/
#include <freq.h>
&spi2 {
cs-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
auxdisplay_0: auxdisplay@0 {
reg = <0>;
spi-max-frequency = <DT_FREQ_M(1)>;
compatible = "ptc,pt6314";
status = "okay";
columns = <20>;
rows = <2>;
};
};
``` | /content/code_sandbox/samples/drivers/auxdisplay/boards/esp32c3_devkitm.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 90 |
```unknown
/*
*
*/
/ {
auxdisplay_0: auxdisplay {
compatible = "hit,hd44780";
status = "okay";
columns = <20>;
rows = <4>;
mode = <4>;
register-select-gpios = <&gpiob 8 (GPIO_ACTIVE_HIGH)>;
enable-gpios = <&gpiob 9 (GPIO_ACTIVE_HIGH)>;
data-bus-gpios = <0>, <0>, <0>, <0>,
<&gpioa 5 (GPIO_ACTIVE... | /content/code_sandbox/samples/drivers/auxdisplay/boards/nucleo_f746zg.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 170 |
```restructuredtext
.. zephyr:code-sample:: drv2605
:name: DRV2605 Haptic Driver
:relevant-api: haptics_interface
Drive an LRA using the DRV2605 haptic driver chip.
Overview
********
This sample demonstrates how to configure a ROM playback event on the DRV2605 and executes playback
of a tapping rhythmic pat... | /content/code_sandbox/samples/drivers/haptics/drv2605/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 281 |
```unknown
CONFIG_LOG=y
CONFIG_HAPTICS=y
``` | /content/code_sandbox/samples/drivers/haptics/drv2605/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 11 |
```c
/*
*
*/
#include <errno.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/drivers/haptics.h>
#include <zephyr/drivers/haptics/drv2605.h>
#include <zephyr/sys/util.h>
#include <sys/_stdint.h>
#define LOG_LEVEL 4
LOG_MODULE_... | /content/code_sandbox/samples/drivers/haptics/drv2605/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 462 |
```unknown
/*
*
*/
#include <zephyr/dt-bindings/i2c/i2c.h>
&arduino_i2c {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
haptic: drv2605@5a {
compatible = "ti,drv2605";
reg = <0x5a>;
status = "okay";
actuator-mode = "LRA";
loop-gain = "HIGH";
feedback-brake-factor = "2X";
};
};
``` | /content/code_sandbox/samples/drivers/haptics/drv2605/boards/nucleo_f401re.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 111 |
```restructuredtext
.. zephyr:code-sample:: lp3943
:name: LP3943 RGBW LED
:relevant-api: led_interface
Control up to 16 RGBW LEDs connected to an LP3943 driver chip.
Overview
********
This sample controls 16 LEDs connected to an LP3943 driver, in
a continuous pattern of turning them on one at a time (at a o... | /content/code_sandbox/samples/drivers/led_lp3943/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 335 |
```unknown
CONFIG_LOG=y
CONFIG_LED=y
``` | /content/code_sandbox/samples/drivers/led_lp3943/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 9 |
```yaml
sample:
description: Demonstration of the LP3943 LED driver
name: LP3943 sample
tests:
sample.drivers.led.lp3943:
platform_allow:
- 96b_neonkey
- 96b_argonkey
integration_platforms:
- 96b_argonkey
tags: LED
``` | /content/code_sandbox/samples/drivers/led_lp3943/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 77 |
```c
/*
*
*/
#include <zephyr/device.h>
#include <errno.h>
#include <zephyr/drivers/led.h>
#include <zephyr/sys/util.h>
#include <zephyr/kernel.h>
#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(app);
#define NUM_LEDS 16
#define DELAY_TIME K_MSEC(1000)
int main(void... | /content/code_sandbox/samples/drivers/led_lp3943/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 384 |
```unknown
&i2c3 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
};
``` | /content/code_sandbox/samples/drivers/led_lp3943/boards/96b_neonkey.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 25 |
```restructuredtext
.. zephyr:code-sample:: alarm
:name: Counter Alarm
:relevant-api: counter_interface
Implement an alarm application using the counter API.
Overview
********
This sample provides an example of alarm application using :ref:`counter API <counter_api>`.
It sets an alarm with an initial delay o... | /content/code_sandbox/samples/drivers/counter/alarm/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 315 |
```unknown
# Config for counter alarm sample
config COUNTER_SAM0_TC32
bool
default y if BOARD_ATSAMD20_XPRO
source "Kconfig.zephyr"
``` | /content/code_sandbox/samples/drivers/counter/alarm/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 38 |
```unknown
CONFIG_PRINTK=y
CONFIG_COUNTER=y
``` | /content/code_sandbox/samples/drivers/counter/alarm/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 10 |
```yaml
sample:
name: Counter RTC Driver Sample
common:
tags:
- drivers
- counter
harness: console
harness_config:
type: multi_line
ordered: true
regex:
- "Counter alarm sample"
- "Set alarm in 2 sec"
- "!!! Alarm !!!"
- "Now: [2|3]"
depends_on: counter
tests:
sam... | /content/code_sandbox/samples/drivers/counter/alarm/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 495 |
```unknown
&timer0 {
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/socs/esp32c3.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 11 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/counter.h>
#include <zephyr/sys/printk.h>
#define DELAY 2000000
#define ALARM_CHANNEL_ID 0
struct counter_alarm_cfg alarm_cfg;
#if defined(CONFIG_BOARD_SAMD20_XPRO)
#define TIMER DT_NODELABEL(tc4)
#elif defined(CONFIG_SOC... | /content/code_sandbox/samples/drivers/counter/alarm/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 942 |
```unknown
&timer0 {
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/esp32_devkitc_wroom_procpu.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 11 |
```unknown
/*
*
* an affiliate of Cypress Semiconductor Corporation
*/
counter0_0: &counter0_0 {
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/cy8cproto_063_ble.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 29 |
```unknown
# Enable RTC
CONFIG_I2C=y
CONFIG_COUNTER=y
CONFIG_COUNTER_MICROCHIP_MCP7940N=y
CONFIG_COUNTER_INIT_PRIORITY=65
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/bl5340_dvk_nrf5340_cpuapp.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 34 |
```unknown
/*
*
*/
&timer0 {
status = "okay";
prescaler = <49999>;
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/gd32f450z_eval.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 22 |
```unknown
&tc0 {
clk = <4>;
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/sam_v71_xult_samv71q21.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 17 |
```unknown
/*
*
*/
&timer0 {
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/intel_socfpga_agilex_socdk.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 14 |
```unknown
&tc0 {
clk = <4>;
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/sam4e_xpro.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 17 |
```unknown
/*
*
*/
&timer0 {
status = "okay";
prescaler = <49999>;
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/gd32f450v_start.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 22 |
```unknown
&timer0 {
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/esp32s3_luatos_core_procpu.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 11 |
```unknown
&tc0 {
clk = <4>;
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/sam_e70_xplained_same70q21.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 17 |
```unknown
&tc0 {
clk = <4>;
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/sam_v71_xult_samv71q21b.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 17 |
```unknown
&rtc0 {
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/nrf52840dk_nrf52840.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 11 |
```unknown
&timer0 {
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/esp32s3_luatos_core_procpu_usb.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 11 |
```unknown
&rtc0 {
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/nrf51dk_nrf51822.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 11 |
```unknown
/*
*
*/
&timer0 {
status = "okay";
prescaler = <59999>;
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/gd32f470i_eval.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 22 |
```unknown
#
#
#
CONFIG_BUILD_WITH_TFM=y
CONFIG_TFM_PROFILE_TYPE_MEDIUM=y
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/stm32l562e_dk_stm32l562xx_ns.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 19 |
```unknown
&timer0 {
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/esp32s2_saola.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 11 |
```unknown
/*
*
*/
&timer0 {
status = "okay";
prescaler = <41999>;
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/gd32f407v_start.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 22 |
```unknown
/*
*
*/
&timer0 {
status = "okay";
prescaler = <26999>;
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/gd32f350r_eval.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 22 |
```unknown
/*
*
*/
&stm0 {
prescaler = <1>;
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/s32z2xxdc2_s32z270_rtu0.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 21 |
```unknown
/*
*
*/
&stm0 {
prescaler = <1>;
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/s32z2xxdc2_s32z270_rtu1.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 21 |
```unknown
/*
*
*/
&timer0 {
status = "okay";
prescaler = <44999>;
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/gd32e507v_start.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 22 |
```unknown
&rtc0 {
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/nrf9160dk_nrf9160.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 11 |
```unknown
/*
*
*/
&stm0 {
prescaler = <1>;
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/mr_canhubk3.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 21 |
```unknown
&timers2 {
st,prescaler = <83>;
counter {
status = "okay";
};
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/stm32h735g_disco.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 25 |
```unknown
&timer0 {
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/yd_esp32_procpu.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 11 |
```unknown
&timer3 {
clock-src = <&lp_clk>;
prescaler = <1>;
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/da1469x_dk_pro.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 26 |
```unknown
/*
*
*/
&timer0 {
status = "okay";
prescaler = <49999>;
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/gd32f450i_eval.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 22 |
```unknown
&timer0 {
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/esp32s3_devkitm_procpu.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 11 |
```unknown
/*
*
*/
&i2c1 {
/* Connect MCP7940N MFP pin TP9 to P0.04 */
extrtc0: mcp7940n@6f {
int-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
};
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/bl5340_dvk_nrf5340_cpuapp.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 60 |
```unknown
/*
*
*/
&timer0 {
status = "okay";
prescaler = <29999>;
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/gd32e103v_eval.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 22 |
```unknown
&tc0 {
clk = <4>;
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/sam_e70_xplained_same70q21b.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 17 |
```unknown
&rtc0 {
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/nrf52dk_nrf52832.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 11 |
```unknown
&tc0 {
clk = <4>;
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/arduino_due.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 17 |
```unknown
/*
*
*/
&timer0 {
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/intel_socfpga_agilex5_socdk.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 14 |
```unknown
&tc0 {
clk = <4>;
status = "okay";
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/sam4s_xplained.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 17 |
```unknown
/*
*
*/
&timer0 {
status = "okay";
prescaler = <41999>;
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/gd32f403z_eval.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 22 |
```unknown
/*
*
*/
&timer0 {
status = "okay";
prescaler = <44999>;
};
``` | /content/code_sandbox/samples/drivers/counter/alarm/boards/gd32e507z_eval.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 22 |
```restructuredtext
.. zephyr:code-sample:: ds3231
:name: DS3231 TCXO RTC
:relevant-api: counter_interface
Interact with a DS3231 real-time clock using the counter API and dedicated driver API.
Overview
********
The `DS3231`_ temperature-compensated real-time clock is a
high-precision (2 ppm) battery backed... | /content/code_sandbox/samples/drivers/counter/maxim_ds3231/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,650 |
```unknown
#
#
config APP_SET_ALIGNED_CLOCK
bool "Option to align RTC with time-since-boot"
help
If enabled this reads the RTC then sets it so that uptime
shows as being relative to the start of the next hour.
source "Kconfig"
``` | /content/code_sandbox/samples/drivers/counter/maxim_ds3231/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 56 |
```unknown
CONFIG_PRINTK=y
CONFIG_I2C=y
CONFIG_COUNTER=y
CONFIG_COUNTER_MAXIM_DS3231=y
CONFIG_COUNTER_INIT_PRIORITY=65
# Minimal libc doesn't have strftime()
CONFIG_REQUIRES_FULL_LIBC=y
# Optional step that syncs RTC and local clock. Don't enable this if
# your RTC has already been synchronized and you want to keep... | /content/code_sandbox/samples/drivers/counter/maxim_ds3231/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 104 |
```yaml
common:
filter: CONFIG_FULL_LIBC_SUPPORTED
sample:
name: Maxim DS3231 RTC
tests:
sample.basic.maxim_ds3231:
build_only: true
platform_allow:
- sltb004a
- frdm_k64f
- nrf51dk/nrf51822
- nucleo_l476rg
- particle_xenon
integration_platforms:
- sltb004a
``` | /content/code_sandbox/samples/drivers/counter/maxim_ds3231/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 97 |
```c
/*
*
*/
#include <stdio.h>
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/counter.h>
#include <zephyr/sys/printk.h>
#include <zephyr/drivers/rtc/maxim_ds3231.h>
/* Format times as: YYYY-MM-DD HH:MM:SS DOW DOY */
static const char *format_time(time_t time,
long nsec)
{... | /content/code_sandbox/samples/drivers/counter/maxim_ds3231/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,026 |
```unknown
/*
*
*/
&i2c0 { /* SDA H16=PC10, SCL H15=PC11, ISW H13=PF6 */
status = "okay";
ds3231: ds3231@68 {
compatible = "maxim,ds3231";
reg = <0x68>;
isw-gpios = <&gpiof 6 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
};
};
``` | /content/code_sandbox/samples/drivers/counter/maxim_ds3231/boards/sltb004a.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 95 |
```unknown
/*
*
*/
&i2c1 { /* SDA CN5.9=PB9, SCL CN5.10=PB8, ISW CN5.1=D8=PA9 */
status = "okay";
ds3231: ds3231@68 {
compatible = "maxim,ds3231";
reg = <0x68>;
isw-gpios = <&gpioa 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
};
};
``` | /content/code_sandbox/samples/drivers/counter/maxim_ds3231/boards/nucleo_l476rg.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 103 |
```unknown
/*
*
*/
&i2c0 { /* SDA P0.26, SCL P0.27 */
status = "okay";
ds3231: ds3231@68 {
compatible = "maxim,ds3231";
reg = <0x68>;
isw-gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
};
};
``` | /content/code_sandbox/samples/drivers/counter/maxim_ds3231/boards/nrf52840dk_nrf52840.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 85 |
```unknown
/*
*
*/
&i2c0 { /* SDA 30, SCL 7 */
status = "okay";
ds3231: ds3231@68 {
compatible = "maxim,ds3231";
reg = <0x68>;
isw-gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
};
};
``` | /content/code_sandbox/samples/drivers/counter/maxim_ds3231/boards/nrf51dk_nrf51822.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 81 |
```unknown
/*
*
*/
&i2c0 { /* SDA P0.26, SCL P0.27, ISW P1.1, 32K P1.2 */
status = "okay";
ds3231: ds3231@68 {
compatible = "maxim,ds3231";
reg = <0x68>;
isw-gpios = <&gpio1 1 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
32k-gpios = <&gpio1 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
};
};
``` | /content/code_sandbox/samples/drivers/counter/maxim_ds3231/boards/particle_xenon.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 123 |
```unknown
/*
*
*/
&i2c0 { /* SDA PTE25, SCL PTE24, ISW PTE26 */
status = "okay";
ds3231: ds3231@68 {
compatible = "maxim,ds3231";
reg = <0x68>;
isw-gpios = <&gpioe 26 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
};
};
``` | /content/code_sandbox/samples/drivers/counter/maxim_ds3231/boards/frdm_k64f.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 89 |
```unknown
CONFIG_GPIO=y
``` | /content/code_sandbox/samples/drivers/led_apa102c_bitbang/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 5 |
```yaml
sample:
name: Utilize APA102C LED
tests:
sample.drivers.led.apa102c_bitbang:
tags: LED
filter: dt_alias_exists("gpio-0")
depends_on: gpio
``` | /content/code_sandbox/samples/drivers/led_apa102c_bitbang/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 50 |
```c
/*
*
*/
/**
* @file Sample app to utilize APA102C LED.
*
* The APA102/C requires 5V data and clock signals, so logic
* level shifter (preferred) or pull-up resistors are needed.
* Make sure the pins are 5V tolerant if using pull-up
* resistors.
*
* WARNING: the APA102C are very bright even at low settin... | /content/code_sandbox/samples/drivers/led_apa102c_bitbang/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 708 |
```restructuredtext
.. zephyr:code-sample:: led-xec
:name: Breathing-blinking LED (BBLED)
:relevant-api: led_interface
Control a BBLED (Breathing-Blinking LED) using Microchip XEC driver.
Overview
********
This sample allows to test the Microchip led-xec driver which uses the
breathing-blinking LED (BBLED) ... | /content/code_sandbox/samples/drivers/led_xec/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 847 |
```unknown
CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y
CONFIG_LED=y
``` | /content/code_sandbox/samples/drivers/led_xec/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 16 |
```yaml
sample:
description: Demonstration of the Microchip XEC LED driver
name: XEC LED sample
tests:
sample.drivers.led.led_xec:
build_only: true
tags: LED
platform_allow:
- mec172xevb_assy6906
- mec15xxevb_assy6853
``` | /content/code_sandbox/samples/drivers/led_xec/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 77 |
```c
/*
*
*/
#include <errno.h>
#include <soc.h>
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/led.h>
#include <zephyr/logging/log_ctrl.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/sys_io.h>
LOG_MODULE_DECLARE(led, CONFIG_LED_LOG_LEVEL);
#define K_WAIT_DELAY 100u... | /content/code_sandbox/samples/drivers/led_xec/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 915 |
```c
/*
*
*/
#include <stdint.h>
uint32_t axFPGABitStream[] = {
0x00002808, 0x00000468, 0x00004452, 0x00009014, 0x00004924,
0x00000a29, 0x0000800a, 0x00001012, 0x00005514, 0x00004385,
0x00000289, 0x0000c82a, 0x00008402, 0x00000104, 0x000003c5,
0x000002b1, 0x00008002, 0x0000840a, 0x00001550, 0x00001301,
0x00000... | /content/code_sandbox/samples/boards/qomu/src/usb2serial_bit.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 139,004 |
```unknown
/*
*
*/
&bbled0 {
compatible = "microchip,xec-bbled";
pinctrl-0 = <&led0_gpio156>;
pinctrl-names = "default";
status = "okay";
};
&bbled1 {
compatible = "microchip,xec-bbled";
pinctrl-0 = <&led1_gpio157>;
pinctrl-names = "default";
status = "okay";
};
&bbled2 {
compatible = "microchip,xec-bbled... | /content/code_sandbox/samples/drivers/led_xec/boards/mec172xevb_assy6906.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 176 |
```unknown
/*
*
*/
&bbled0 {
compatible = "microchip,xec-bbled";
pinctrl-0 = <&led0_gpio156>;
pinctrl-names = "default";
status = "okay";
};
&bbled1 {
compatible = "microchip,xec-bbled";
pinctrl-0 = <&led1_gpio157>;
pinctrl-names = "default";
status = "okay";
};
&bbled2 {
compatible = "microchip,xec-bbled... | /content/code_sandbox/samples/drivers/led_xec/boards/mec15xxevb_assy6853.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 133 |
```unknown
CONFIG_HEAP_MEM_POOL_SIZE=16777216
CONFIG_LOG=y
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_LOG_BACKEND_UART=y
CONFIG_ETHERNET_LOG_LEVEL_INF=y
CONFIG_IVSHMEM_LOG_LEVEL_INF=y
CONFIG_NETWORKING=y
CONFIG_NET_L2_ETHERNET=y
CONFIG_ETH_IVSHMEM=y
CONFIG_NET_STATISTICS=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_TCP=y
CONFIG_NET_IP... | /content/code_sandbox/samples/drivers/ethernet/eth_ivshmem/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 240 |
```yaml
sample:
name: Inter-VM Shared Memory (ivshmem) Ethernet
tests:
sample.drivers.ethernet.eth_ivshmem:
platform_allow: qemu_cortex_a53
tags: drivers ethernet
build_only: true
``` | /content/code_sandbox/samples/drivers/ethernet/eth_ivshmem/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 53 |
```c
/*
*
*/
#include <zephyr/kernel.h>
int main(void)
{
/* This sample uses the shell */
k_sleep(K_FOREVER);
return 0;
}
``` | /content/code_sandbox/samples/drivers/ethernet/eth_ivshmem/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 36 |
```unknown
# Jailhouse requires ARMv8-A non-secure mode
CONFIG_ARMV8_A_NS=y
# QEMU PCI requires at least 256M of virtual space
CONFIG_KERNEL_VM_SIZE=0x80000000
# QEMU PCI requires physical addresses with more than 32 bits
CONFIG_ARM64_VA_BITS_40=y
CONFIG_ARM64_PA_BITS_40=y
# PCIe config
CONFIG_PCIE_CONTROLLER=y
CONF... | /content/code_sandbox/samples/drivers/ethernet/eth_ivshmem/boards/qemu_cortex_a53.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 129 |
```unknown
/*
*
*/
/ {
soc {
/delete-node/ memory@40000000;
sram0: memory@70000000 {
compatible = "mmio-sram";
reg = <0x0 0x70000000 0x0 DT_SIZE_M(128)>;
};
/delete-node/ pcie@4010000000;
pcie: pcie@8e00000 {
compatible = "pci-host-ecam-generic";
device_type = "pci";
reg = <0x00 0x08e000... | /content/code_sandbox/samples/drivers/ethernet/eth_ivshmem/boards/qemu_cortex_a53.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 626 |
```unknown
CONFIG_I2C=y
``` | /content/code_sandbox/samples/drivers/lcd_cyclonev_socdk/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 7 |
```restructuredtext
.. zephyr:code-sample:: eth-ivshmem
:name: Inter-VM Shared Memory (ivshmem) Ethernet
:relevant-api: ivshmem ethernet
Communicate with another "cell" in the Jailhouse hypervisor using IVSHMEM Ethernet.
Overview
********
This application demonstrates how to use IVSHMEM Ethernet to communic... | /content/code_sandbox/samples/drivers/ethernet/eth_ivshmem/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,367 |
```yaml
sample:
description: Cyclone V Soc Devkit LCD sample
name: lcd_cyclonev_socdk
common:
tags: introduction
harness: console
harness_config:
type: one_line
regex:
- "Hello World! (.*)"
tests:
sample.lcd_cyclonev_socdk.helloworld:
platform_allow: cyclonev_socdk
tags: introduction
... | /content/code_sandbox/samples/drivers/lcd_cyclonev_socdk/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 90 |
```c
/*
* Description:
* Example to use LCD Display in Cyclone V SoC FPGA devkit
*/
#include <zephyr/sys/printk.h>
#include <stdio.h>
#include <string.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/kernel.h>
#include "commands.h"
#define I2C_INST DT_NODELABEL(i2c0)
#define LCD_ADDRESS 0x28
const struct device... | /content/code_sandbox/samples/drivers/lcd_cyclonev_socdk/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 561 |
```objective-c
/*
* Description:
* Example to use LCD disply in Cyclone V SoC DevKit
* Reference: path_to_url
*/
/* Insert Prefix 0xFE before executing command */
#define DISPLAY_ON 0x41
#define DISPLAY_OFF 0x42
#define SET_CURSOR 0x45 /*1 byte param in range (0x00 - 0x4F) 2x16 display */
#define CURSOR_HOME 0x46
... | /content/code_sandbox/samples/drivers/lcd_cyclonev_socdk/src/commands.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 788 |
```restructuredtext
.. zephyr:code-sample:: ht16k33
:name: HT16K33 LED driver with keyscan
:relevant-api: led_interface kscan_interface
Control up to 128 LEDs connected to an HT16K33 LED driver and log keyscan events.
Overview
********
This sample controls the LEDs connected to a `Holtek HT16K33`_
driver. T... | /content/code_sandbox/samples/drivers/ht16k33/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 347 |
```unknown
CONFIG_LOG=y
CONFIG_I2C=y
CONFIG_LED=y
CONFIG_KSCAN=y
CONFIG_INPUT=y
CONFIG_HT16K33_KEYSCAN=y
``` | /content/code_sandbox/samples/drivers/ht16k33/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 33 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.