/Zephyr-latest/tests/drivers/counter/counter_nrf_rtc/fixed_top/src/ |
D | test_counter_fixed_top.c | 72 struct counter_top_cfg top_cfg = { in test_set_custom_top_value_fails_on_instance() local 77 top_cfg.ticks = counter_get_max_top_value(dev) - 1; in test_set_custom_top_value_fails_on_instance() 79 err = counter_set_top_value(dev, &top_cfg); in test_set_custom_top_value_fails_on_instance() 99 struct counter_top_cfg top_cfg = { in test_top_handler_on_instance() local 110 top_cfg.ticks = counter_get_max_top_value(dev); in test_top_handler_on_instance() 112 err = counter_set_top_value(dev, &top_cfg); in test_top_handler_on_instance()
|
/Zephyr-latest/tests/drivers/counter/maxim_ds3231_api/src/ |
D | test_counter.c | 43 struct counter_top_cfg top_cfg = { in counter_tear_down_instance() local 49 top_cfg.ticks = counter_get_max_top_value(dev); in counter_tear_down_instance() 50 err = counter_set_top_value(dev, &top_cfg); in counter_tear_down_instance() 53 top_cfg.flags = COUNTER_TOP_CFG_DONT_RESET; in counter_tear_down_instance() 54 err = counter_set_top_value(dev, &top_cfg); in counter_tear_down_instance() 117 struct counter_top_cfg top_cfg = { in test_set_top_value_with_alarm_instance() local 125 top_cfg.ticks = counter_us_to_ticks(dev, COUNTER_PERIOD_US); in test_set_top_value_with_alarm_instance() 142 err = counter_set_top_value(dev, &top_cfg); in test_set_top_value_with_alarm_instance() 165 struct counter_top_cfg top_cfg = { in test_set_top_value_without_alarm_instance() local 171 top_cfg.ticks = counter_us_to_ticks(dev, COUNTER_PERIOD_US); in test_set_top_value_without_alarm_instance() [all …]
|
/Zephyr-latest/drivers/counter/ |
D | timer_dtmr_cmsdk_apb.c | 76 const struct counter_top_cfg *top_cfg) in dtmr_cmsdk_apb_set_top_value() argument 81 data->top_callback = top_cfg->callback; in dtmr_cmsdk_apb_set_top_value() 82 data->top_user_data = top_cfg->user_data; in dtmr_cmsdk_apb_set_top_value() 85 data->load = top_cfg->ticks; in dtmr_cmsdk_apb_set_top_value() 88 if (top_cfg->flags & COUNTER_TOP_CFG_DONT_RESET) { in dtmr_cmsdk_apb_set_top_value() 93 cfg->dtimer->timer1bgload = top_cfg->ticks; in dtmr_cmsdk_apb_set_top_value() 99 cfg->dtimer->timer1load = top_cfg->ticks; in dtmr_cmsdk_apb_set_top_value()
|
D | timer_tmr_cmsdk_apb.c | 76 const struct counter_top_cfg *top_cfg) in tmr_cmsdk_apb_set_top_value() argument 83 if (top_cfg->flags & COUNTER_TOP_CFG_DONT_RESET) { in tmr_cmsdk_apb_set_top_value() 87 data->top_callback = top_cfg->callback; in tmr_cmsdk_apb_set_top_value() 88 data->top_user_data = top_cfg->user_data; in tmr_cmsdk_apb_set_top_value() 91 data->load = top_cfg->ticks; in tmr_cmsdk_apb_set_top_value() 94 cfg->timer->value = top_cfg->ticks; in tmr_cmsdk_apb_set_top_value() 97 cfg->timer->reload = top_cfg->ticks; in tmr_cmsdk_apb_set_top_value()
|
D | counter_timer_shell.c | 158 struct counter_top_cfg top_cfg; in cmd_timer_periodic() local 175 top_cfg.flags = 0; in cmd_timer_periodic() 176 top_cfg.ticks = counter_us_to_ticks(timer_dev, (uint64_t)delay); in cmd_timer_periodic() 178 top_cfg.callback = timer_top_handler; in cmd_timer_periodic() 179 top_cfg.user_data = NULL; in cmd_timer_periodic() 182 err = counter_set_top_value(timer_dev, &top_cfg); in cmd_timer_periodic()
|
D | counter_dw_timer.c | 163 const struct counter_top_cfg *top_cfg) in counter_dw_timer_set_top_value() argument 169 if (top_cfg == NULL) { in counter_dw_timer_set_top_value() 175 if (top_cfg->flags & COUNTER_TOP_CFG_DONT_RESET) { in counter_dw_timer_set_top_value() 189 if (!top_cfg->callback) { in counter_dw_timer_set_top_value() 197 data->top_cb = top_cfg->callback; in counter_dw_timer_set_top_value() 198 data->prv_data = top_cfg->user_data; in counter_dw_timer_set_top_value() 207 sys_write32(top_cfg->ticks, reg_base + LOADCOUNT_OFST); in counter_dw_timer_set_top_value()
|
D | counter_sam0_tc32.c | 237 const struct counter_top_cfg *top_cfg) in counter_sam0_tc32_set_top_value() argument 250 if (top_cfg->callback) { in counter_sam0_tc32_set_top_value() 251 data->top_cb = top_cfg->callback; in counter_sam0_tc32_set_top_value() 252 data->top_user_data = top_cfg->user_data; in counter_sam0_tc32_set_top_value() 258 tc->CC[0].reg = top_cfg->ticks; in counter_sam0_tc32_set_top_value() 260 if (top_cfg->flags & COUNTER_TOP_CFG_DONT_RESET) { in counter_sam0_tc32_set_top_value() 265 if (counter_sam0_tc32_read(dev) >= top_cfg->ticks) { in counter_sam0_tc32_set_top_value() 267 if (top_cfg->flags & COUNTER_TOP_CFG_RESET_WHEN_LATE) { in counter_sam0_tc32_set_top_value()
|
D | counter_sam_tc.c | 219 const struct counter_top_cfg *top_cfg) in counter_sam_tc_set_top_value() argument 236 data->top_cb = top_cfg->callback; in counter_sam_tc_set_top_value() 237 data->top_user_data = top_cfg->user_data; in counter_sam_tc_set_top_value() 239 tc_ch->TC_RC = top_cfg->ticks; in counter_sam_tc_set_top_value() 241 if ((top_cfg->flags & COUNTER_TOP_CFG_DONT_RESET) != 0) { in counter_sam_tc_set_top_value() 242 if (tc_ch->TC_CV >= top_cfg->ticks) { in counter_sam_tc_set_top_value() 244 if ((top_cfg->flags & COUNTER_TOP_CFG_RESET_WHEN_LATE) != 0) { in counter_sam_tc_set_top_value()
|
D | counter_renesas_rz_gtm.c | 344 const struct counter_top_cfg *top_cfg) in counter_rz_gtm_set_top_value() argument 352 if (!top_cfg) { in counter_rz_gtm_set_top_value() 363 if (!data->is_periodic && top_cfg->ticks == RZ_GTM_TOP_VALUE) { in counter_rz_gtm_set_top_value() 367 if (top_cfg->ticks == RZ_GTM_TOP_VALUE) { in counter_rz_gtm_set_top_value() 383 data->top_cb = top_cfg->callback; in counter_rz_gtm_set_top_value() 384 data->user_data = top_cfg->user_data; in counter_rz_gtm_set_top_value() 385 data->top_val = top_cfg->ticks; in counter_rz_gtm_set_top_value() 417 if (top_cfg->flags & COUNTER_TOP_CFG_DONT_RESET) { in counter_rz_gtm_set_top_value() 423 if (top_cfg->flags & COUNTER_TOP_CFG_RESET_WHEN_LATE) { in counter_rz_gtm_set_top_value()
|
D | counter_nrfx_rtc.c | 549 struct counter_top_cfg top_cfg = { in init_rtc() local 572 err = set_top_value(dev, &top_cfg); in init_rtc()
|
/Zephyr-latest/tests/drivers/counter/counter_basic_api/src/ |
D | test_counter.c | 177 struct counter_top_cfg top_cfg = { in counter_tear_down_instance() local 183 top_cfg.ticks = counter_get_max_top_value(dev); in counter_tear_down_instance() 184 err = counter_set_top_value(dev, &top_cfg); in counter_tear_down_instance() 187 top_cfg.flags = COUNTER_TOP_CFG_DONT_RESET; in counter_tear_down_instance() 188 err = counter_set_top_value(dev, &top_cfg); in counter_tear_down_instance() 265 struct counter_top_cfg top_cfg = { in test_set_top_value_with_alarm_instance() local 275 top_cfg.ticks = counter_us_to_ticks(dev, counter_period_us); in test_set_top_value_with_alarm_instance() 292 err = counter_set_top_value(dev, &top_cfg); in test_set_top_value_with_alarm_instance() 317 struct counter_top_cfg top_cfg = { in test_set_top_value_without_alarm_instance() local 324 top_cfg.ticks = counter_us_to_ticks(dev, counter_period_us); in test_set_top_value_without_alarm_instance() [all …]
|
/Zephyr-latest/drivers/timer/ |
D | mcux_os_timer.c | 95 struct counter_top_cfg top_cfg = { 0 }; in mcux_lpc_ostick_set_counter_timeout() local 101 top_cfg.ticks = ticks; in mcux_lpc_ostick_set_counter_timeout() 102 top_cfg.callback = NULL; in mcux_lpc_ostick_set_counter_timeout() 103 top_cfg.user_data = NULL; in mcux_lpc_ostick_set_counter_timeout() 104 top_cfg.flags = 0; in mcux_lpc_ostick_set_counter_timeout() 105 if (counter_set_top_value(counter_dev, &top_cfg) != 0) { in mcux_lpc_ostick_set_counter_timeout()
|
/Zephyr-latest/tests/drivers/adc/adc_api/src/ |
D | test_adc.c | 71 struct counter_top_cfg top_cfg = { .callback = NULL, in init_counter() local 78 top_cfg.ticks = counter_us_to_ticks(dev, CONFIG_ADC_API_SAMPLE_INTERVAL_US); in init_counter() 79 err = counter_set_top_value(dev, &top_cfg); in init_counter()
|
/Zephyr-latest/tests/drivers/uart/uart_mix_fifo_poll/src/ |
D | main.c | 327 struct counter_top_cfg top_cfg = { in ZTEST() local 354 top_cfg.ticks = counter_us_to_ticks(counter_dev, 1000); in ZTEST() 356 err = counter_set_top_value(counter_dev, &top_cfg); in ZTEST()
|