Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include <zephyr/kernel.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/tc_util.h>
#include <zephyr/ztest.h>
Functions | |
static void | timer_period_fn (struct k_timer *t) |
static void | collect_timer_period_time_samples (void) |
static void | timer_startdelay_fn (struct k_timer *t) |
static void | collect_timer_startdelay_time_samples (void) |
static uint64_t | periodic_diff (uint64_t later, uint64_t earlier) |
static double | cycles_to_us (uint64_t cycles) |
static void | do_test_using (void(*sample_collection_fn)(void), const char *mechanism) |
Test a timers jitter and drift over time. | |
ZTEST (timer_jitter_drift, test_jitter_drift_timer_period) | |
ZTEST (timer_jitter_drift, test_jitter_drift_timer_startdelay) | |
ZTEST_SUITE (timer_jitter_drift, NULL, NULL, NULL, NULL, NULL) | |
Variables | |
static uint32_t | periodic_idx |
static uint64_t | periodic_data [CONFIG_TIMER_TEST_SAMPLES+1] |
static uint64_t | periodic_start |
static uint64_t | periodic_end |
static struct k_timer | periodic_timer |
static struct k_sem | periodic_sem |
|
static |
|
static |
|
static |
|
static |
Test a timers jitter and drift over time.
|
static |
|
static |
ZTEST | ( | timer_jitter_drift | , |
test_jitter_drift_timer_period | |||
) |
ZTEST | ( | timer_jitter_drift | , |
test_jitter_drift_timer_startdelay | |||
) |
ZTEST_SUITE | ( | timer_jitter_drift | , |
NULL | , | ||
NULL | , | ||
NULL | , | ||
NULL | , | ||
NULL | |||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |