cleanup: include/: move misc/printk.h to sys/printk.h

move misc/printk.h to sys/printk.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2019-06-26 10:33:49 -04:00
commit 9ab2a56751
258 changed files with 355 additions and 340 deletions

View file

@ -16,7 +16,7 @@
#include <offsets_short.h> #include <offsets_short.h>
#include <toolchain.h> #include <toolchain.h>
#include <arch/cpu.h> #include <arch/cpu.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <logging/log_ctrl.h> #include <logging/log_ctrl.h>
/** /**

View file

@ -17,7 +17,7 @@
#include <kernel.h> #include <kernel.h>
#include <kernel_structs.h> #include <kernel_structs.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <exc_handle.h> #include <exc_handle.h>
#include <logging/log_ctrl.h> #include <logging/log_ctrl.h>

View file

@ -24,7 +24,7 @@
#include <linker/sections.h> #include <linker/sections.h>
#include <sw_isr_table.h> #include <sw_isr_table.h>
#include <irq.h> #include <irq.h>
#include <misc/printk.h> #include <sys/printk.h>
/* /*
* @brief Enable an interrupt line * @brief Enable an interrupt line

View file

@ -15,7 +15,7 @@
#include <toolchain.h> #include <toolchain.h>
#include <linker/sections.h> #include <linker/sections.h>
#include <kernel_structs.h> #include <kernel_structs.h>
#include <misc/printk.h> #include <sys/printk.h>
/** /**
* *

View file

@ -12,7 +12,7 @@
#include <arch/cpu.h> #include <arch/cpu.h>
#include <inttypes.h> #include <inttypes.h>
#include <misc/printk.h> #include <sys/printk.h>
void sys_exc_esf_dump(NANO_ESF *esf) void sys_exc_esf_dump(NANO_ESF *esf)
{ {
printk("r0/a1: 0x%08x ", esf->basic.a1); printk("r0/a1: 0x%08x ", esf->basic.a1);

View file

@ -15,7 +15,7 @@
#include <kernel.h> #include <kernel.h>
#include <arch/cpu.h> #include <arch/cpu.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <misc/reboot.h> #include <misc/reboot.h>
#include <toolchain.h> #include <toolchain.h>
#include <linker/sections.h> #include <linker/sections.h>

View file

@ -17,7 +17,7 @@
#include <kernel.h> #include <kernel.h>
#include <kernel_structs.h> #include <kernel_structs.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <logging/log_ctrl.h> #include <logging/log_ctrl.h>
/** /**

View file

@ -21,7 +21,7 @@
#include <logging/log_ctrl.h> #include <logging/log_ctrl.h>
#ifdef CONFIG_PRINTK #ifdef CONFIG_PRINTK
#include <misc/printk.h> #include <sys/printk.h>
#define PR_EXC(...) printk(__VA_ARGS__) #define PR_EXC(...) printk(__VA_ARGS__)
#define STORE_xFAR(reg_var, reg) u32_t reg_var = (u32_t)reg #define STORE_xFAR(reg_var, reg) u32_t reg_var = (u32_t)reg
#else #else

View file

@ -16,7 +16,7 @@
#include <toolchain.h> #include <toolchain.h>
#include <linker/sections.h> #include <linker/sections.h>
#include <kernel_structs.h> #include <kernel_structs.h>
#include <misc/printk.h> #include <sys/printk.h>
/** /**
* *

View file

@ -7,7 +7,7 @@
#include <kernel.h> #include <kernel.h>
#include <arch/cpu.h> #include <arch/cpu.h>
#include <kernel_structs.h> #include <kernel_structs.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <inttypes.h> #include <inttypes.h>
#include <logging/log_ctrl.h> #include <logging/log_ctrl.h>

View file

@ -15,7 +15,7 @@
#include <kernel_structs.h> #include <kernel_structs.h>
#include <arch/cpu.h> #include <arch/cpu.h>
#include <irq.h> #include <irq.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sw_isr_table.h> #include <sw_isr_table.h>
#include <ksched.h> #include <ksched.h>
#include <kswap.h> #include <kswap.h>

View file

@ -8,7 +8,7 @@
#include <kernel.h> #include <kernel.h>
#include <arch/cpu.h> #include <arch/cpu.h>
#include <kernel_structs.h> #include <kernel_structs.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <inttypes.h> #include <inttypes.h>
#include <logging/log_ctrl.h> #include <logging/log_ctrl.h>
#include "posix_soc_if.h" #include "posix_soc_if.h"

View file

@ -7,7 +7,7 @@
#include <kernel.h> #include <kernel.h>
#include <kernel_structs.h> #include <kernel_structs.h>
#include <inttypes.h> #include <inttypes.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <logging/log_ctrl.h> #include <logging/log_ctrl.h>
const NANO_ESF _default_esf = { const NANO_ESF _default_esf = {

View file

@ -6,7 +6,7 @@
#include <toolchain.h> #include <toolchain.h>
#include <kernel_structs.h> #include <kernel_structs.h>
#include <misc/printk.h> #include <sys/printk.h>
void z_irq_spurious(void *unused) void z_irq_spurious(void *unused)
{ {

View file

@ -6,7 +6,7 @@
#include <irq.h> #include <irq.h>
#include <irq_offload.h> #include <irq_offload.h>
#include <misc/printk.h> #include <sys/printk.h>
volatile irq_offload_routine_t _offload_routine; volatile irq_offload_routine_t _offload_routine;
static volatile void *offload_param; static volatile void *offload_param;

View file

@ -16,7 +16,7 @@
#include <kernel.h> #include <kernel.h>
#include <kernel_structs.h> #include <kernel_structs.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <arch/x86/irq_controller.h> #include <arch/x86/irq_controller.h>
#include <arch/x86/segmentation.h> #include <arch/x86/segmentation.h>
#include <exception.h> #include <exception.h>

View file

@ -18,7 +18,7 @@
#include <arch/cpu.h> #include <arch/cpu.h>
#include <kernel_structs.h> #include <kernel_structs.h>
#include <sys/__assert.h> #include <sys/__assert.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <irq.h> #include <irq.h>
#include <debug/tracing.h> #include <debug/tracing.h>
#include <kswap.h> #include <kswap.h>

View file

@ -16,7 +16,7 @@
#include <toolchain.h> #include <toolchain.h>
#include <linker/sections.h> #include <linker/sections.h>
#include <kernel_structs.h> #include <kernel_structs.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <logging/log_ctrl.h> #include <logging/log_ctrl.h>
/** /**

View file

@ -21,7 +21,7 @@
#include <kernel_structs.h> #include <kernel_structs.h>
#include <wait_q.h> #include <wait_q.h>
#include <mmustructs.h> #include <mmustructs.h>
#include <misc/printk.h> #include <sys/printk.h>
/* forward declaration */ /* forward declaration */

View file

@ -8,7 +8,7 @@
#include <kernel_structs.h> #include <kernel_structs.h>
#include <inttypes.h> #include <inttypes.h>
#include <kernel_arch_data.h> #include <kernel_arch_data.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <xtensa/specreg.h> #include <xtensa/specreg.h>
#include <logging/log_ctrl.h> #include <logging/log_ctrl.h>

View file

@ -7,7 +7,7 @@
#include <string.h> #include <string.h>
#endif /* CONFIG_INIT_STACKS */ #endif /* CONFIG_INIT_STACKS */
#ifdef CONFIG_DEBUG #ifdef CONFIG_DEBUG
#include <misc/printk.h> #include <sys/printk.h>
#endif #endif
#include <kernel_structs.h> #include <kernel_structs.h>
#include <wait_q.h> #include <wait_q.h>

View file

@ -3,7 +3,7 @@
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <misc/printk.h> #include <sys/printk.h>
#include <string.h> #include <string.h>
#include <xtensa-asm2.h> #include <xtensa-asm2.h>
#include <kernel.h> #include <kernel.h>

View file

@ -7,7 +7,7 @@
#include <init.h> #include <init.h>
#include "board.h" #include "board.h"
#include <drivers/gpio.h> #include <drivers/gpio.h>
#include <misc/printk.h> #include <sys/printk.h>
static int efm32hg_slstk3400a_init(struct device *dev) static int efm32hg_slstk3400a_init(struct device *dev)
{ {

View file

@ -7,7 +7,7 @@
#include <init.h> #include <init.h>
#include "board.h" #include "board.h"
#include <drivers/gpio.h> #include <drivers/gpio.h>
#include <misc/printk.h> #include <sys/printk.h>
static int efm32pg_stk3402a_init(struct device *dev) static int efm32pg_stk3402a_init(struct device *dev)
{ {

View file

@ -7,7 +7,7 @@
#include <init.h> #include <init.h>
#include "board.h" #include "board.h"
#include <drivers/gpio.h> #include <drivers/gpio.h>
#include <misc/printk.h> #include <sys/printk.h>
static int efm32wg_stk3800_init(struct device *dev) static int efm32wg_stk3800_init(struct device *dev)
{ {

View file

@ -7,7 +7,7 @@
#include <init.h> #include <init.h>
#include "board.h" #include "board.h"
#include <drivers/gpio.h> #include <drivers/gpio.h>
#include <misc/printk.h> #include <sys/printk.h>
static int efr32_slwstk6061a_init(struct device *dev) static int efr32_slwstk6061a_init(struct device *dev)
{ {

View file

@ -6,7 +6,7 @@
#include <init.h> #include <init.h>
#include <drivers/gpio.h> #include <drivers/gpio.h>
#include <misc/printk.h> #include <sys/printk.h>
#define VDD_PWR_CTRL_GPIO_PIN 30 #define VDD_PWR_CTRL_GPIO_PIN 30
#define CCS_VDD_PWR_CTRL_GPIO_PIN 10 #define CCS_VDD_PWR_CTRL_GPIO_PIN 10

View file

@ -16,7 +16,7 @@
#include <misc/util.h> #include <misc/util.h>
#include <sys/byteorder.h> #include <sys/byteorder.h>
#include <misc/stack.h> #include <misc/stack.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <string.h> #include <string.h>
#include <bluetooth/bluetooth.h> #include <bluetooth/bluetooth.h>

View file

@ -76,7 +76,7 @@ static K_THREAD_STACK_DEFINE(spi_rx_stack, 256);
static struct k_thread spi_rx_thread_data; static struct k_thread spi_rx_thread_data;
#if defined(CONFIG_BT_DEBUG_HCI_DRIVER) #if defined(CONFIG_BT_DEBUG_HCI_DRIVER)
#include <misc/printk.h> #include <sys/printk.h>
static inline void spi_dump_message(const u8_t *pre, u8_t *buf, static inline void spi_dump_message(const u8_t *pre, u8_t *buf,
u8_t size) u8_t size)
{ {

View file

@ -10,7 +10,7 @@
#include <kernel.h> #include <kernel.h>
#include <sys/ring_buffer.h> #include <sys/ring_buffer.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <stdio.h> #include <stdio.h>
#include <drivers/ipm.h> #include <drivers/ipm.h>
#include <console/ipm_console.h> #include <console/ipm_console.h>

View file

@ -9,7 +9,7 @@
#include <errno.h> #include <errno.h>
#include <kernel.h> #include <kernel.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <drivers/ipm.h> #include <drivers/ipm.h>
#include <console/ipm_console.h> #include <console/ipm_console.h>

View file

@ -8,7 +8,7 @@
#include <kernel.h> #include <kernel.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <device.h> #include <device.h>
#include <init.h> #include <init.h>

View file

@ -10,7 +10,7 @@
#include <kernel.h> #include <kernel.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <device.h> #include <device.h>
#include <init.h> #include <init.h>
#include <SEGGER_RTT.h> #include <SEGGER_RTT.h>

View file

@ -29,7 +29,7 @@
#include <toolchain.h> #include <toolchain.h>
#include <linker/sections.h> #include <linker/sections.h>
#include <sys/atomic.h> #include <sys/atomic.h>
#include <misc/printk.h> #include <sys/printk.h>
#ifdef CONFIG_UART_CONSOLE_MCUMGR #ifdef CONFIG_UART_CONSOLE_MCUMGR
#include "mgmt/serial.h" #include "mgmt/serial.h"
#endif #endif

View file

@ -19,7 +19,7 @@ LOG_MODULE_REGISTER(uart_pipe, CONFIG_UART_CONSOLE_LOG_LEVEL);
#include <drivers/uart.h> #include <drivers/uart.h>
#include <console/uart_pipe.h> #include <console/uart_pipe.h>
#include <misc/printk.h> #include <sys/printk.h>
static struct device *uart_pipe_dev; static struct device *uart_pipe_dev;

View file

@ -16,7 +16,7 @@
#include <drivers/gpio.h> #include <drivers/gpio.h>
#include <device.h> #include <device.h>
#include <string.h> #include <string.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <display/mb_display.h> #include <display/mb_display.h>

View file

@ -13,7 +13,7 @@
#include <misc/util.h> #include <misc/util.h>
#include <errno.h> #include <errno.h>
#include <soc.h> #include <soc.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <drivers/clock_control.h> #include <drivers/clock_control.h>
#include <clock_control/stm32_clock_control.h> #include <clock_control/stm32_clock_control.h>

View file

@ -20,7 +20,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <net/ethernet.h> #include <net/ethernet.h>
#include <ethernet/eth_stats.h> #include <ethernet/eth_stats.h>
#include <soc.h> #include <soc.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <drivers/clock_control.h> #include <drivers/clock_control.h>
#include <clock_control/stm32_clock_control.h> #include <clock_control/stm32_clock_control.h>

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <misc/printk.h> #include <sys/printk.h>
#include <shell/shell.h> #include <shell/shell.h>
#include <init.h> #include <init.h>
#include <string.h> #include <string.h>

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <misc/printk.h> #include <sys/printk.h>
#include <shell/shell.h> #include <shell/shell.h>
#include <drivers/hwinfo.h> #include <drivers/hwinfo.h>
#include <zephyr/types.h> #include <zephyr/types.h>

View file

@ -13,7 +13,7 @@
#include <init.h> #include <init.h>
#include <drivers/ipm.h> #include <drivers/ipm.h>
#include <arch/cpu.h> #include <arch/cpu.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/__assert.h> #include <sys/__assert.h>
#include <errno.h> #include <errno.h>
#include "ipm_quark_se.h" #include "ipm_quark_se.h"

View file

@ -18,7 +18,7 @@
#include <device.h> #include <device.h>
#include <shell/shell.h> #include <shell/shell.h>
#include <misc/printk.h> #include <sys/printk.h>
#include "modem_receiver.h" #include "modem_receiver.h"

View file

@ -73,7 +73,7 @@
#include <kernel.h> #include <kernel.h>
#include <arch/cpu.h> #include <arch/cpu.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <toolchain.h> #include <toolchain.h>
#include <linker/sections.h> #include <linker/sections.h>

View file

@ -9,7 +9,7 @@
#include <drivers/sensor.h> #include <drivers/sensor.h>
#include <init.h> #include <init.h>
#include <drivers/gpio.h> #include <drivers/gpio.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/__assert.h> #include <sys/__assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <drivers/spi.h> #include <drivers/spi.h>

View file

@ -11,7 +11,7 @@
#include <errno.h> #include <errno.h>
#include <soc.h> #include <soc.h>
#include <drivers/watchdog.h> #include <drivers/watchdog.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <misc/reboot.h> #include <misc/reboot.h>
struct wdog_cmsdk_apb { struct wdog_cmsdk_apb {

View file

@ -27,7 +27,7 @@ LOG_MODULE_REGISTER(wifi_eswifi_core);
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <misc/printk.h> #include <sys/printk.h>
#include "eswifi.h" #include "eswifi.h"

View file

@ -22,7 +22,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <net/net_offload.h> #include <net/net_offload.h>
#include <net/wifi_mgmt.h> #include <net/wifi_mgmt.h>
#include <misc/printk.h> #include <sys/printk.h>
/* We do not need <socket/include/socket.h> /* We do not need <socket/include/socket.h>
* It seems there is a bug in ASF side: if OS is already defining sockaddr * It seems there is a bug in ASF side: if OS is already defining sockaddr

View file

@ -19,7 +19,7 @@
#include <stdbool.h> #include <stdbool.h>
#include <string.h> #include <string.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <misc/util.h> #include <misc/util.h>
#include <net/buf.h> #include <net/buf.h>
#include <bluetooth/hci.h> #include <bluetooth/hci.h>

View file

@ -30,7 +30,7 @@
#include <random/rand32.h> #include <random/rand32.h>
#include <kernel_arch_thread.h> #include <kernel_arch_thread.h>
#include <syscall.h> #include <syscall.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <arch/cpu.h> #include <arch/cpu.h>
#include <misc/rb.h> #include <misc/rb.h>
#include <sys_clock.h> #include <sys_clock.h>

View file

@ -1,94 +1,15 @@
/* printk.h - low-level debug output */
/* /*
* Copyright (c) 2010-2012, 2014 Wind River Systems, Inc. * Copyright (c) 2019 Intel Corporation
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#ifndef ZEPHYR_INCLUDE_MISC_PRINTK_H_ #ifndef ZEPHYR_INCLUDE_MISC_PRINTK_H_
#define ZEPHYR_INCLUDE_MISC_PRINTK_H_ #define ZEPHYR_INCLUDE_MISC_PRINTK_H_
#include <toolchain.h> #ifndef CONFIG_COMPAT_INCLUDES
#include <stddef.h> #warning "This header file has moved, include <sys/printk.h> instead."
#include <stdarg.h>
#include <inttypes.h>
#ifdef __cplusplus
extern "C" {
#endif #endif
/** #include <sys/printk.h>
*
* @brief Print kernel debugging message.
*
* This routine prints a kernel debugging message to the system console.
* Output is send immediately, without any mutual exclusion or buffering.
*
* A basic set of conversion specifier characters are supported:
* - signed decimal: \%d, \%i
* - unsigned decimal: \%u
* - unsigned hexadecimal: \%x (\%X is treated as \%x)
* - pointer: \%p
* - string: \%s
* - character: \%c
* - percent: \%\%
*
* Field width (with or without leading zeroes) is supported.
* Length attributes h, hh, l, ll and z are supported. However, integral
* values with %lld and %lli are only printed if they fit in a long
* otherwise 'ERR' is printed. Full 64-bit values may be printed with %llx.
* Flags and precision attributes are not supported.
*
* @param fmt Format string.
* @param ... Optional list of format arguments.
*
* @return N/A
*/
#ifdef CONFIG_PRINTK
extern __printf_like(1, 2) void printk(const char *fmt, ...);
extern __printf_like(1, 0) void vprintk(const char *fmt, va_list ap);
extern __printf_like(3, 4) int snprintk(char *str, size_t size,
const char *fmt, ...);
extern __printf_like(3, 0) int vsnprintk(char *str, size_t size,
const char *fmt, va_list ap);
extern __printf_like(3, 0) void z_vprintk(int (*out)(int f, void *c), void *ctx, #endif /* ZEPHYR_INCLUDE_MISC_PRINTK_H_ */
const char *fmt, va_list ap);
#else
static inline __printf_like(1, 2) void printk(const char *fmt, ...)
{
ARG_UNUSED(fmt);
}
static inline __printf_like(1, 0) void vprintk(const char *fmt, va_list ap)
{
ARG_UNUSED(fmt);
ARG_UNUSED(ap);
}
static inline __printf_like(3, 4) int snprintk(char *str, size_t size,
const char *fmt, ...)
{
ARG_UNUSED(str);
ARG_UNUSED(size);
ARG_UNUSED(fmt);
return 0;
}
static inline __printf_like(3, 0) int vsnprintk(char *str, size_t size,
const char *fmt, va_list ap)
{
ARG_UNUSED(str);
ARG_UNUSED(size);
ARG_UNUSED(fmt);
ARG_UNUSED(ap);
return 0;
}
#endif
#ifdef __cplusplus
}
#endif
#endif

View file

@ -80,7 +80,7 @@
#endif #endif
#if __ASSERT_ON #if __ASSERT_ON
#include <misc/printk.h> #include <sys/printk.h>
void assert_post_action(const char *file, unsigned int line); void assert_post_action(const char *file, unsigned int line);
#define __ASSERT_LOC(test) \ #define __ASSERT_LOC(test) \

94
include/sys/printk.h Normal file
View file

@ -0,0 +1,94 @@
/* printk.h - low-level debug output */
/*
* Copyright (c) 2010-2012, 2014 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_SYS_PRINTK_H_
#define ZEPHYR_INCLUDE_SYS_PRINTK_H_
#include <toolchain.h>
#include <stddef.h>
#include <stdarg.h>
#include <inttypes.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
*
* @brief Print kernel debugging message.
*
* This routine prints a kernel debugging message to the system console.
* Output is send immediately, without any mutual exclusion or buffering.
*
* A basic set of conversion specifier characters are supported:
* - signed decimal: \%d, \%i
* - unsigned decimal: \%u
* - unsigned hexadecimal: \%x (\%X is treated as \%x)
* - pointer: \%p
* - string: \%s
* - character: \%c
* - percent: \%\%
*
* Field width (with or without leading zeroes) is supported.
* Length attributes h, hh, l, ll and z are supported. However, integral
* values with %lld and %lli are only printed if they fit in a long
* otherwise 'ERR' is printed. Full 64-bit values may be printed with %llx.
* Flags and precision attributes are not supported.
*
* @param fmt Format string.
* @param ... Optional list of format arguments.
*
* @return N/A
*/
#ifdef CONFIG_PRINTK
extern __printf_like(1, 2) void printk(const char *fmt, ...);
extern __printf_like(1, 0) void vprintk(const char *fmt, va_list ap);
extern __printf_like(3, 4) int snprintk(char *str, size_t size,
const char *fmt, ...);
extern __printf_like(3, 0) int vsnprintk(char *str, size_t size,
const char *fmt, va_list ap);
extern __printf_like(3, 0) void z_vprintk(int (*out)(int f, void *c), void *ctx,
const char *fmt, va_list ap);
#else
static inline __printf_like(1, 2) void printk(const char *fmt, ...)
{
ARG_UNUSED(fmt);
}
static inline __printf_like(1, 0) void vprintk(const char *fmt, va_list ap)
{
ARG_UNUSED(fmt);
ARG_UNUSED(ap);
}
static inline __printf_like(3, 4) int snprintk(char *str, size_t size,
const char *fmt, ...)
{
ARG_UNUSED(str);
ARG_UNUSED(size);
ARG_UNUSED(fmt);
return 0;
}
static inline __printf_like(3, 0) int vsnprintk(char *str, size_t size,
const char *fmt, va_list ap)
{
ARG_UNUSED(str);
ARG_UNUSED(size);
ARG_UNUSED(fmt);
ARG_UNUSED(ap);
return 0;
}
#endif
#ifdef __cplusplus
}
#endif
#endif

View file

@ -12,7 +12,7 @@
#ifndef _ASMLANGUAGE #ifndef _ASMLANGUAGE
#include <kernel.h> #include <kernel.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/math_extras.h> #include <sys/math_extras.h>
#include <kernel_internal.h> #include <kernel_internal.h>
#include <stdbool.h> #include <stdbool.h>

View file

@ -14,7 +14,7 @@
#include <zephyr.h> #include <zephyr.h>
#include <offsets_short.h> #include <offsets_short.h>
#include <kernel.h> #include <kernel.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <misc/stack.h> #include <misc/stack.h>
#include <random/rand32.h> #include <random/rand32.h>
#include <linker/sections.h> #include <linker/sections.h>

View file

@ -18,7 +18,7 @@
#include <spinlock.h> #include <spinlock.h>
#include <kernel_structs.h> #include <kernel_structs.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/math_extras.h> #include <sys/math_extras.h>
#include <sys_clock.h> #include <sys_clock.h>
#include <drivers/timer/system_timer.h> #include <drivers/timer/system_timer.h>

View file

@ -8,7 +8,7 @@
#include <kernel.h> #include <kernel.h>
#include <string.h> #include <string.h>
#include <sys/math_extras.h> #include <sys/math_extras.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <misc/rb.h> #include <misc/rb.h>
#include <kernel_structs.h> #include <kernel_structs.h>
#include <sys/sys_io.h> #include <sys/sys_io.h>

View file

@ -8,7 +8,7 @@
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <limits.h> #include <limits.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <misc/util.h> #include <misc/util.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>

View file

@ -13,7 +13,7 @@
*/ */
#include <kernel.h> #include <kernel.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <stdarg.h> #include <stdarg.h>
#include <toolchain.h> #include <toolchain.h>
#include <linker/sections.h> #include <linker/sections.h>

View file

@ -6,7 +6,7 @@
#include <kernel.h> #include <kernel.h>
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <posix/time.h> #include <posix/time.h>
#define ACTIVE 1 #define ACTIVE 1

View file

@ -6,7 +6,7 @@
#include <zephyr.h> #include <zephyr.h>
#include <kernel.h> #include <kernel.h>
#include <misc/printk.h> #include <sys/printk.h>
/* This function will allow execute from sram region. /* This function will allow execute from sram region.

View file

@ -5,7 +5,7 @@
*/ */
#include <zephyr.h> #include <zephyr.h>
#include <misc/printk.h> #include <sys/printk.h>
u32_t var_sram2_data = 10U; u32_t var_sram2_data = 10U;
u32_t var_sram2_bss; u32_t var_sram2_bss;

View file

@ -5,7 +5,7 @@
*/ */
#include <zephyr.h> #include <zephyr.h>
#include <misc/printk.h> #include <sys/printk.h>
void function_in_sram(s32_t value) void function_in_sram(s32_t value)
{ {

View file

@ -5,7 +5,7 @@
*/ */
#include <zephyr.h> #include <zephyr.h>
#include <misc/printk.h> #include <sys/printk.h>
u32_t var_file3_sram_data = 10U; u32_t var_file3_sram_data = 10U;
u32_t var_file3_sram2_bss; u32_t var_file3_sram2_bss;

View file

@ -5,7 +5,7 @@
*/ */
#include <zephyr.h> #include <zephyr.h>
#include <misc/printk.h> #include <sys/printk.h>
void main(void) void main(void)
{ {

View file

@ -11,7 +11,7 @@
*/ */
#include <zephyr.h> #include <zephyr.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <device.h> #include <device.h>
#include <drivers/pwm.h> #include <drivers/pwm.h>

View file

@ -8,7 +8,7 @@
#include <device.h> #include <device.h>
#include <drivers/gpio.h> #include <drivers/gpio.h>
#include <misc/util.h> #include <misc/util.h>
#include <misc/printk.h> #include <sys/printk.h>
/* change this to use another GPIO port */ /* change this to use another GPIO port */
#ifndef SW0_GPIO_CONTROLLER #ifndef SW0_GPIO_CONTROLLER

View file

@ -11,7 +11,7 @@
*/ */
#include <zephyr.h> #include <zephyr.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <device.h> #include <device.h>
#include <drivers/pwm.h> #include <drivers/pwm.h>

View file

@ -11,7 +11,7 @@
*/ */
#include <zephyr.h> #include <zephyr.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <device.h> #include <device.h>
#include <drivers/pwm.h> #include <drivers/pwm.h>

View file

@ -11,7 +11,7 @@
*/ */
#include <zephyr.h> #include <zephyr.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <device.h> #include <device.h>
#include <drivers/pwm.h> #include <drivers/pwm.h>

View file

@ -7,7 +7,7 @@
#include <zephyr.h> #include <zephyr.h>
#include <device.h> #include <device.h>
#include <drivers/gpio.h> #include <drivers/gpio.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/__assert.h> #include <sys/__assert.h>
#include <string.h> #include <string.h>

View file

@ -8,7 +8,7 @@
#include <zephyr/types.h> #include <zephyr/types.h>
#include <stddef.h> #include <stddef.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <misc/util.h> #include <misc/util.h>
#include <bluetooth/bluetooth.h> #include <bluetooth/bluetooth.h>

View file

@ -10,7 +10,7 @@
#include <stddef.h> #include <stddef.h>
#include <errno.h> #include <errno.h>
#include <zephyr.h> #include <zephyr.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <bluetooth/bluetooth.h> #include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h> #include <bluetooth/hci.h>

View file

@ -10,7 +10,7 @@
#include <stddef.h> #include <stddef.h>
#include <errno.h> #include <errno.h>
#include <zephyr.h> #include <zephyr.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <bluetooth/bluetooth.h> #include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h> #include <bluetooth/hci.h>

View file

@ -10,7 +10,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <misc/util.h> #include <misc/util.h>
#include <sys/byteorder.h> #include <sys/byteorder.h>
#include <zephyr.h> #include <zephyr.h>

View file

@ -12,7 +12,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/byteorder.h> #include <sys/byteorder.h>
#include <zephyr.h> #include <zephyr.h>

View file

@ -12,7 +12,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/byteorder.h> #include <sys/byteorder.h>
#include <zephyr.h> #include <zephyr.h>

View file

@ -12,7 +12,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/byteorder.h> #include <sys/byteorder.h>
#include <zephyr.h> #include <zephyr.h>

View file

@ -12,7 +12,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/byteorder.h> #include <sys/byteorder.h>
#include <zephyr.h> #include <zephyr.h>

View file

@ -12,7 +12,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/byteorder.h> #include <sys/byteorder.h>
#include <zephyr.h> #include <zephyr.h>

View file

@ -10,7 +10,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/byteorder.h> #include <sys/byteorder.h>
#include <zephyr.h> #include <zephyr.h>

View file

@ -5,7 +5,7 @@
*/ */
#include <zephyr.h> #include <zephyr.h>
#include <misc/printk.h> #include <sys/printk.h>
void main(void) void main(void)
{ {

View file

@ -6,7 +6,7 @@
#include <zephyr/types.h> #include <zephyr/types.h>
#include <stddef.h> #include <stddef.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <misc/util.h> #include <misc/util.h>
#include <bluetooth/bluetooth.h> #include <bluetooth/bluetooth.h>

View file

@ -6,7 +6,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <misc/printk.h> #include <sys/printk.h>
#include <settings/settings.h> #include <settings/settings.h>

View file

@ -6,7 +6,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <misc/printk.h> #include <sys/printk.h>
#include <settings/settings.h> #include <settings/settings.h>

View file

@ -9,7 +9,7 @@
#include <drivers/gpio.h> #include <drivers/gpio.h>
#include <board.h> #include <board.h>
#include <soc.h> #include <soc.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <ctype.h> #include <ctype.h>
#include <drivers/gpio.h> #include <drivers/gpio.h>
#include <drivers/pwm.h> #include <drivers/pwm.h>

View file

@ -10,7 +10,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/byteorder.h> #include <sys/byteorder.h>
#include <zephyr.h> #include <zephyr.h>

View file

@ -11,7 +11,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/byteorder.h> #include <sys/byteorder.h>
#include <zephyr.h> #include <zephyr.h>

View file

@ -10,7 +10,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/byteorder.h> #include <sys/byteorder.h>
#include <zephyr.h> #include <zephyr.h>

View file

@ -11,7 +11,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/byteorder.h> #include <sys/byteorder.h>
#include <zephyr.h> #include <zephyr.h>

View file

@ -10,7 +10,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/byteorder.h> #include <sys/byteorder.h>
#include <zephyr.h> #include <zephyr.h>

View file

@ -10,7 +10,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/byteorder.h> #include <sys/byteorder.h>
#include <zephyr.h> #include <zephyr.h>

View file

@ -10,7 +10,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <sys/byteorder.h> #include <sys/byteorder.h>
#include <zephyr.h> #include <zephyr.h>

View file

@ -8,7 +8,7 @@
#include <zephyr/types.h> #include <zephyr/types.h>
#include <stddef.h> #include <stddef.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <misc/util.h> #include <misc/util.h>
#include <bluetooth/bluetooth.h> #include <bluetooth/bluetooth.h>

View file

@ -6,7 +6,7 @@
#include <string.h> #include <string.h>
#include <zephyr.h> #include <zephyr.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <drivers/gpio.h> #include <drivers/gpio.h>
#include <drivers/led.h> #include <drivers/led.h>

View file

@ -5,7 +5,7 @@
*/ */
#include <zephyr.h> #include <zephyr.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <drivers/gpio.h> #include <drivers/gpio.h>
#include <drivers/led.h> #include <drivers/led.h>

View file

@ -7,7 +7,7 @@
#include <zephyr.h> #include <zephyr.h>
#include <device.h> #include <device.h>
#include <drivers/gpio.h> #include <drivers/gpio.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <misc/util.h> #include <misc/util.h>
/* GPIO driver name */ /* GPIO driver name */

View file

@ -12,7 +12,7 @@
#include <drivers/ipm.h> #include <drivers/ipm.h>
#include <ipm/ipm_quark_se.h> #include <ipm/ipm_quark_se.h>
#include <sys/byteorder.h> #include <sys/byteorder.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <drivers/sensor.h> #include <drivers/sensor.h>
#include <zephyr.h> #include <zephyr.h>

View file

@ -7,7 +7,7 @@
#include <device.h> #include <device.h>
#include <drivers/ipm.h> #include <drivers/ipm.h>
#include <ipm/ipm_quark_se.h> #include <ipm/ipm_quark_se.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <misc/util.h> #include <misc/util.h>
#include <drivers/sensor.h> #include <drivers/sensor.h>
#include <zephyr.h> #include <zephyr.h>

View file

@ -5,7 +5,7 @@
*/ */
#include <zephyr.h> #include <zephyr.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <drivers/gpio.h> #include <drivers/gpio.h>
#include <device.h> #include <device.h>

View file

@ -5,7 +5,7 @@
*/ */
#include <zephyr.h> #include <zephyr.h>
#include <misc/printk.h> #include <sys/printk.h>
#include <drivers/gpio.h> #include <drivers/gpio.h>
#include <device.h> #include <device.h>
#include <string.h> #include <string.h>

Some files were not shown because too many files have changed in this diff Show more