Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
main.c File Reference
#include <ztest.h>
#include <pm/pm.h>
#include <irq_offload.h>
#include <debug/stack.h>

Macros

#define SLEEP_MS   100
 
#define NUM_OF_WORK   2
 
#define TEST_STRING   "TEST"
 

Functions

static void tdata_dump_callback (const struct k_thread *thread, void *user_data)
 
struct pm_state_info pm_policy_next_state (int32_t ticks)
 Function to get the next PM state. More...
 
static void work_handler (struct k_work *w)
 
void test_call_stacks_analyze_main (void)
 Test stack usage through main thread. More...
 
void test_call_stacks_analyze_idle (void)
 Test stack usage through idle thread. More...
 
void test_call_stacks_analyze_workq (void)
 Test stack usage through system workqueue. More...
 
void test_main (void)
 

Variables

static struct k_work work [2]
 
static struct k_sem sync_sema
 

Macro Definition Documentation

◆ NUM_OF_WORK

#define NUM_OF_WORK   2

◆ SLEEP_MS

#define SLEEP_MS   100

◆ TEST_STRING

#define TEST_STRING   "TEST"

Function Documentation

◆ pm_policy_next_state()

struct pm_state_info pm_policy_next_state ( int32_t  ticks)

Function to get the next PM state.

This function is called by the power subsystem when the system is idle and returns the most appropriate state based on the number of ticks to the next event.

Parameters
ticksThe number of ticks to the next scheduled event.
Returns
The power state the system should use.

◆ tdata_dump_callback()

static void tdata_dump_callback ( const struct k_thread thread,
void user_data 
)
static

TESTPOINT: stack analyze

◆ test_main()

void test_main ( void  )

test case main entry

◆ work_handler()

static void work_handler ( struct k_work w)
static

Variable Documentation

◆ sync_sema

struct k_sem sync_sema
static

◆ work

struct k_work work[2]
static