Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples: migrate includes to contain <zephyr/...> prefix #45388

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions samples/application_development/code_relocation/src/main.c
Original file line number Diff line number Diff line change
@@ -4,9 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr.h>
#include <kernel.h>
#include <sys/printk.h>
#include <zephyr/zephyr.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>


/* This function will allow execute from sram region.
@@ -17,7 +17,7 @@
*/

#ifdef CONFIG_ARM_MPU
#include <arch/arm/aarch32/cortex_m/cmsis.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
void disable_mpu_rasr_xn(void)
{
uint32_t index;
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr.h>
#include <sys/printk.h>
#include <zephyr/zephyr.h>
#include <zephyr/sys/printk.h>

uint32_t var_sram2_data = 10U;
uint32_t var_sram2_bss;
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr.h>
#include <sys/printk.h>
#include <zephyr/zephyr.h>
#include <zephyr/sys/printk.h>

void function_in_sram(int32_t value)
{
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr.h>
#include <sys/printk.h>
#include <zephyr/zephyr.h>
#include <zephyr/sys/printk.h>

uint32_t var_file3_sram_data = 10U;
uint32_t var_file3_sram2_bss;
Original file line number Diff line number Diff line change
@@ -5,12 +5,12 @@
*/

#include <errno.h>
#include <init.h>
#include <zephyr.h>
#include <device.h>
#include <zephyr/init.h>
#include <zephyr/zephyr.h>
#include <zephyr/device.h>
#include <nrfx_qspi.h>
#include <hal/nrf_clock.h>
#include <drivers/pinctrl.h>
#include <zephyr/drivers/pinctrl.h>

#define QSPI_STD_CMD_WRSR 0x01
#define QSPI_STD_CMD_WRDI 0x04
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr.h>
#include <sys/printk.h>
#include <zephyr/zephyr.h>
#include <zephyr/sys/printk.h>

uint32_t var_ext_sram_data = 10U;

Original file line number Diff line number Diff line change
@@ -5,9 +5,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr.h>
#include <kernel.h>
#include <sys/printk.h>
#include <zephyr/zephyr.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>

/*
* This function will allow execute from sram region. This is needed only for
@@ -16,7 +16,7 @@
* to configure the region appropriately in arm_mpu_regions.c.
*/
#ifdef CONFIG_ARM_MPU
#include <arch/arm/aarch32/cortex_m/cmsis.h>
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
void disable_mpu_rasr_xn(void)
{
uint32_t index;
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr.h>
#include <sys/printk.h>
#include <zephyr/zephyr.h>
#include <zephyr/sys/printk.h>

uint32_t var_sram_data = 10U;

2 changes: 1 addition & 1 deletion samples/application_development/external_lib/src/main.c
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
/* hello world example: calling functions from a static library */


#include <zephyr.h>
#include <zephyr/zephyr.h>
#include <stdio.h>

#include <mylib.h>
4 changes: 2 additions & 2 deletions samples/application_development/out_of_tree_board/src/main.c
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr.h>
#include <sys/printk.h>
#include <zephyr/zephyr.h>
#include <zephyr/sys/printk.h>

void main(void)
{
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@

#include "hello_world_driver.h"
#include <zephyr/types.h>
#include <syscall_handler.h>
#include <zephyr/syscall_handler.h>

/**
* This is a minimal example of an out-of-tree driver
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
extern "C" {
#endif

#include <device.h>
#include <zephyr/device.h>

/*
* This 'Hello World' driver has a 'print' syscall that prints the
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@

#include "hello_world_driver.h"
#include <stdio.h>
#include <zephyr.h>
#include <zephyr/zephyr.h>

const struct device *dev;

10 changes: 5 additions & 5 deletions samples/arch/mpu/mpu_test/src/main.c
Original file line number Diff line number Diff line change
@@ -6,11 +6,11 @@
*/
#include <stdlib.h>

#include <zephyr.h>
#include <device.h>
#include <devicetree.h>
#include <drivers/flash.h>
#include <shell/shell.h>
#include <zephyr/zephyr.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/flash.h>
#include <zephyr/shell/shell.h>

#define PR_SHELL(shell, fmt, ...) \
shell_fprintf(shell, SHELL_NORMAL, fmt, ##__VA_ARGS__)
2 changes: 1 addition & 1 deletion samples/arch/smp/pi/src/main.c
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr.h>
#include <zephyr/zephyr.h>
#include <stdio.h>

/* Amount of execution threads to create and run */
6 changes: 3 additions & 3 deletions samples/arch/smp/pktqueue/src/main.h
Original file line number Diff line number Diff line change
@@ -4,10 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr.h>
#include <zephyr/zephyr.h>
#include <stdio.h>
#include <sys/crc.h>
#include <random/rand32.h>
#include <zephyr/sys/crc.h>
#include <zephyr/random/rand32.h>


/* Amount of parallel processed sender/receiver queues of packet headers */
6 changes: 3 additions & 3 deletions samples/arch/smp/pktqueue/src/pktqueue.h
Original file line number Diff line number Diff line change
@@ -4,10 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr.h>
#include <zephyr/zephyr.h>
#include <stdio.h>
#include <sys/crc.h>
#include <random/rand32.h>
#include <zephyr/sys/crc.h>
#include <zephyr/random/rand32.h>

struct phdr_desc {
struct phdr_desc *next; /* Next pkt descriptor in respective queue */
4 changes: 2 additions & 2 deletions samples/basic/blinky/src/main.c
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr.h>
#include <drivers/gpio.h>
#include <zephyr/zephyr.h>
#include <zephyr/drivers/gpio.h>

/* 1000 msec = 1 sec */
#define SLEEP_TIME_MS 1000
8 changes: 4 additions & 4 deletions samples/basic/blinky_pwm/src/main.c
Original file line number Diff line number Diff line change
@@ -9,10 +9,10 @@
* @file Sample app to demonstrate PWM.
*/

#include <zephyr.h>
#include <sys/printk.h>
#include <device.h>
#include <drivers/pwm.h>
#include <zephyr/zephyr.h>
#include <zephyr/sys/printk.h>
#include <zephyr/device.h>
#include <zephyr/drivers/pwm.h>

static const struct pwm_dt_spec pwm_led0 = PWM_DT_SPEC_GET(DT_ALIAS(pwm_led0));

10 changes: 5 additions & 5 deletions samples/basic/button/src/main.c
Original file line number Diff line number Diff line change
@@ -5,11 +5,11 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr.h>
#include <device.h>
#include <drivers/gpio.h>
#include <sys/util.h>
#include <sys/printk.h>
#include <zephyr/zephyr.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/printk.h>
#include <inttypes.h>

#define SLEEP_TIME_MS 1
8 changes: 4 additions & 4 deletions samples/basic/fade_led/src/main.c
Original file line number Diff line number Diff line change
@@ -9,10 +9,10 @@
* @file Sample app to demonstrate PWM-based LED fade
*/

#include <zephyr.h>
#include <sys/printk.h>
#include <device.h>
#include <drivers/pwm.h>
#include <zephyr/zephyr.h>
#include <zephyr/sys/printk.h>
#include <zephyr/device.h>
#include <zephyr/drivers/pwm.h>

static const struct pwm_dt_spec pwm_led0 = PWM_DT_SPEC_GET(DT_ALIAS(pwm_led0));

2 changes: 1 addition & 1 deletion samples/basic/minimal/src/main.c
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr.h>
#include <zephyr/zephyr.h>

void main(void)
{
8 changes: 4 additions & 4 deletions samples/basic/rgb_led/src/main.c
Original file line number Diff line number Diff line change
@@ -8,10 +8,10 @@
* @file Sample app to demonstrate PWM-based RGB LED control
*/

#include <zephyr.h>
#include <sys/printk.h>
#include <device.h>
#include <drivers/pwm.h>
#include <zephyr/zephyr.h>
#include <zephyr/sys/printk.h>
#include <zephyr/device.h>
#include <zephyr/drivers/pwm.h>

static const struct pwm_dt_spec red_pwm_led =
PWM_DT_SPEC_GET(DT_ALIAS(red_pwm_led));
8 changes: 4 additions & 4 deletions samples/basic/servo_motor/src/main.c
Original file line number Diff line number Diff line change
@@ -8,10 +8,10 @@
* @file Sample app to demonstrate PWM-based servomotor control
*/

#include <zephyr.h>
#include <sys/printk.h>
#include <device.h>
#include <drivers/pwm.h>
#include <zephyr/zephyr.h>
#include <zephyr/sys/printk.h>
#include <zephyr/device.h>
#include <zephyr/drivers/pwm.h>

static const struct pwm_dt_spec servo = PWM_DT_SPEC_GET(DT_NODELABEL(servo));
static const uint32_t min_pulse = DT_PROP(DT_NODELABEL(servo), min_pulse);
10 changes: 5 additions & 5 deletions samples/basic/threads/src/main.c
Original file line number Diff line number Diff line change
@@ -4,11 +4,11 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr.h>
#include <device.h>
#include <drivers/gpio.h>
#include <sys/printk.h>
#include <sys/__assert.h>
#include <zephyr/zephyr.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/__assert.h>
#include <string.h>

/* size of stack area used by each thread */
8 changes: 4 additions & 4 deletions samples/bluetooth/beacon/src/main.c
Original file line number Diff line number Diff line change
@@ -8,11 +8,11 @@

#include <zephyr/types.h>
#include <stddef.h>
#include <sys/printk.h>
#include <sys/util.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>

#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci.h>

#define DEVICE_NAME CONFIG_BT_DEVICE_NAME
#define DEVICE_NAME_LEN (sizeof(DEVICE_NAME) - 1)
4 changes: 2 additions & 2 deletions samples/bluetooth/broadcast_audio_sink/src/main.c
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <bluetooth/bluetooth.h>
#include <bluetooth/audio/audio.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/audio/audio.h>

#define SEM_TIMEOUT K_SECONDS(10)

4 changes: 2 additions & 2 deletions samples/bluetooth/broadcast_audio_source/src/main.c
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <bluetooth/bluetooth.h>
#include <bluetooth/audio/audio.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/audio/audio.h>

/* When BROADCAST_ENQUEUE_COUNT > 1 we can enqueue enough buffers to ensure that
* the controller is never idle
8 changes: 4 additions & 4 deletions samples/bluetooth/broadcaster/src/main.c
Original file line number Diff line number Diff line change
@@ -8,11 +8,11 @@

#include <zephyr/types.h>
#include <stddef.h>
#include <sys/printk.h>
#include <sys/util.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>

#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci.h>

static uint8_t mfg_data[] = { 0xff, 0xff, 0x00 };

Loading
Oops, something went wrong.