Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
main.c File Reference
#include <zephyr.h>
#include <device.h>
#include <ztest.h>

Macros

#define SYS_INIT_CREATE(level)
 

Functions

void test_k_busy_wait (void)
 
static void timeout_handler (struct k_timer *timer)
 
 K_TIMER_DEFINE (timer, timeout_handler, NULL)
 
void test_irq_locking (void)
 
void test_cpu_idle (void)
 
 FOR_EACH (SYS_INIT_CREATE,(;), PRE_KERNEL_1, PRE_KERNEL_2, POST_KERNEL)
 
void test_sys_init (void)
 
void test_main (void)
 

Variables

static int init_order
 
static int sys_init_result
 

Macro Definition Documentation

◆ SYS_INIT_CREATE

#define SYS_INIT_CREATE (   level)
Value:
static int pre_kernel_##level##_init_func(const struct device *dev) \
{ \
ARG_UNUSED(dev); \
if (init_order != _SYS_INIT_LEVEL_##level && sys_init_result == 0) { \
sys_init_result = -1; \
return -EIO; \
} \
init_order++; \
return 0;\
} \
SYS_INIT(pre_kernel_##level##_init_func, level, 0)
#define EIO
Definition: errno.h:44
Runtime device structure (in ROM) per driver instance.
Definition: device.h:367
static int init_order
Definition: main.c:91
static int sys_init_result
Definition: main.c:92

Function Documentation

◆ FOR_EACH()

FOR_EACH ( SYS_INIT_CREATE  ,
(;)  ,
PRE_KERNEL_1  ,
PRE_KERNEL_2  ,
POST_KERNEL   
)

◆ K_TIMER_DEFINE()

K_TIMER_DEFINE ( timer  ,
timeout_handler  ,
NULL   
)

◆ test_cpu_idle()

void test_cpu_idle ( void  )

◆ test_irq_locking()

void test_irq_locking ( void  )

◆ test_k_busy_wait()

void test_k_busy_wait ( void  )

◆ test_main()

void test_main ( void  )

test case main entry

◆ test_sys_init()

void test_sys_init ( void  )

◆ timeout_handler()

static void timeout_handler ( struct k_timer *  timer)
static

Variable Documentation

◆ init_order

int init_order
static

◆ sys_init_result

int sys_init_result
static