Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
clock.c File Reference
#include <zephyr/ztest.h>

Data Structures

struct  timer_data
 

Macros

#define ALIGN_MS_BOUNDARY
 
#define DURATION   100
 
#define LESS_DURATION   70
 

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)
 TESTPOINT: init timer via K_TIMER_DEFINE.
 
 ZTEST_USER (clock, test_clock_uptime)
 Test clock uptime APIs functionality.
 
 ZTEST (clock, test_clock_cycle_32)
 Test 32-bit clock cycle functionality.
 
 ZTEST (clock, test_clock_cycle_64)
 Test 64-bit clock cycle functionality.
 
static void init_data_count (void)
 
 ZTEST (clock, test_ms_time_duration)
 Test millisecond time duration.
 
void * common_setup (void)
 
 ZTEST_SUITE (clock, NULL, common_setup, NULL, NULL, NULL)
 

Variables

static ZTEST_BMEM struct timer_data tdata
 

Macro Definition Documentation

◆ ALIGN_MS_BOUNDARY

#define ALIGN_MS_BOUNDARY
Value:
do { \
while (t == k_uptime_get_32()) \
Z_SPIN_DELAY(50); \
} while (0)
static uint32_t k_uptime_get_32(void)
Get system uptime (32-bit version).
Definition kernel.h:1775
struct k_thread t
Definition kobject.c:1324
__UINT32_TYPE__ uint32_t
Definition stdint.h:90

◆ DURATION

#define DURATION   100

◆ LESS_DURATION

#define LESS_DURATION   70

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