| 
    Zephyr Project API 3.5.0
    
   A Scalable Open Source RTOS 
   | 
 
Data Structures | |
| struct | timer_data | 
Macros | |
| #define | DURATION 100 | 
| #define | PERIOD 50 | 
| #define | EXPIRE_TIMES 4 | 
| #define | WITHIN_ERROR(var, target, epsilon) (llabs((int64_t) ((target) - (var))) <= (epsilon)) | 
| #define | INEXACT_MS_CONVERT ((CONFIG_SYS_CLOCK_TICKS_PER_SEC % MSEC_PER_SEC) != 0) | 
| #define | BUSY_TICK_SLEW_PPM 0U | 
| #define | PPM_DIVISOR 1000000U | 
| #define | BUSY_SLEW_THRESHOLD_TICKS(_us) | 
| #define | TIMER_ASSERT(exp, tmr) | 
Functions | |
| static void | duration_expire (struct k_timer *timer) | 
| static void | duration_stop (struct k_timer *timer) | 
| K_TIMER_DEFINE (ktimer, duration_expire, duration_stop) | |
| TESTPOINT: init timer via K_TIMER_DEFINE.   | |
| static void | init_timer_data (void) | 
| static bool | interval_check (int64_t interval, int64_t desired) | 
| static void | period0_expire (struct k_timer *timer) | 
| static void | status_expire (struct k_timer *timer) | 
| static void | busy_wait_ms (int32_t ms) | 
| static void | status_stop (struct k_timer *timer) | 
| ZTEST_USER (timer_api, test_timer_duration_period) | |
| Test duration and period of Timer.   | |
| ZTEST_USER (timer_api, test_timer_restart) | |
| Test restart the timer.   | |
| ZTEST_USER (timer_api, test_timer_period_0) | |
| Test Timer with zero period value.   | |
| ZTEST_USER (timer_api, test_timer_period_k_forever) | |
| Test Timer with K_FOREVER period value.   | |
| ZTEST_USER (timer_api, test_timer_expirefn_null) | |
| Test Timer without any timer expiry callback function.   | |
| static void | tick_sync (void) | 
| ZTEST_USER (timer_api, test_timer_periodicity) | |
| Test to check timer periodicity.   | |
| ZTEST_USER (timer_api, test_timer_status_get) | |
| Test Timer status and time remaining before next expiry.   | |
| ZTEST_USER (timer_api, test_timer_status_get_anytime) | |
| Test Timer status randomly after certain duration.   | |
| ZTEST_USER (timer_api, test_timer_status_sync) | |
| Test Timer thread synchronization.   | |
| ZTEST_USER (timer_api, test_timer_k_define) | |
| Test statically defined Timer init.   | |
| static void | user_data_timer_handler (struct k_timer *timer) | 
| K_TIMER_DEFINE (timer0, user_data_timer_handler, NULL) | |
| K_TIMER_DEFINE (timer1, user_data_timer_handler, NULL) | |
| K_TIMER_DEFINE (timer2, user_data_timer_handler, NULL) | |
| K_TIMER_DEFINE (timer3, user_data_timer_handler, NULL) | |
| K_TIMER_DEFINE (timer4, user_data_timer_handler, NULL) | |
| ZTEST_USER (timer_api, test_timer_user_data) | |
| Test user-specific data associated with timer.   | |
| ZTEST_USER (timer_api, test_timer_remaining) | |
| Test accuracy of k_timer_remaining_get()   | |
| ZTEST_USER (timer_api, test_timeout_abs) | |
| ZTEST_USER (timer_api, test_sleep_abs) | |
| static void | timer_init (struct k_timer *timer, k_timer_expiry_t expiry_fn, k_timer_stop_t stop_fn) | 
| void * | setup_timer_api (void) | 
| ZTEST_SUITE (timer_api, NULL, setup_timer_api, NULL, NULL, NULL) | |
Variables | |
| static struct k_timer | duration_timer | 
| static struct k_timer | period0_timer | 
| static struct k_timer | expire_timer | 
| static struct k_timer | sync_timer | 
| static struct k_timer | periodicity_timer | 
| static struct k_timer | status_timer | 
| static struct k_timer | status_anytime_timer | 
| static struct k_timer | status_sync_timer | 
| static struct k_timer | remain_timer | 
| static ZTEST_BMEM struct timer_data | tdata | 
| static ZTEST_DMEM struct k_timer * | user_data_timer [5] | 
| static const intptr_t | user_data [5] = { 0x1337, 0xbabe, 0xd00d, 0xdeaf, 0xfade } | 
| static ZTEST_BMEM int | user_data_correct [5] | 
| #define BUSY_SLEW_THRESHOLD_TICKS | ( | _us | ) | 
| #define BUSY_TICK_SLEW_PPM 0U | 
| #define DURATION 100 | 
| #define EXPIRE_TIMES 4 | 
| #define INEXACT_MS_CONVERT ((CONFIG_SYS_CLOCK_TICKS_PER_SEC % MSEC_PER_SEC) != 0) | 
| #define PERIOD 50 | 
| #define PPM_DIVISOR 1000000U | 
| #define TIMER_ASSERT | ( | exp, | |
| tmr | |||
| ) | 
      
  | 
  static | 
      
  | 
  static | 
TESTPOINT: expire function
      
  | 
  static | 
      
  | 
  static | 
| K_TIMER_DEFINE | ( | ktimer | , | 
| duration_expire | , | ||
| duration_stop | |||
| ) | 
TESTPOINT: init timer via K_TIMER_DEFINE.
| K_TIMER_DEFINE | ( | timer0 | , | 
| user_data_timer_handler | , | ||
| NULL | |||
| ) | 
| K_TIMER_DEFINE | ( | timer1 | , | 
| user_data_timer_handler | , | ||
| NULL | |||
| ) | 
| K_TIMER_DEFINE | ( | timer2 | , | 
| user_data_timer_handler | , | ||
| NULL | |||
| ) | 
| K_TIMER_DEFINE | ( | timer3 | , | 
| user_data_timer_handler | , | ||
| NULL | |||
| ) | 
| K_TIMER_DEFINE | ( | timer4 | , | 
| user_data_timer_handler | , | ||
| NULL | |||
| ) | 
      
  | 
  static | 
| void * setup_timer_api | ( | void | ) | 
      
  | 
  static | 
TESTPOINT: status get upon timer expired
TESTPOINT: remaining get upon timer expired
      
  | 
  static | 
TESTPOINT: remaining get upon timer stopped
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
| ZTEST_SUITE | ( | timer_api | , | 
| NULL | , | ||
| setup_timer_api | , | ||
| NULL | , | ||
| NULL | , | ||
| NULL | |||
| ) | 
| ZTEST_USER | ( | timer_api | , | 
| test_sleep_abs | |||
| ) | 
| ZTEST_USER | ( | timer_api | , | 
| test_timeout_abs | |||
| ) | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static |