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

Data Structures

struct  timer_data
 

Macros

#define ALIGN_MS_BOUNDARY
 
#define DURATION   100
 
#define LESS_DURATION   80
 

Functions

static void duration_expire (struct k_timer *timer)
 
static void stop_expire (struct k_timer *timer)
 
 K_TIMER_DEFINE (ktimer, duration_expire, stop_expire)
 
void test_clock_uptime (void)
 Test clock uptime APIs functionality. More...
 
void test_clock_cycle (void)
 Test clock cycle functionality. More...
 
static void init_data_count (void)
 
void test_ms_time_duration (void)
 Test millisecond time duration. More...
 

Variables

static ZTEST_BMEM struct timer_data tdata
 

Macro Definition Documentation

◆ ALIGN_MS_BOUNDARY

#define ALIGN_MS_BOUNDARY
Value:
do { \
uint32_t t = k_uptime_get_32(); \
while (t == k_uptime_get_32()) \
; \
} while (0)
static uint32_t k_uptime_get_32(void)
Get system uptime (32-bit version).
Definition: kernel.h:1602
struct k_thread t
Definition: kobject.c:1316

◆ DURATION

#define DURATION   100

◆ LESS_DURATION

#define LESS_DURATION   80

Function Documentation

◆ K_TIMER_DEFINE()

K_TIMER_DEFINE ( ktimer  ,
duration_expire  ,
stop_expire   
)

TESTPOINT: init timer via K_TIMER_DEFINE

Variable Documentation

◆ tdata

ZTEST_BMEM struct timer_data tdata
static