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:
description: Sample application to test ESP32 light-sleep mode
name: ESP32 Light-sleep
tests:
sample.board.esp32.light_sleep:
platform_allow:
- esp32_devkitc_wroom/esp32/procpu
- esp32c3_devkitm
tags: esp32
build_only: true
``` | /content/code_sandbox/samples/boards/esp32/light_sleep/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 77 |
```restructuredtext
.. _esp32-light-sleep-sample:
ESP32 Light Sleep demo
######################
Overview
********
This example illustrates usage of light sleep mode. Unlike deep sleep mode,
light sleep preserves the state of the memory, CPU, and peripherals. Execution
of code on both CPUs is stopped when esp_light_s... | /content/code_sandbox/samples/boards/esp32/light_sleep/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 607 |
```unknown
#
mainmenu "numaker SYSTEM_OFF demo"
source "Kconfig.zephyr"
``` | /content/code_sandbox/samples/boards/numaker/system_off/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 19 |
```unknown
CONFIG_POWEROFF=y
CONFIG_RTC=y
CONFIG_RTC_ALARM=y
``` | /content/code_sandbox/samples/boards/numaker/system_off/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 17 |
```c
/*
*
*/
#include <stdio.h>
#include <time.h>
#include <zephyr/kernel.h>
#include <zephyr/drivers/rtc.h>
#include <zephyr/sys/poweroff.h>
/* Fri Jan 01 2021 13:29:50 GMT+0000 */
#define RTC_TEST_ALARM_SET_TIME 1609507790
#define RTC_TEST_ALARM_TIME_MINUTE 30
#define RTC_TEST_ALARM_TIME_HOUR 1... | /content/code_sandbox/samples/boards/numaker/system_off/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 453 |
```unknown
/*
*
*/
/ {
chosen {
zephyr,console = &cdc_acm_uart0;
};
};
&zephyr_udc0 {
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
};
};
``` | /content/code_sandbox/samples/boards/sensortile_box/app.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 66 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/pm/pm.h>
#include <zephyr/pm/device.h>
#include <zephyr/pm/policy.h>
#include <zephyr/drivers/gpio.h>
#include <esp_sleep.h>
#include <driver/gpio.h>
/* Most development boards have "boot" button attached to GPIO0.
* You can also change this to another pin.
... | /content/code_sandbox/samples/boards/esp32/light_sleep/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 695 |
```unknown
CONFIG_LOG=y
CONFIG_PRINTK=y
CONFIG_SPI=y
CONFIG_I2C=y
CONFIG_GPIO=y
# config sensors
CONFIG_SENSOR=y
CONFIG_SENSOR_LOG_LEVEL_DBG=y
CONFIG_HTS221_TRIGGER_NONE=y
CONFIG_LPS22HH_TRIGGER_OWN_THREAD=y
CONFIG_LIS2DW12_TRIGGER_OWN_THREAD=y
CONFIG_LSM6DSO_TRIGGER_OWN_THREAD=y
CONFIG_LSM6DSO_ENABLE_TEMP=n
CONFIG_ST... | /content/code_sandbox/samples/boards/sensortile_box/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 209 |
```yaml
sample:
description: SensorTile.box board testing
name: SensorTile.box test
tests:
sample.board.sensortile_box.sensors:
harness: sensor
platform_allow: sensortile_box
tags: sensors
depends_on:
- i2c
- spi
- gpio
``` | /content/code_sandbox/samples/boards/sensortile_box/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 70 |
```restructuredtext
.. _sensortile_box sensors:
ST SensorTile.box
#################
Overview
********
This sample provides an example of how to read sensors data
from the SensorTile.box board.
This sample enables all sensors of SensorTile.box board, and then
periodically reads and displays data on the console from t... | /content/code_sandbox/samples/boards/sensortile_box/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 698 |
```restructuredtext
.. _google_twinkie_v2_pda:
Twinkie Power Delivery
######################
Overview
********
This provides access to :ref:`Twinkie <google_twinkie_v2_board>` so you can try out
the supported features.
Building and Running
********************
Build and flash Twinkie as follows:
.. zephyr-app-com... | /content/code_sandbox/samples/boards/google_twinkie_v2_pda/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 156 |
```unknown
CONFIG_ADC=y
CONFIG_ADC_STM32=y
CONFIG_GPIO=y
CONFIG_LED=y
``` | /content/code_sandbox/samples/boards/google_twinkie_v2_pda/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 20 |
```yaml
sample:
name: Twinkie V2 usb Vbus snooper
tests:
sample.board.google_twinkie_v2:
platform_allow: google_twinkie_v2
tags: usb
``` | /content/code_sandbox/samples/boards/google_twinkie_v2_pda/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 45 |
```c
/*
*
*/
#include <stdio.h>
#include <zephyr/kernel.h>
#include <zephyr/drivers/adc.h>
#include <zephyr/drivers/adc/voltage_divider.h>
#include <zephyr/drivers/adc/current_sense_amplifier.h>
/* The devicetree node identifier for the adc aliases. */
#define VBUS_V_MEAS_NODE DT_ALIAS(vbus)
#define VBUS_C_MEAS_NOD... | /content/code_sandbox/samples/boards/google_twinkie_v2_pda/src/meas.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 624 |
```objective-c
/*
*
*/
#ifndef __MEAS_H__
#define __MEAS_H__
/**
* @brief Initializes the measurement module, sets up all the adc channels through the device tree
* binding
*
* @return 0 on success
*/
int meas_init(void);
/**
* @brief Measure the voltage on VBUS
*
* @param v pointer where VBUS voltage, in ... | /content/code_sandbox/samples/boards/google_twinkie_v2_pda/src/meas.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 159 |
```c
/*
*
*/
#include <zephyr/device.h>
#include <zephyr/drivers/led.h>
#include <zephyr/kernel.h>
#include "meas.h"
enum led_color_t {
LED_RED,
LED_GREEN,
LED_BLUE,
};
static void set_led(const struct device *const led, enum led_color_t led_color)
{
if (led_color != LED_RED) {
led_off(led, LED_RED);
}
if... | /content/code_sandbox/samples/boards/google_twinkie_v2_pda/src/view.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 333 |
```restructuredtext
.. mec15xxevb_assy6853-samples:
MEC15xxEVB Reference Board Samples
##################################
.. toctree::
:maxdepth: 1
:glob:
**/*
``` | /content/code_sandbox/samples/boards/mec15xxevb_assy6853/mec15xxevb_assy6853.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 46 |
```restructuredtext
.. _mec15xxevb-sample:
MEC15xx sample board test application
#####################################
Overview
********
This sample demonstrates power management features on MEC15xx-based boards.
It showcase simple app that allows to enter into light and deep sleep.
Building and Running
***********... | /content/code_sandbox/samples/boards/mec15xxevb_assy6853/power_management/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 149 |
```unknown
/*
*
*/
#include <zephyr/dt-bindings/clock/mchp_xec_pcr.h>
/ {
};
&pcr {
status = "okay";
pll-32k-src = <MCHP_XEC_PLL_CLK32K_SRC_SIL_OSC>;
periph-32k-src = <MCHP_XEC_PERIPH_CLK32K_SRC_SO_SO>;
/* debug only, not using 32KHZ_IN pin */
pinctrl-0 = <&tst_clk_out_gpio060>;
pinctrl-names = "default";
}... | /content/code_sandbox/samples/boards/mec15xxevb_assy6853/power_management/mec15xxevb_assy6853.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 120 |
```unknown
# Enable config log
CONFIG_LOG=y
# Logging thread frequency higher than SUSPEND_TO_IDLE
CONFIG_LOG_PROCESS_THREAD_SLEEP_MS=2100
CONFIG_THREAD_NAME=y
# Enable test clock out in MEC1501 this will give indication in MCHP_060
# Enable additional drivers to evaluate power consumption without activity
CONFIG_PE... | /content/code_sandbox/samples/boards/mec15xxevb_assy6853/power_management/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 86 |
```yaml
sample:
name: MEC150x board sample power management tests
tests:
sample.board.mec15xxevb_assy6853.pm:
platform_allow: mec15xxevb_assy6853
tags:
- board
- pm
harness: console
harness_config:
type: multi_line
ordered: false
regex:
- "Wake from Light Sleep"... | /content/code_sandbox/samples/boards/mec15xxevb_assy6853/power_management/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 97 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/led.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/usb/usb_device.h>
#include <zephyr/drivers/uart.h>
#include <st... | /content/code_sandbox/samples/boards/sensortile_box/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 4,144 |
```c
/*
*
*/
#define LOG_LEVEL LOG_LEVEL_INF
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(mec15_brd_test);
#include "power_mgmt.h"
#define MAX_CYCLES 5ul
int main(void)
{
test_pwr_mgmt_singlethread(false, MAX_CYCLES);
test_pwr_mgmt_singlethread(true, MAX_CYCLES);
test_pwr_mgmt_multithread(false, MAX_CYC... | /content/code_sandbox/samples/boards/mec15xxevb_assy6853/power_management/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 109 |
```objective-c
/*
*
*/
#ifndef __TEST_PWRMGMT_H__
#define __TEST_PWRMGMT_H__
/** @brief Alternates between light and deep sleep cycles.
*
* For light sleep, the test sleeps in main thread for 500 ms longer than
* SUSPEND_TO_IDLE residency.
*
* Similarly for deep sleep, the test sleeps in the main thread for 5... | /content/code_sandbox/samples/boards/mec15xxevb_assy6853/power_management/src/power_mgmt.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 250 |
```unknown
&cpu0 {
clock-frequency = <47972352>;
};
&gpio {
status = "okay";
pin-secondary-config = <0x1d>;
};
``` | /content/code_sandbox/samples/boards/qomu/qomu.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 34 |
```restructuredtext
.. _qomu_usbserial:
Zephyr usbserial driver on Qomu
###############################
This sample demonstrates how to load bitstream on EOS-S3 FPGA and use the
usbserial driver.
Requirements
************
* Zephyr RTOS with printk enabled
* `QuickLogic Qomu board <path_to_url`_
Building
********
.... | /content/code_sandbox/samples/boards/qomu/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 261 |
```unknown
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=47972352
CONFIG_PRINTK=y
CONFIG_FPGA=y
CONFIG_EOS_S3_FPGA=y
CONFIG_BOOT_BANNER=n
``` | /content/code_sandbox/samples/boards/qomu/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 40 |
```c
/*
*
*/
#include <zephyr/zephyr.h>
#include <zephyr/device.h>
#include <zephyr/sys/printk.h>
#include <zephyr/drivers/fpga.h>
#include <stdio.h>
#include <eoss3_dev.h>
extern uint32_t axFPGABitStream[];
extern uint32_t axFPGABitStream_length;
int main(void)
{
const struct device *fpga = device_get_binding("f... | /content/code_sandbox/samples/boards/qomu/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 171 |
```c
/*
*
*/
#include <errno.h>
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <soc.h>
#include <zephyr/pm/pm.h>
#include <zephyr/logging/log.h>
#define LOG_LEVEL LOG_LEVEL_DBG
LOG_MODULE_REGISTER(pwrmgmt_test);
#define SLP_STATES_SUPPORTED 2ul
/* Thread properties */
#define TASK_STACK_SIZE ... | /content/code_sandbox/samples/boards/mec15xxevb_assy6853/power_management/src/power_mgmt.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,344 |
```restructuredtext
.. _shields-samples:
Shields Samples
###############
.. toctree::
:maxdepth: 1
:glob:
**/*
``` | /content/code_sandbox/samples/shields/shields.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 34 |
```restructuredtext
.. _shields-lmp90100_evb-samples:
LMP90100 Sensor AFE Evaluation Board Shield Samples
###################################################
.. toctree::
:maxdepth: 1
:glob:
**/*
``` | /content/code_sandbox/samples/shields/lmp90100_evb/lmp90100_evb.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 48 |
```unknown
/*
*
*/
/ {
zephyr,user {
io-channels = <&lmp90100_lmp90100_evb 0>;
};
};
&lmp90100_lmp90100_evb {
#address-cells = <1>;
#size-cells = <0>;
rtd-current = <1000>;
channel@0 {
reg = <0>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_EXTERNAL1";
zephyr,acquisition-time = <ADC_ACQ... | /content/code_sandbox/samples/shields/lmp90100_evb/rtd/app.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 174 |
```restructuredtext
.. _lmp90100_evb_rtd_sample:
LMP90100 Sensor AFE Evaluation Board: RTD Sample
################################################
Overview
********
This sample is provided as an example of how to read the temperature
of a Resistance Temperature Detector (RTD) sensor using the LMP90100
Sensor AFE Eva... | /content/code_sandbox/samples/shields/lmp90100_evb/rtd/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 376 |
```unknown
CONFIG_LOG=y
CONFIG_ADC=y
CONFIG_CBPRINTF_FP_SUPPORT=y
``` | /content/code_sandbox/samples/shields/lmp90100_evb/rtd/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 LMP90100 EVB with RTD sensor
name: LMP90100 EVB RTD
tests:
sample.shields.lmp90100_evb.rtd:
platform_allow: frdm_k64f
harness: shield
tags: shield
depends_on: arduino_spi
``` | /content/code_sandbox/samples/shields/lmp90100_evb/rtd/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 76 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/adc.h>
#include <stdio.h>
#include <math.h>
#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(main);
/* Nominal RTD (PT100) resistance in ohms */
#define RTD_NOMINAL_RESISTANCE 1... | /content/code_sandbox/samples/shields/lmp90100_evb/rtd/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 542 |
```restructuredtext
.. zephyr:code-sample:: x-nucleo-iks02a1-std
:name: X-NUCLEO-IKS02A1 shield - Standard (Mode 1)
:relevant-api: sensor_interface
Interact with all the sensors of an X-NUCLEO-IKS02A1 shield using Standard mode.
Overview
********
This sample is provided as an example to test the X-NUCLEO-IKS... | /content/code_sandbox/samples/shields/x_nucleo_iks02a1/standard/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 750 |
```unknown
CONFIG_LOG=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_SENSOR_LOG_LEVEL_DBG=y
CONFIG_IIS2DLPC_TRIGGER_OWN_THREAD=y
CONFIG_IIS2MDC_TRIGGER_NONE=y
CONFIG_ISM330DHCX_TRIGGER_OWN_THREAD=y
CONFIG_CBPRINTF_FP_SUPPORT=y
``` | /content/code_sandbox/samples/shields/x_nucleo_iks02a1/standard/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 70 |
```yaml
sample:
name: X-NUCLEO-IKS02A1 sensor shield
common:
min_ram: 16
tests:
sample.shields.x_nucleo_iks02a1.standard:
harness: shield
tags: shield
depends_on:
- arduino_i2c
- arduino_gpio
platform_exclude:
- disco_l475_iot1
- lpcxpresso55s16
- stm32mp157c_dk2
... | /content/code_sandbox/samples/shields/x_nucleo_iks02a1/standard/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 133 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/sensor.h>
#include <stdio.h>
#include <zephyr/sys/util.h>
#ifdef CONFIG_IIS2DLPC_TRIGGER
static int iis2dlpc_trig_cnt;
static void iis2dlpc_trigger_handler(const struct device *dev,
const struct sensor_trigger *tri... | /content/code_sandbox/samples/shields/x_nucleo_iks02a1/standard/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,286 |
```restructuredtext
.. zephyr:code-sample:: x-nucleo-iks02a1-shub
:name: X-NUCLEO-IKS02A1 shield - SensorHub (Mode 2)
:relevant-api: sensor_interface
Interact with all the sensors of an X-NUCLEO-IKS02A1 shield using Sensor Hub mode.
Overview
********
This sample is provided as an example to test the X-NUCLEO... | /content/code_sandbox/samples/shields/x_nucleo_iks02a1/sensorhub/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 791 |
```unknown
CONFIG_LOG=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_SENSOR_LOG_LEVEL_DBG=y
CONFIG_IIS2DLPC_TRIGGER_OWN_THREAD=y
CONFIG_ISM330DHCX_TRIGGER_OWN_THREAD=y
CONFIG_ISM330DHCX_SENSORHUB=y
CONFIG_ISM330DHCX_EXT_IIS2MDC=y
CONFIG_CBPRINTF_FP_SUPPORT=y
``` | /content/code_sandbox/samples/shields/x_nucleo_iks02a1/sensorhub/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 87 |
```yaml
sample:
name: X-NUCLEO-IKS02A1 sensor shield
tests:
sample.shields.x_nucleo_iks02a1.sensorhub:
harness: shield
tags: shield
depends_on:
- arduino_i2c
- arduino_gpio
platform_exclude:
- disco_l475_iot1
- lpcxpresso55s16
- stm32mp157c_dk2
- pan1781_evb
... | /content/code_sandbox/samples/shields/x_nucleo_iks02a1/sensorhub/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 125 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/sensor.h>
#include <stdio.h>
#include <zephyr/sys/util.h>
#ifdef CONFIG_IIS2DLPC_TRIGGER
static int iis2dlpc_trig_cnt;
static void iis2dlpc_trigger_handler(const struct device *dev,
const struct sensor_trigger *tri... | /content/code_sandbox/samples/shields/x_nucleo_iks02a1/sensorhub/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,194 |
```restructuredtext
.. zephyr:code-sample:: x-nucleo-iks02a1-mic
:name: X-NUCLEO-IKS02A1 shield - MEMS microphone
:relevant-api: audio_dmic_interface
Acquire audio using the digital MEMS microphone on X-NUCLEO-IKS02A1 shield.
Overview
********
This sample enables the digital MEMS microphone on X-NUCLEO-IKS02... | /content/code_sandbox/samples/shields/x_nucleo_iks02a1/microphone/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,448 |
```unknown
CONFIG_LOG=n
CONFIG_BOOT_BANNER=n
CONFIG_STDOUT_CONSOLE=y
CONFIG_PRINTK=y
CONFIG_I2S=y
CONFIG_GPIO=y
CONFIG_AUDIO=y
CONFIG_AUDIO_DMIC=y
``` | /content/code_sandbox/samples/shields/x_nucleo_iks02a1/microphone/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 42 |
```yaml
sample:
name: X-NUCLEO-IKS02A1 sensor shield
tests:
sample.shields.x_nucleo_iks02a1.microphone:
harness: shield
tags: shield
depends_on: arduino_i2s
``` | /content/code_sandbox/samples/shields/x_nucleo_iks02a1/microphone/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 57 |
```c
/*
*
*/
#include <string.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/audio/dmic.h>
/* uncomment if you want PCM output in ascii */
/*#define PCM_OUTPUT_IN_ASCII 1 */
#define AUDIO_FREQ 16000
#define CHAN_SIZE 16
#define PCM_BLK_SIZE_MS ((AUDIO_FREQ/1000) * sizeof(int16_... | /content/code_sandbox/samples/shields/x_nucleo_iks02a1/microphone/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 747 |
```restructuredtext
.. zephyr:code-sample:: x-nucleo-iks01a2-std
:name: X-NUCLEO-IKS01A2 shield - Standard (Mode 1)
:relevant-api: sensor_interface
Interact with all the sensors of an X-NUCLEO-IKS01A2 shield using Standard Mode.
Overview
********
This sample enables all sensors of a X-NUCLEO-IKS01A2 shield, ... | /content/code_sandbox/samples/shields/x_nucleo_iks01a2/standard/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 684 |
```unknown
CONFIG_STDOUT_CONSOLE=y
CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_LSM6DSL_TRIGGER_OWN_THREAD=y
CONFIG_HTS221_TRIGGER_NONE=y
CONFIG_LIS2MDL_TRIGGER_NONE=y
CONFIG_CBPRINTF_FP_SUPPORT=y
``` | /content/code_sandbox/samples/shields/x_nucleo_iks01a2/standard/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 53 |
```yaml
sample:
name: X-NUCLEO-IKS01A2 sensor shield
tests:
sample.shields.x_nucleo_iks01a2.standard:
harness: shield
tags: shield
depends_on:
- arduino_i2c
- arduino_gpio
platform_exclude:
- disco_l475_iot1
- lpcxpresso55s16
- stm32mp157c_dk2
- mimxrt1010_evk
``... | /content/code_sandbox/samples/shields/x_nucleo_iks01a2/standard/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 108 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/sensor.h>
#include <stdio.h>
#include <zephyr/sys/util.h>
#ifdef CONFIG_LSM6DSL_TRIGGER
static int lsm6dsl_trig_cnt;
static void lsm6dsl_trigger_handler(const struct device *dev,
const struct sensor_trigger *trig)
{... | /content/code_sandbox/samples/shields/x_nucleo_iks01a2/standard/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,563 |
```restructuredtext
.. zephyr:code-sample:: x-nucleo-iks01a2-shub
:name: X-NUCLEO-IKS01A2 shield - SensorHub (Mode 2)
:relevant-api: sensor_interface
Interact with all the sensors of an X-NUCLEO-IKS01A2 shield using Sensor Hub mode.
Overview
********
This sample is provided as an example to test the X-NUCLEO... | /content/code_sandbox/samples/shields/x_nucleo_iks01a2/sensorhub/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 624 |
```unknown
CONFIG_LOG=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_SENSOR_LOG_LEVEL_DBG=y
CONFIG_LSM6DSL_TRIGGER_OWN_THREAD=y
# The LSM6DSL shub driver only permits one sensor
# connected at a time
CONFIG_LSM6DSL_SENSORHUB=y
CONFIG_LSM6DSL_EXT0_LPS22HB=n
CONFIG_LSM6DSL_EXT0_LIS2MDL=y
CONFIG_CBPRINTF_FP... | /content/code_sandbox/samples/shields/x_nucleo_iks01a2/sensorhub/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 102 |
```yaml
sample:
name: X-NUCLEO-IKS01A2 sensor shield
tests:
sample.shields.x_nucleo_iks01a2.sensorhub:
harness: shield
tags: shield
depends_on:
- arduino_i2c
- arduino_gpio
platform_exclude:
- disco_l475_iot1
- lpcxpresso55s16
- stm32mp157c_dk2
- mimxrt1010_evk
`... | /content/code_sandbox/samples/shields/x_nucleo_iks01a2/sensorhub/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 109 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/sensor.h>
#include <stdio.h>
#include <zephyr/sys/util.h>
#ifdef CONFIG_LSM6DSL_TRIGGER
static int lsm6dsl_trig_cnt;
static void lsm6dsl_trigger_handler(const struct device *dev,
const struct sensor_trigger *trig)
{... | /content/code_sandbox/samples/shields/x_nucleo_iks01a2/sensorhub/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,024 |
```restructuredtext
.. zephyr:code-sample:: x-nucleo-iks01a1
:name: X-NUCLEO-IKS01A1 shield
:relevant-api: sensor_interface
Interact with all the sensors of an X-NUCLEO-IKS01A1 shield.
Overview
********
This sample enables all sensors of a X-NUCLEO-IKS01A1 shield, and then
periodically reads and displays dat... | /content/code_sandbox/samples/shields/x_nucleo_iks01a1/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 513 |
```unknown
CONFIG_STDOUT_CONSOLE=y
CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_LIS3MDL_TRIGGER_OWN_THREAD=y
CONFIG_HTS221_TRIGGER_NONE=y
CONFIG_CBPRINTF_FP_SUPPORT=y
``` | /content/code_sandbox/samples/shields/x_nucleo_iks01a1/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 44 |
```yaml
sample:
name: X-NUCLEO-IKS01A1 sensor shield
tests:
sample.shields.x_nucleo_iks01a1:
platform_exclude:
- disco_l475_iot1
- pan1781_evb
- pan1782_evb
harness: shield
tags: shield
depends_on:
- arduino_i2c
- arduino_gpio
``` | /content/code_sandbox/samples/shields/x_nucleo_iks01a1/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 92 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/sensor.h>
#include <stdio.h>
#include <zephyr/sys/util.h>
#ifdef CONFIG_LIS3MDL_TRIGGER
static int lis3mdl_trig_cnt;
static void lis3mdl_trigger_handler(const struct device *dev,
const struct sensor_trigger *trig)
{... | /content/code_sandbox/samples/shields/x_nucleo_iks01a1/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,044 |
```unknown
/*
*
*/
/*
* Sensors declared here are possibly present on DIL24
*/
&arduino_i2c {
status = "okay";
lis2de18_18_x_nucleo_iks01a3: lis2de12@18 {
compatible = "st,lis2de12";
reg = <0x18>;
int1-gpios = <&arduino_header 5 GPIO_ACTIVE_HIGH>; /* A5 */
};
};
``` | /content/code_sandbox/samples/shields/x_nucleo_iks01a3/standard/app.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 97 |
```restructuredtext
.. zephyr:code-sample:: x-nucleo-iks01a3-std
:name: X-NUCLEO-IKS01A3 shield - Standard (Mode 1)
:relevant-api: sensor_interface
Interact with all the sensors of an X-NUCLEO-IKS01A3 shield using Standard mode.
Overview
********
This sample is provided as an example to test the X-NUCLEO-IKS... | /content/code_sandbox/samples/shields/x_nucleo_iks01a3/standard/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 912 |
```unknown
CONFIG_LOG=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_SENSOR_LOG_LEVEL_DBG=y
CONFIG_HTS221_TRIGGER_NONE=y
CONFIG_LPS22HH_TRIGGER_OWN_THREAD=y
CONFIG_STTS751_TRIGGER_NONE=y
CONFIG_LIS2MDL_TRIGGER_NONE=y
CONFIG_LIS2DW12_TRIGGER_OWN_THREAD=y
CONFIG_LSM6DSO_ENABLE_TEMP=n
CONFIG_LSM6DSO_TRIGGER... | /content/code_sandbox/samples/shields/x_nucleo_iks01a3/standard/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 132 |
```yaml
sample:
name: X-NUCLEO-IKS01A3 sensor shield
common:
min_ram: 16
tests:
sample.shields.x_nucleo_iks01a3.standard:
harness: shield
tags: shield
depends_on:
- arduino_i2c
- arduino_gpio
platform_exclude:
- disco_l475_iot1
- lpcxpresso55s16
- pan1781_evb
- ... | /content/code_sandbox/samples/shields/x_nucleo_iks01a3/standard/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 122 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/sensor.h>
#include <stdio.h>
#include <zephyr/sys/util.h>
#ifdef CONFIG_LIS2MDL_TRIGGER
static int lis2mdl_trig_cnt;
static void lis2mdl_trigger_handler(const struct device *dev,
const struct sensor_trigger *trig)
{... | /content/code_sandbox/samples/shields/x_nucleo_iks01a3/standard/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 4,296 |
```unknown
#
CONFIG_LPS22HH_TRIGGER_OWN_THREAD=n
CONFIG_LPS22HH_TRIGGER_NONE=y
CONFIG_LIS2DW12_TRIGGER_OWN_THREAD=n
CONFIG_LIS2DW12_TRIGGER_NONE=y
CONFIG_LSM6DSO_TRIGGER_OWN_THREAD=n
CONFIG_LSM6DSO_TRIGGER_NONE=y
# DIL24 section
CONFIG_LIS2DE12_ENABLE_TEMP=n
``` | /content/code_sandbox/samples/shields/x_nucleo_iks01a3/standard/boards/stm32mp157c_dk2.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 82 |
```restructuredtext
.. zephyr:code-sample:: x-nucleo-iks01a3-shub
:name: X-NUCLEO-IKS01A3 shield - SensorHub (Mode 2)
:relevant-api: sensor_interface
Interact with all the sensors of an X-NUCLEO-IKS01A3 shield using Sensor Hub mode.
Overview
********
This sample is provided as an example to test the X-NUCLEO... | /content/code_sandbox/samples/shields/x_nucleo_iks01a3/sensorhub/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 862 |
```unknown
CONFIG_LOG=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_SENSOR_LOG_LEVEL_DBG=y
CONFIG_LIS2DW12_TRIGGER_NONE=y
CONFIG_LSM6DSO_ENABLE_TEMP=n
CONFIG_LSM6DSO_TRIGGER_OWN_THREAD=y
CONFIG_LSM6DSO_SENSORHUB=y
CONFIG_LSM6DSO_EXT_LIS2MDL=y
CONFIG_LSM6DSO_EXT_LPS22HH=y
CONFIG_LSM6DSO_EXT_HTS221=n
CONF... | /content/code_sandbox/samples/shields/x_nucleo_iks01a3/sensorhub/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 117 |
```yaml
sample:
name: X-NUCLEO-IKS01A3 sensor shield
tests:
sample.shields.x_nucleo_iks01a3.sensorhub:
harness: shield
tags: shield
depends_on:
- arduino_i2c
- arduino_gpio
platform_exclude:
- disco_l475_iot1
- lpcxpresso55s16
- mimxrt1010_evk
``` | /content/code_sandbox/samples/shields/x_nucleo_iks01a3/sensorhub/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 98 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/sensor.h>
#include <stdio.h>
#include <zephyr/sys/util.h>
#ifdef CONFIG_LIS2DW12_TRIGGER
static int lis2dw12_trig_cnt;
static void lis2dw12_trigger_handler(const struct device *dev,
const struct sensor_trigger *tri... | /content/code_sandbox/samples/shields/x_nucleo_iks01a3/sensorhub/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,243 |
```unknown
#
CONFIG_LSM6DSO_TRIGGER_OWN_THREAD=n
CONFIG_LSM6DSO_TRIGGER_NONE=y
``` | /content/code_sandbox/samples/shields/x_nucleo_iks01a3/sensorhub/boards/stm32mp157c_dk2.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 24 |
```restructuredtext
.. zephyr:code-sample:: x-nucleo-53l0a1
:name: X-NUCLEO-53L0A1 shield
:relevant-api: sensor_interface gpio_interface
Interact with the 7-segment display and VL53L0X ranging sensor of an X-NUCLEO-53L0A1 shield.
Overview
********
This sample demonstrate the usage of the 4 digits x 7 segment... | /content/code_sandbox/samples/shields/x_nucleo_53l0a1/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 545 |
```unknown
CONFIG_SENSOR=y
CONFIG_GPIO=y
``` | /content/code_sandbox/samples/shields/x_nucleo_53l0a1/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 9 |
```yaml
sample:
name: X-NUCLEO-53L0A1 time-of-flight distance sensor shield
tests:
sample.shields.x_nucleo_53l0a1:
harness: shield
tags: shield
depends_on: arduino_i2c
filter: dt_enabled_alias_with_parent_compat("sw0", "gpio-keys")
``` | /content/code_sandbox/samples/shields/x_nucleo_53l0a1/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 78 |
```c
/*
*
*/
#include "display_7seg.h"
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/sys/printk.h>
const uint8_t DISPLAY_OFF[4] = { CHAR_OFF, CHAR_OFF, CHAR_OFF, CHAR_OFF };
const uint8_t TEXT_Err[4] = { CHAR_E, CHAR_r, CHAR_r, CHAR_OFF };
static bool initialized;
static const struc... | /content/code_sandbox/samples/shields/x_nucleo_53l0a1/src/display_7seg.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 952 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/drivers/gpio.h>
#include "display_7seg.h"
/*
* Get button configuration from the devicetree sw0 alias. This is mandatory.
*/
#define SW0_NODE DT_ALIAS(sw0)
#if !DT_NODE_HAS_STATUS(SW0_NOD... | /content/code_sandbox/samples/shields/x_nucleo_53l0a1/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 899 |
```objective-c
#ifndef DISPLAY_7SEG_HEADER
#define DISPLAY_7SEG_HEADER
/*
*
*/
#include <stdbool.h>
#include <stdint.h>
/*
* 3
* ---
* 1| |5
* -2-
* 0| |6
* ---
* 4
*/
#define CHAR_OFF (0)
#define CHAR_0 (BIT(0) | BIT(1) | BIT(3) | BIT(4) | BIT(5) | BIT(6))
#define CHAR_1 ... | /content/code_sandbox/samples/shields/x_nucleo_53l0a1/src/display_7seg.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 951 |
```unknown
CONFIG_SHELL=y
CONFIG_SHELL_GETOPT=y
CONFIG_POSIX_C_LIB_EXT=y
CONFIG_GETOPT_LONG=y
CONFIG_GPIO=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_SHELL=y
CONFIG_WATCHDOG=y
``` | /content/code_sandbox/samples/shields/npm6001_ek/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 49 |
```yaml
sample:
name: nPM6001 EK
tests:
sample.shields.npm6001_ek:
harness: shield
tags: shield
depends_on: arduino_i2c
``` | /content/code_sandbox/samples/shields/npm6001_ek/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 46 |
```c
/*
*/
#include <stdlib.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/regulator.h>
#include <zephyr/drivers/watchdog.h>
#include <zephyr/dt-bindings/gpio/nordic-npm6001-gpio.h>
#include <zephyr/dt-bindings/regulator/npm6001.h>
#include <zephyr/posix/unistd.h>
#include <z... | /content/code_sandbox/samples/shields/npm6001_ek/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,595 |
```restructuredtext
.. _npm6001_ek_sample:
nPM6001 EK sample
#################
Overview
********
This sample is provided as an example to test the :ref:`npm6001_ek`. The sample
provides a shell interface that allows to test multiple functionalities offered
by the nPM6001 PMIC, including:
- Regulators (BUCK0/1/2/3 a... | /content/code_sandbox/samples/shields/npm6001_ek/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,279 |
```restructuredtext
.. _x-nucleo-iks4a1-std-sample:
X-NUCLEO-IKS4A1 shield Standard (Mode 1) sample
###############################################
Overview
********
This sample is provided as an example to test the X-NUCLEO-IKS4A1 shield
configured in Standard mode (Mode 1).
Please refer to :ref:`x-nucleo-iks4a1-mod... | /content/code_sandbox/samples/shields/x_nucleo_iks4a1/standard/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 697 |
```unknown
CONFIG_LOG=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_SENSOR_LOG_LEVEL_DBG=y
CONFIG_LIS2MDL_TRIGGER_OWN_THREAD=y
CONFIG_LPS2XDF_TRIGGER_OWN_THREAD=y
CONFIG_LSM6DSO16IS_TRIGGER_OWN_THREAD=y
CONFIG_LSM6DSO16IS_ENABLE_TEMP=y
CONFIG_LSM6DSV16X_TRIGGER_OWN_THREAD=y
CONFIG_LSM6DSV16X_ENABLE_TEMP... | /content/code_sandbox/samples/shields/x_nucleo_iks4a1/standard/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 111 |
```yaml
sample:
name: X-NUCLEO-IKS01A4 sensor shield
common:
min_ram: 16
tests:
sample.shields.x_nucleo_iks4a1.standard:
harness: shield
tags: shield
depends_on: arduino_i2c arduino_gpio
platform_exclude:
- disco_l475_iot1
- lpcxpresso55s16
- mimxrt1010_evk
- pan1781_evb
... | /content/code_sandbox/samples/shields/x_nucleo_iks4a1/standard/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 128 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/sensor.h>
#include <stdio.h>
#include <zephyr/sys/util.h>
#ifdef CONFIG_LPS2XDF_TRIGGER
static int lps22df_trig_cnt;
static void lps22df_trigger_handler(const struct device *dev,
const struct sensor_trigger *trig)
{... | /content/code_sandbox/samples/shields/x_nucleo_iks4a1/standard/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,499 |
```restructuredtext
.. _x-nucleo-iks4a1-shub1-sample:
X-NUCLEO-IKS4A1 shield SHUB1 (Mode 3) sample
############################################
Overview
********
This sample is provided as an example to test the X-NUCLEO-IKS4A1 shield
configured in SHUB1 (Mode 3).
Please refer to :ref:`x-nucleo-iks4a1-mode-3` for mor... | /content/code_sandbox/samples/shields/x_nucleo_iks4a1/sensorhub1/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 572 |
```unknown
CONFIG_LOG=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_SENSOR_LOG_LEVEL_DBG=y
CONFIG_LSM6DSV16X_TRIGGER_OWN_THREAD=y
CONFIG_LSM6DSV16X_SENSORHUB=y
CONFIG_LSM6DSV16X_EXT_LIS2MDL=y
CONFIG_LSM6DSV16X_EXT_LPS22DF=y
CONFIG_CBPRINTF_FP_SUPPORT=y
``` | /content/code_sandbox/samples/shields/x_nucleo_iks4a1/sensorhub1/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 93 |
```yaml
sample:
name: X-NUCLEO-IKS01A4 sensor shield
tests:
sample.shields.x_nucleo_iks4a1.sensorhub1:
harness: shield
tags: shield
depends_on: arduino_i2c arduino_gpio
platform_exclude:
- disco_l475_iot1
- lpcxpresso55s16
- mimxrt1010_evk
- stm32mp157c_dk2
``` | /content/code_sandbox/samples/shields/x_nucleo_iks4a1/sensorhub1/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 105 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/sensor.h>
#include <stdio.h>
#include <zephyr/sys/util.h>
#ifdef CONFIG_LSM6DSV16X_TRIGGER
static int lsm6dsv16x_acc_trig_cnt;
static void lsm6dsv16x_acc_trig_handler(const struct device *dev,
const struct sensor_t... | /content/code_sandbox/samples/shields/x_nucleo_iks4a1/sensorhub1/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,844 |
```restructuredtext
.. _x-nucleo-iks4a1-shub2-sample:
X-NUCLEO-IKS4A1: shield SHUB2 (Mode 2) sample
#############################################
Overview
********
This sample is provided as an example to test the X-NUCLEO-IKS4A1 shield
configured in Sensor Hub mode (Mode 2).
Please refer to :ref:`x-nucleo-iks4a1-mod... | /content/code_sandbox/samples/shields/x_nucleo_iks4a1/sensorhub2/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 573 |
```unknown
CONFIG_LOG=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_SENSOR_LOG_LEVEL_DBG=y
CONFIG_LSM6DSO16IS_ENABLE_TEMP=n
CONFIG_LSM6DSO16IS_TRIGGER_OWN_THREAD=y
CONFIG_LSM6DSO16IS_SENSORHUB=y
CONFIG_LSM6DSO16IS_EXT_LIS2MDL=y
CONFIG_LSM6DSO16IS_EXT_LPS22DF=y
CONFIG_CBPRINTF_FP_SUPPORT=y
``` | /content/code_sandbox/samples/shields/x_nucleo_iks4a1/sensorhub2/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 105 |
```yaml
sample:
name: X-NUCLEO-IKS01A4 sensor shield
tests:
sample.shields.x_nucleo_iks4a1.sensorhub2:
harness: shield
tags: shield
depends_on: arduino_i2c arduino_gpio
platform_exclude:
- disco_l475_iot1
- lpcxpresso55s16
- pan1781_evb
- pan1782_evb
- stm32mp157c_dk2
... | /content/code_sandbox/samples/shields/x_nucleo_iks4a1/sensorhub2/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 111 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/sensor.h>
#include <stdio.h>
#include <zephyr/sys/util.h>
#ifdef CONFIG_LSM6DSO16IS_TRIGGER
static int lsm6dso16is_acc_trig_cnt;
static void lsm6dso16is_acc_trig_handler(const struct device *dev,
const struct senso... | /content/code_sandbox/samples/shields/x_nucleo_iks4a1/sensorhub2/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,844 |
```unknown
/*
*/
&i2c0_default {
group1 {
bias-pull-up;
};
};
&npm1300_ek_regulators {
dvs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>,
<&gpio0 18 GPIO_ACTIVE_LOW>;
};
&npm1300_ek_buck1 {
regulator-init-microvolt = <2000000>;
};
&npm1300_ek_buck2 {
regulator-init-microvolt = <3300000>;
retention-microvolt = ... | /content/code_sandbox/samples/shields/npm1300_ek/nrf52dk_nrf52832.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 300 |
```unknown
CONFIG_SHELL=y
CONFIG_LOG=y
CONFIG_GPIO=y
CONFIG_GPIO_SHELL=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_SHELL=y
CONFIG_SENSOR=y
CONFIG_SENSOR_SHELL=y
CONFIG_LED=y
``` | /content/code_sandbox/samples/shields/npm1300_ek/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 47 |
```yaml
sample:
name: nPM1300 EK
tests:
sample.shields.npm1300_ek:
platform_allow: nrf52dk/nrf52832
harness: shield
tags: shield
extra_args: SHIELD=npm1300_ek
depends_on: arduino_i2c
``` | /content/code_sandbox/samples/shields/npm1300_ek/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 72 |
```c
/*
*/
#include <stdlib.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/regulator.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/drivers/sensor/npm1300_charger.h>
#include <zephyr/drivers/led.h>
#include <zephyr/dt-bindings/regulator/npm1300.h>
#include <zephyr/dri... | /content/code_sandbox/samples/shields/npm1300_ek/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,081 |
```restructuredtext
.. _npm1300_ek_sample:
nPM1300 EK sample
#################
Overview
********
This sample is provided for evaluation of the :ref:`npm1300_ek`.
The sample provides a shell interface to support the features of the
nPM1300 PMIC, including:
- Regulators (BUCK1/2, LDO1/2)
- GPIO
Requirements
********... | /content/code_sandbox/samples/shields/npm1300_ek/doc/index.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 482 |
```restructuredtext
.. _driver-samples:
Driver Samples
##############
The following samples demonstrate how to use various drivers supported
by Zephyr.
.. toctree::
:maxdepth: 1
:glob:
**/*
``` | /content/code_sandbox/samples/drivers/drivers.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 48 |
```unknown
CONFIG_STDOUT_CONSOLE=y
CONFIG_PRINTK=y
CONFIG_SPI=y
CONFIG_GPIO=y
``` | /content/code_sandbox/samples/drivers/spi_fujitsu_fram/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 20 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.