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 |
|---|---|---|---|---|---|---|---|---|
```unknown
CONFIG_LOG=y
CONFIG_SPI=y
CONFIG_GPIO=y
CONFIG_LORA=y
CONFIG_LORAWAN=y
CONFIG_LORAMAC_REGION_IN865=y
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
``` | /content/code_sandbox/samples/subsys/lorawan/class_a/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 53 |
```yaml
common:
tags: lorawan
depends_on: lora
harness: console
harness_config:
type: one_line
regex:
- "<inf> lorawan_class_a: Joining network over OTAA"
sample:
description: Demonstration of Class-A LoRaWAN functionality
name: LoRaWAN Class-A
tests:
sample.lorawan.class_a.as923:
extra_... | /content/code_sandbox/samples/subsys/lorawan/class_a/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 385 |
```restructuredtext
.. _modbus-samples:
Modbus Samples
##############
.. toctree::
:maxdepth: 1
:glob:
**/*
``` | /content/code_sandbox/samples/subsys/modbus/modbus.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 34 |
```c
/*
* Class A LoRaWAN sample application
*
*
*/
#include <zephyr/device.h>
#include <zephyr/lorawan/lorawan.h>
#include <zephyr/kernel.h>
/* Customize based on network configuration */
#define LORAWAN_DEV_EUI { 0xDD, 0xEE, 0xAA, 0xDD, 0xBB, 0xEE,\
0xEE, 0xFF }
#define LORAWAN_JOIN_EUI { 0x00, 0x00, ... | /content/code_sandbox/samples/subsys/lorawan/class_a/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,064 |
```restructuredtext
.. zephyr:code-sample:: modbus-tcp-server
:name: Modbus TCP server
:relevant-api: modbus bsd_sockets
Implement a Modbus TCP server exposing Modbus commands to control LEDs.
Overview
********
This is a simple application demonstrating a Modbus TCP server implementation
in Zephyr RTOS.
Re... | /content/code_sandbox/samples/subsys/modbus/tcp_server/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 698 |
```unknown
CONFIG_LOG=y
CONFIG_GPIO=y
CONFIG_MAIN_STACK_SIZE=1200
CONFIG_POSIX_API=y
CONFIG_MODBUS=y
CONFIG_MODBUS_ROLE_SERVER=y
CONFIG_MODBUS_RAW_ADU=y
CONFIG_MODBUS_NUMOF_RAW_ADU=1
CONFIG_MODBUS_ROLE_SERVER=y
# Networking config
CONFIG_NETWORKING=y
CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=n
CONFIG_NET_TCP=y
CONFIG_NET_SOC... | /content/code_sandbox/samples/subsys/modbus/tcp_server/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 144 |
```yaml
sample:
name: Modbus TCP Server Sample
tests:
sample.modbus.tcp_server:
build_only: true
platform_allow: frdm_k64f
integration_platforms:
- frdm_k64f
tags: modbus
filter: dt_enabled_alias_with_parent_compat("led0", "gpio-leds") and
dt_enabled_alias_with_parent_compat("l... | /content/code_sandbox/samples/subsys/modbus/tcp_server/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 123 |
```unknown
/*
*
*/
&arduino_serial {
status = "okay";
modbus0 {
compatible = "zephyr,modbus-serial";
status = "okay";
de-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>; /* D9 */
};
};
``` | /content/code_sandbox/samples/subsys/modbus/rtu_client/app.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 60 |
```restructuredtext
.. zephyr:code-sample:: modbus-rtu-client
:name: Modbus RTU client
:relevant-api: modbus
Communicate with a Modbus RTU server.
Overview
********
This is a simple application demonstrating a Modbus RTU client implementation
in Zephyr RTOS.
Requirements
************
This sample has been ... | /content/code_sandbox/samples/subsys/modbus/rtu_client/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 605 |
```unknown
CONFIG_LOG=y
CONFIG_GPIO=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=n
CONFIG_MODBUS=y
CONFIG_MODBUS_ROLE_CLIENT=y
``` | /content/code_sandbox/samples/subsys/modbus/rtu_client/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 38 |
```yaml
sample:
name: Modbus RTU Client Sample
tests:
sample.modbus.rtu_client:
build_only: true
platform_allow:
- nrf52840dk/nrf52840
- frdm_k64f
integration_platforms:
- nrf52840dk/nrf52840
tags:
- uart
- modbus
depends_on:
- gpio
- arduino_serial
``` | /content/code_sandbox/samples/subsys/modbus/rtu_client/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 96 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/modbus/modbus.h>
#include <zephyr/net/socket.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(tcp_modbus, LOG_LEVEL_INF);
#define MODBUS_TCP_PORT 502
static uint16_t holding_reg[8];
static... | /content/code_sandbox/samples/subsys/modbus/tcp_server/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,077 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/modbus/modbus.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(mbc_sample, LOG_LEVEL_INF);
static int client_iface;
const static struct modbus_iface_param client_param = {
.mode = MODBUS_M... | /content/code_sandbox/samples/subsys/modbus/rtu_client/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 817 |
```unknown
CONFIG_LOG=y
CONFIG_MAIN_STACK_SIZE=1200
CONFIG_POSIX_API=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=n
CONFIG_MODBUS=y
CONFIG_MODBUS_ROLE_CLIENT=y
CONFIG_MODBUS_RAW_ADU=y
CONFIG_MODBUS_NUMOF_RAW_ADU=1
# Networking config
CONFIG_NETWORKING=y
CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=n
C... | /content/code_sandbox/samples/subsys/modbus/tcp_gateway/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 150 |
```restructuredtext
.. zephyr:code-sample:: modbus-gateway
:name: Modbus TCP-to-serial gateway
:relevant-api: modbus bsd_sockets
Implement a gateway between an Ethernet TCP-IP network and a Modbus serial line.
Overview
********
This is a simple application demonstrating a gateway implementations between
an ... | /content/code_sandbox/samples/subsys/modbus/tcp_gateway/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 774 |
```yaml
sample:
name: Modbus TCP to serial line gateway sample
tests:
sample.modbus.tcp_gateway:
build_only: true
platform_allow: frdm_k64f
tags: modbus
depends_on:
- gpio
- netif
- arduino_serial
integration_platforms:
- frdm_k64f
``` | /content/code_sandbox/samples/subsys/modbus/tcp_gateway/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 78 |
```unknown
/*
*
*/
&arduino_serial {
status = "okay";
current-speed = <115200>;
modbus0 {
compatible = "zephyr,modbus-serial";
status = "okay";
};
};
``` | /content/code_sandbox/samples/subsys/modbus/tcp_gateway/boards/frdm_k64f.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 47 |
```unknown
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC ACM MODBUS sample"
CONFIG_UART_LINE_CTRL=y
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
``` | /content/code_sandbox/samples/subsys/modbus/rtu_server/overlay-cdc-acm.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 36 |
```unknown
/*
*
*/
&arduino_serial {
status = "okay";
modbus0 {
compatible = "zephyr,modbus-serial";
status = "okay";
de-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>; /* D9 */
};
};
``` | /content/code_sandbox/samples/subsys/modbus/rtu_server/app.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 60 |
```unknown
/*
*
*/
&zephyr_udc0 {
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
modbus0 {
compatible = "zephyr,modbus-serial";
status = "okay";
};
};
};
``` | /content/code_sandbox/samples/subsys/modbus/rtu_server/cdc-acm.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 72 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#include <zephyr/modbus/modbus.h>
#include <zephyr/net/socket.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(tcp_gateway, LOG_LEVEL_INF);
#define MODBUS_TCP_PORT 502
static struct modbus_adu tmp_adu;
static int backend;
const static str... | /content/code_sandbox/samples/subsys/modbus/tcp_gateway/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 954 |
```unknown
CONFIG_LOG=y
CONFIG_GPIO=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=n
CONFIG_MODBUS=y
CONFIG_MODBUS_ROLE_SERVER=y
``` | /content/code_sandbox/samples/subsys/modbus/rtu_server/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 38 |
```yaml
sample:
name: Modbus RTU Server Sample
tests:
sample.modbus.rtu_server:
build_only: true
platform_allow:
- nrf52840dk/nrf52840
- frdm_k64f
integration_platforms:
- nrf52840dk/nrf52840
tags:
- uart
- modbus
filter: dt_enabled_alias_with_parent_compat("led0", ... | /content/code_sandbox/samples/subsys/modbus/rtu_server/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 312 |
```restructuredtext
.. zephyr:code-sample:: modbus-rtu-server
:name: Modbus RTU server
:relevant-api: modbus
Implement a Modbus RTU server exposing Modbus commands to control LEDs.
Overview
********
This is a simple application demonstrating a Modbus RTU server implementation
in Zephyr RTOS.
Requirements
*... | /content/code_sandbox/samples/subsys/modbus/rtu_server/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,125 |
```restructuredtext
.. _console-samples:
Console Samples
###############
.. toctree::
:maxdepth: 1
:glob:
**/*
``` | /content/code_sandbox/samples/subsys/console/console.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 32 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/modbus/modbus.h>
#include <zephyr/usb/usb_device.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(mbs_sample, LOG_LEVEL_INF);
static uint16_t holding_reg[8];
static uint8_t coils_state;
sta... | /content/code_sandbox/samples/subsys/modbus/rtu_server/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 970 |
```unknown
CONFIG_CONSOLE_SUBSYS=y
CONFIG_CONSOLE_GETLINE=y
``` | /content/code_sandbox/samples/subsys/console/getline/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 13 |
```restructuredtext
.. zephyr:code-sample:: console_getline
:name: console_getline()
Use console_getline() to read an input line from the console.
Overview
********
This example shows how to use :c:func:`console_getline` function.
Similar to the well-known ANSI C gets() and fgets() functions,
:c:func:`console_... | /content/code_sandbox/samples/subsys/console/getline/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 315 |
```yaml
sample:
name: getline Sample
tests:
sample.console.getline:
integration_platforms:
- mps2/an385
filter: CONFIG_UART_CONSOLE and CONFIG_SERIAL_SUPPORT_INTERRUPT
tags: console
harness: keyboard
``` | /content/code_sandbox/samples/subsys/console/getline/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 52 |
```c
/*
*
*/
#include <string.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/console/console.h>
int main(void)
{
console_getline_init();
printk("Enter a line\n");
while (1) {
char *s = console_getline();
printk("line: %s\n", s);
printk("last char was: 0x%x\n", s[strlen(s) ... | /content/code_sandbox/samples/subsys/console/getline/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 106 |
```unknown
CONFIG_CONSOLE_SUBSYS=y
CONFIG_CONSOLE_GETCHAR=y
``` | /content/code_sandbox/samples/subsys/console/getchar/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 13 |
```yaml
sample:
name: getchar sample
tests:
sample.console.getchar:
integration_platforms:
- mps2/an385
filter: CONFIG_UART_CONSOLE and CONFIG_SERIAL_SUPPORT_INTERRUPT
tags: console
harness: keyboard
``` | /content/code_sandbox/samples/subsys/console/getchar/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 52 |
```restructuredtext
.. zephyr:code-sample:: console_getchar
:name: console_getchar()
Use console_getchar() to read an input character from the console.
Overview
********
This example shows how to use :c:func:`console_getchar` function.
Similar to the well-known ANSI C getchar() function,
:c:func:`console_getch... | /content/code_sandbox/samples/subsys/console/getchar/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 304 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/console/console.h>
int main(void)
{
console_init();
printk("Start typing characters to see their hex codes printed\n");
while (1) {
uint8_t c = console_getchar();
printk("char: [0x%x] %c\n", c, c);
}
return 0;
}
``` | /content/code_sandbox/samples/subsys/console/getchar/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 92 |
```unknown
CONFIG_CONSOLE_SUBSYS=y
CONFIG_CONSOLE_GETCHAR=y
CONFIG_CONSOLE_GETCHAR_BUFSIZE=64
CONFIG_CONSOLE_PUTCHAR_BUFSIZE=512
``` | /content/code_sandbox/samples/subsys/console/echo/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 31 |
```yaml
sample:
name: echo Sample
tests:
sample.console.echo:
integration_platforms:
- mps2/an385
filter: CONFIG_UART_CONSOLE and CONFIG_SERIAL_SUPPORT_INTERRUPT
tags: console
harness: keyboard
``` | /content/code_sandbox/samples/subsys/console/echo/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 51 |
```restructuredtext
.. zephyr:code-sample:: console_echo
:name: Console echo
:relevant-api: console_api
Echo an input character back to the output using the Console API.
Overview
********
This example shows how the :c:func:`console_getchar` and
:c:func:`console_putchar` functions can be used to echo an inpu... | /content/code_sandbox/samples/subsys/console/echo/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 278 |
```restructuredtext
.. _shell-samples:
Shell System Samples
####################
.. toctree::
:maxdepth: 1
:glob:
**/*
``` | /content/code_sandbox/samples/subsys/shell/shell.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 34 |
```unknown
CONFIG_MPU_ALLOW_FLASH_WRITE=y
``` | /content/code_sandbox/samples/subsys/shell/fs/mpu.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 9 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/console/console.h>
static const char prompt[] = "Start typing characters to see them echoed back\r\n";
int main(void)
{
console_init();
printk("You should see another line with instructions below. If not,\n");
printk("the (interrupt-driven) console device... | /content/code_sandbox/samples/subsys/console/echo/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 138 |
```unknown
CONFIG_FLASH=y
CONFIG_LOG=y
CONFIG_HEAP_MEM_POOL_SIZE=16384
CONFIG_SHELL=y
CONFIG_SHELL_LOG_LEVEL_INF=y
CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_SHELL=y
CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE=128
CONFIG_FILE_SYSTEM_LITTLEFS=y
CONFIG_FLASH_MAP=y
``` | /content/code_sandbox/samples/subsys/shell/fs/prj_flash_load.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 68 |
```unknown
CONFIG_FLASH=y
CONFIG_LOG=y
#CONFIG_FS_LOG_LEVEL_DBG=y
CONFIG_HEAP_MEM_POOL_SIZE=16384
CONFIG_SHELL=y
CONFIG_SHELL_LOG_LEVEL_INF=y
CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_SHELL=y
CONFIG_FILE_SYSTEM_LITTLEFS=y
CONFIG_FLASH_MAP=y
``` | /content/code_sandbox/samples/subsys/shell/fs/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 64 |
```yaml
sample:
description: FS shell sample
name: FS shell
common:
tags:
- shell
- filesystem
harness: keyboard
tests:
sample.filesystem.shell:
platform_allow:
- reel_board
- mimxrt1060_evk
- mr_canhubk3
- native_sim
integration_platforms:
- reel_board
sample.f... | /content/code_sandbox/samples/subsys/shell/fs/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 193 |
```c
/*
*
*/
#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(app);
int main(void)
{
return 0;
}
``` | /content/code_sandbox/samples/subsys/shell/fs/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 36 |
```unknown
CONFIG_MPU_ALLOW_FLASH_WRITE=y
``` | /content/code_sandbox/samples/subsys/shell/fs/boards/nrf9160dk_nrf9160.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 9 |
```unknown
#
#
CONFIG_MPU_ALLOW_FLASH_WRITE=y
``` | /content/code_sandbox/samples/subsys/shell/fs/boards/mimxrt1060_evk.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 11 |
```unknown
#
#
#
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
``` | /content/code_sandbox/samples/subsys/shell/fs/boards/circuitdojo_feather_nrf9160.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 26 |
```unknown
#
#
#
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
CONFIG_MPU_ALLOW_FLASH_WRITE=y
``` | /content/code_sandbox/samples/subsys/shell/fs/boards/actinius_icarus_bee.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 34 |
```restructuredtext
.. zephyr:code-sample:: shell-fs
:name: File system shell
:relevant-api: file_system_api
Access a LittleFS file system partition in flash using the file system shell.
Overview
********
This example provides shell access to a LittleFS file system partition in flash.
Requirements
********... | /content/code_sandbox/samples/subsys/shell/fs/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,156 |
```unknown
CONFIG_MPU_ALLOW_FLASH_WRITE=y
``` | /content/code_sandbox/samples/subsys/shell/fs/boards/nrf52dk_nrf52832.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 9 |
```unknown
CONFIG_MPU_ALLOW_FLASH_WRITE=y
``` | /content/code_sandbox/samples/subsys/shell/fs/boards/nrf52840dk_nrf52840.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 9 |
```unknown
#
#
#
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
``` | /content/code_sandbox/samples/subsys/shell/fs/boards/particle_xenon.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 26 |
```unknown
/*
*
*/
/delete-node/ &storage_partition;
&mx25l32 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* This is the littlefs v1 file system pre-installed
* by Particle.
*/
littlefs_partition: partition@0 {
label = "littlefs";
reg = <0x0000000... | /content/code_sandbox/samples/subsys/shell/fs/boards/particle_xenon.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 205 |
```unknown
CONFIG_MPU_ALLOW_FLASH_WRITE=y
``` | /content/code_sandbox/samples/subsys/shell/fs/boards/reel_board.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 9 |
```unknown
CONFIG_PRINTK=y
CONFIG_SHELL=y
CONFIG_SHELL_MINIMAL=y
CONFIG_SHELL_STACK_SIZE=1024
CONFIG_SHELL_BACKEND_SERIAL=n
CONFIG_THREAD_MONITOR=y
CONFIG_INIT_STACKS=y
CONFIG_BOOT_BANNER=n
CONFIG_THREAD_NAME=y
CONFIG_LOG=n
CONFIG_CONSOLE=y
CONFIG_CBPRINTF_NANO=y
#enable RTT shell
CONFIG_USE_SEGGER_RTT=y
CONFIG_SHELL... | /content/code_sandbox/samples/subsys/shell/shell_module/prj_minimal_rtt.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 93 |
```unknown
CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_ZEPHYR_NUS=y
CONFIG_UART_BT=y
CONFIG_BT_ZEPHYR_NUS_AUTO_START_BLUETOOTH=y
# Bluetooth optimizations to allow larger data packets.
CONFIG_BT_RX_STACK_SIZE=2048
CONFIG_BT_L2CAP_TX_MTU=512
CONFIG_BT_BUF_ACL_RX_... | /content/code_sandbox/samples/subsys/shell/shell_module/overlay-bt.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 113 |
```unknown
/*
*
*/
/ {
chosen {
zephyr,console = &bt_nus_console_uart;
zephyr,shell-uart = &bt_nus_console_uart;
};
bt_nus_console_uart: bt_nus_console_uart {
compatible = "zephyr,nus-uart";
rx-fifo-size = <1024>;
tx-fifo-size = <1024>;
};
};
``` | /content/code_sandbox/samples/subsys/shell/shell_module/bt.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 90 |
```unknown
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr USB shell sample"
CONFIG_SHELL_BACKEND_SERIAL_CHECK_DTR=y
CONFIG_UART_LINE_CTRL=y
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
# POSIX_TIMERS requires an embedded C library while the native USB driver is incompatible with it.
# So let's disable it. Once ... | /content/code_sandbox/samples/subsys/shell/shell_module/overlay-usb.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 112 |
```unknown
CONFIG_PRINTK=y
CONFIG_SHELL=y
CONFIG_SHELL_GETOPT=y
CONFIG_LOG=y
CONFIG_INIT_STACKS=y
CONFIG_THREAD_STACK_INFO=y
CONFIG_KERNEL_SHELL=y
CONFIG_THREAD_MONITOR=y
CONFIG_BOOT_BANNER=n
CONFIG_THREAD_NAME=y
CONFIG_DEVICE_SHELL=y
CONFIG_POSIX_API=y
CONFIG_POSIX_TIMERS=y
CONFIG_DATE_SHELL=y
CONFIG_THREAD_RUNTIME_ST... | /content/code_sandbox/samples/subsys/shell/shell_module/prj_getopt.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 87 |
```unknown
CONFIG_PRINTK=y
CONFIG_SHELL=y
CONFIG_SHELL_MINIMAL=y
CONFIG_SHELL_STACK_SIZE=1024
CONFIG_SHELL_BACKEND_SERIAL=y
CONFIG_THREAD_MONITOR=y
CONFIG_INIT_STACKS=y
CONFIG_BOOT_BANNER=n
CONFIG_THREAD_NAME=y
CONFIG_LOG=n
CONFIG_CBPRINTF_NANO=y
``` | /content/code_sandbox/samples/subsys/shell/shell_module/prj_minimal.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 67 |
```unknown
CONFIG_PRINTK=y
CONFIG_SHELL=y
CONFIG_LOG=y
CONFIG_INIT_STACKS=y
CONFIG_THREAD_STACK_INFO=y
CONFIG_KERNEL_SHELL=y
CONFIG_THREAD_MONITOR=y
CONFIG_BOOT_BANNER=n
CONFIG_THREAD_NAME=y
CONFIG_DEVICE_SHELL=y
CONFIG_POSIX_API=y
CONFIG_POSIX_TIMERS=y
CONFIG_DATE_SHELL=y
CONFIG_THREAD_RUNTIME_STATS=y
CONFIG_SHELL_CM... | /content/code_sandbox/samples/subsys/shell/shell_module/prj_login.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 116 |
```robotframework
*** Settings ***
Resource ${KEYWORDS}
*** Test Cases ***
Should Read Version From Shell
# `Prepare Machine` keyword comes from $ZEPHYR_BASE/tests/robot/common.robot file, which is imported as a resource
Prepare Machine
Start Emulation
Wait For Prompt On Uart ua... | /content/code_sandbox/samples/subsys/shell/shell_module/shell_module.robot | robotframework | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 93 |
```unknown
# Config options for logger sample app
mainmenu "Shell module sample application"
menu "Application configuration"
config SHELL_FOREGROUND_CMDS
bool "Shell foreground commands example"
default y
config SHELL_DYNAMIC_CMDS
bool "Shell dynamic commands example"
default y
endmenu
source "Kconfig.zephy... | /content/code_sandbox/samples/subsys/shell/shell_module/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 68 |
```unknown
/*
*
*/
/ {
chosen {
zephyr,shell-uart = &cdc_acm_uart0;
};
};
&zephyr_udc0 {
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
};
};
``` | /content/code_sandbox/samples/subsys/shell/shell_module/usb.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 68 |
```unknown
CONFIG_PRINTK=y
CONFIG_SHELL=y
CONFIG_LOG=y
CONFIG_LOG_CMDS=y
CONFIG_INIT_STACKS=y
CONFIG_THREAD_STACK_INFO=y
CONFIG_KERNEL_SHELL=y
CONFIG_THREAD_MONITOR=y
CONFIG_BOOT_BANNER=n
CONFIG_THREAD_NAME=y
CONFIG_DEVICE_SHELL=y
CONFIG_POSIX_API=y
CONFIG_POSIX_TIMERS=y
CONFIG_DATE_SHELL=y
CONFIG_THREAD_RUNTIME_STATS=... | /content/code_sandbox/samples/subsys/shell/shell_module/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 106 |
```restructuredtext
.. zephyr:code-sample:: shell-module
:name: Custom Shell module
:relevant-api: shell_api
Register shell commands using the Shell API
Overview
********
This is a simple application demonstrating how to write and register commands
using the :ref:`Shell API <shell_api>`:
Register Static co... | /content/code_sandbox/samples/subsys/shell/shell_module/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 759 |
```yaml
sample:
name: Shell Sample
common:
filter: not CONFIG_NATIVE_LIBC
platform_exclude:
- native_posix
- native_posix/native/64
tests:
sample.shell.shell_module:
filter: CONFIG_SERIAL and dt_chosen_enabled("zephyr,shell-uart")
tags: shell
harness: keyboard
min_ram: 40
integration... | /content/code_sandbox/samples/subsys/shell/shell_module/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 581 |
```c
/*
*
*/
#include <zephyr/shell/shell.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#define MAX_CMD_CNT (20u)
#define MAX_CMD_LEN (33u)
/* buffer holding dynamically created user commands */
static char dynamic_cmd_buffer[MAX_CMD_CNT][MAX_CMD_LEN];
/* commands counter */
static uint8_t dynamic_c... | /content/code_sandbox/samples/subsys/shell/shell_module/src/dynamic_cmd.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,218 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
#include <zephyr/shell/shell.h>
LOG_MODULE_REGISTER(app_test);
void foo(void)
{
LOG_INF("info message");
LOG_WRN("warning message");
LOG_ERR("err message");
}
/* Commands below are added using memory section approach which allows to build
* a set of subcommands from... | /content/code_sandbox/samples/subsys/shell/shell_module/src/test_module.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 252 |
```c
/*
*
*/
#include <zephyr/shell/shell.h>
#include <zephyr/shell/shell_uart.h>
#include <zephyr/drivers/uart.h>
#include <zephyr/device.h>
void shell_init_from_work(struct k_work *work)
{
const struct device *const dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_shell_uart));
bool log_backend = CONFIG_SHELL_BACKEND_SERIAL... | /content/code_sandbox/samples/subsys/shell/shell_module/src/uart_reinit.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 786 |
```unknown
/*
*/
/*
* The overlay file should be used to enable any
* dts nodes required by this shell application for this
* board.
*/
&sip_smc {
status = "okay";
zephyr,num-clients = <2>;
};
``` | /content/code_sandbox/samples/subsys/shell/shell_module/boards/intel_socfpga_agilex_socdk.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 52 |
```unknown
# Misc
CONFIG_HEAP_MEM_POOL_SIZE=16384
CONFIG_SHELL_STACK_SIZE=8192
# Setting the max argc
CONFIG_SHELL_ARGC_MAX=12
# Enable the Zephyr boot banner
CONFIG_BOOT_BANNER=y
# Enable timer driver
CONFIG_COUNTER=y
# Enable Timer shell commands
CONFIG_COUNTER_SHELL=y
#SiP SVC Service
CONFIG_ARM_SIP_SVC_DRIVER... | /content/code_sandbox/samples/subsys/shell/shell_module/boards/intel_socfpga_agilex5_socdk.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 196 |
```unknown
# Misc
CONFIG_HEAP_MEM_POOL_SIZE=16384
CONFIG_SHELL_STACK_SIZE=8192
# Setting the max argc
CONFIG_SHELL_ARGC_MAX=12
# Enable the Zephyr boot banner
CONFIG_BOOT_BANNER=y
#SiP SVC Service
CONFIG_ARM_SIP_SVC_DRIVER=y
CONFIG_ARM_SIP_SVC_SUBSYS=y
CONFIG_ARM_SIP_SVC_SUBSYS_SINGLY_OPEN=y
#SiP SVC Service Shell... | /content/code_sandbox/samples/subsys/shell/shell_module/boards/intel_socfpga_agilex_socdk.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 111 |
```unknown
/*
*/
/*
* The overlay file should be used to enable any
* dts nodes required by this shell application for this
* board.
*
* Nothing here as of now.
*/
&timer0 {
status = "okay";
};
&timer1 {
status = "okay";
};
&timer2 {
status = "okay";
};
&timer3 {
status = "okay";
};
&sip_smc {
status ... | /content/code_sandbox/samples/subsys/shell/shell_module/boards/intel_socfpga_agilex5_socdk.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 110 |
```unknown
CONFIG_SHELL=y
CONFIG_SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN=n
CONFIG_SHELL_BACKEND_SERIAL_RX_POLL_PERIOD=1
CONFIG_BOOT_BANNER=n
``` | /content/code_sandbox/samples/subsys/shell/devmem_load/prj_poll.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 33 |
```unknown
CONFIG_BOOT_BANNER=n
CONFIG_SHELL=y
``` | /content/code_sandbox/samples/subsys/shell/devmem_load/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 12 |
```yaml
sample:
name: devmem_load
description: devmem load sample
common:
harness: keyboard
tags:
- devmem
- devmem_load
tests:
sample.devmem_load.polled:
integration_platforms:
- native_sim
extra_args: OVERLAY_CONFIG="prj_poll.conf"
sample.devmem_load.uart.interrupt:
integration_p... | /content/code_sandbox/samples/subsys/shell/devmem_load/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 105 |
```c
/*
*
*/
int main(void)
{
return 0;
};
``` | /content/code_sandbox/samples/subsys/shell/devmem_load/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 14 |
```yaml
sample:
name: SIP SVC sample
common:
filter: CONFIG_ARM_SIP_SVC_HAS_INTEL_SDM_MAILBOX_FIFO
integration_platforms:
- intel_socfpga_agilex_socdk
tests:
sample.subsys.sip_svc:
tags: subsys
harness: console
harness_config:
type: one_line
ordered: true
regex:
- "Got ... | /content/code_sandbox/samples/subsys/sip_svc/sample.yml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 159 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/shell/shell.h>
#include <zephyr/version.h>
#include <zephyr/logging/log.h>
#include <stdlib.h>
#include <zephyr/drivers/uart.h>
#include <zephyr/usb/usb_device.h>
#include <ctype.h>
#ifdef CONFIG_ARCH_POSIX
#include <unistd.h>
#else
#include <zephyr/posix/uni... | /content/code_sandbox/samples/subsys/shell/shell_module/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,044 |
```unknown
# SiP SVC Service
CONFIG_ARM_SIP_SVC_DRIVER=y
CONFIG_ARM_SIP_SVC_SUBSYS=y
CONFIG_ARM_SIP_SVC_SUBSYS_SINGLY_OPEN=y
# Misc
CONFIG_HEAP_MEM_POOL_SIZE=8192
``` | /content/code_sandbox/samples/subsys/sip_svc/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 53 |
```restructuredtext
.. _sip_svc_sample:
SiP SVC sample
##############
Overview
********
This sample demonstrates the usage of SiP SVC subsystem.This sample
performs a voltage value query from Secure Device Manager in Intel Agilex
SoC FPGA.
Caveats
*******
* SiP SVC subsystem relies on the firmware running in EL3 l... | /content/code_sandbox/samples/subsys/sip_svc/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 647 |
```unknown
/*
*
*
*/
&sip_smc {
status = "okay";
zephyr,num-clients = <1>;
};
``` | /content/code_sandbox/samples/subsys/sip_svc/boards/intel_socfpga_agilex_socdk.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 26 |
```unknown
/*
*
*
*/
&sip_smc {
status = "okay";
zephyr,num-clients = <1>;
};
``` | /content/code_sandbox/samples/subsys/sip_svc/boards/intel_socfpga_agilex5_socdk.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 26 |
```restructuredtext
.. _profiling-samples:
Profiling subsystem samples
###########################
.. toctree::
:maxdepth: 1
:glob:
**/*
``` | /content/code_sandbox/samples/subsys/profiling/profiling.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 35 |
```c
/*
*
*
* A sample application using sip_svc subsystem to get query values from secure device.
* The access to the secure device is defined via EL3 exception level and uses
* the ARM Trusted Firmware to provide access.The application runs on Intel Agilex FPGA SoC,
* where the app queries voltage sampled from ... | /content/code_sandbox/samples/subsys/sip_svc/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,017 |
```restructuredtext
.. zephyr:code-sample:: profiling-perf
:name: Perf tool
Send perf samples to the host with console support
This application can be used to understand how to use the :ref:`profiling-perf`
tool.
Requirements
************
The Perf tool is currently implemented only for RISC-V and x86_64 arch... | /content/code_sandbox/samples/subsys/profiling/perf/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 463 |
```unknown
CONFIG_PROFILING=y
CONFIG_PROFILING_PERF=y
CONFIG_THREAD_STACK_INFO=y
CONFIG_SMP=n
CONFIG_SHELL=y
CONFIG_FRAME_POINTER=y
``` | /content/code_sandbox/samples/subsys/profiling/perf/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 34 |
```yaml
sample:
description: Sample, that can be used for testing profiling perf tool
name: perf sample
tests:
sample.perf:
tags:
- perf
- profiling
extra_configs:
- CONFIG_PROFILING_PERF_BUFFER_SIZE=128
filter: CONFIG_RISCV or CONFIG_X86
integration_platforms:
- qemu_risc... | /content/code_sandbox/samples/subsys/profiling/perf/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 110 |
```c
/*
*
*/
#include <zephyr/kernel.h>
#include <stdio.h>
#define WAIT_KOEF 10000
#define NOINLINE __attribute__((noinline))
int NOINLINE func_0_0(void)
{
k_busy_wait(1*WAIT_KOEF);
return 0;
}
int NOINLINE func_0_1(void)
{
k_busy_wait(2*WAIT_KOEF);
return 0;
}
int NOINLINE func_0(void)
{
k_busy_wait(1*WAI... | /content/code_sandbox/samples/subsys/profiling/perf/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 217 |
```python
#!/usr/bin/env python3
#
#
import logging
import re
from twister_harness import Shell
from twister_harness import DeviceAdapter
logger = logging.getLogger(__name__)
def test_shell_perf(dut: DeviceAdapter, shell: Shell):
shell.base_timeout=10
logger.info('send "perf record 200 99" command')
... | /content/code_sandbox/samples/subsys/profiling/perf/pytest/test_perf.py | python | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 281 |
```restructuredtext
.. _sensing-subsystem-samples:
Sensing Subsystem Samples
#########################
.. toctree::
:maxdepth: 1
:glob:
**/*
``` | /content/code_sandbox/samples/subsys/sensing/sensing.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 38 |
```unknown
/*
*
*
* Application overlay for testing the devicetree.h API.
*
* Names in this file should be chosen in a way that won't conflict
* with real-world devicetree nodes, to allow these tests to run on
* (and be extended to test) real hardware.
*/
/ {
sensing: sensing-node {
compatible = "zephyr,se... | /content/code_sandbox/samples/subsys/sensing/simple/app.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 92 |
```unknown
CONFIG_LOG=y
``` | /content/code_sandbox/samples/subsys/sensing/simple/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 5 |
```yaml
sample:
description: A sensor framework sample
name: sensing sample
common:
tags: sensing
integration_platforms:
- native_sim
harness: console
harness_config:
type: multi_line
regex:
- "sensing subsystem run successfully"
tests:
sample.sensing.simple:
platform_allow:
- ... | /content/code_sandbox/samples/subsys/sensing/simple/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 83 |
```restructuredtext
.. zephyr:code-sample:: sensing
:name: Sensing subsystem
:relevant-api: sensing_api
Get high-level sensor data in defined intervals.
Overview
********
A simple sample that shows how to use the sensors with sensing subsystem APIs. It defines
two sensors, with the underlying device bmi160 ... | /content/code_sandbox/samples/subsys/sensing/simple/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 222 |
```unknown
#Enable BMI160 and BMI160 Emulator
CONFIG_BMI160_TRIGGER_NONE=y
CONFIG_EMUL_BMI160=y
CONFIG_SENSOR=y
CONFIG_SENSOR_INFO=y
CONFIG_EMUL=y
``` | /content/code_sandbox/samples/subsys/sensing/simple/boards/native_sim.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 41 |
```unknown
/*
*
*/
#include <zephyr/sensing/sensing_sensor_types.h>
&i2c0 {
bmi160_i2c: bmi@68 {
compatible = "bosch,bmi160";
reg = <0x68>;
};
};
&spi0 {
bmi160_spi: bmi@3 {
compatible = "bosch,bmi160";
spi-max-frequency = <50000000>;
reg = <0x3>;
};
};
/ {
sensing: sensing-node {
compatible = "z... | /content/code_sandbox/samples/subsys/sensing/simple/boards/native_sim.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 449 |
```c
/*
*
*/
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys_clock.h>
#include <zephyr/sensing/sensing.h>
LOG_MODULE_REGISTER(main, LOG_LEVEL_INF);
static void acc_data_event_callback(sensing_sensor_handle_t handle, const void *buf,
void *conte... | /content/code_sandbox/samples/subsys/sensing/simple/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,442 |
```unknown
CONFIG_STDOUT_CONSOLE=y
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_SETTINGS=y
CONFIG_SETTINGS_RUNTIME=y
``` | /content/code_sandbox/samples/subsys/settings/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 25 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.