Home
last modified time | relevance | path

Searched refs:top_cfg (Results 1 – 13 of 13) sorted by relevance

/Zephyr-latest/tests/drivers/counter/counter_nrf_rtc/fixed_top/src/
Dtest_counter_fixed_top.c72 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/
Dtest_counter.c43 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/
Dtimer_dtmr_cmsdk_apb.c76 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()
Dtimer_tmr_cmsdk_apb.c76 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()
Dcounter_timer_shell.c158 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()
Dcounter_dw_timer.c163 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()
Dcounter_sam0_tc32.c239 const struct counter_top_cfg *top_cfg) in counter_sam0_tc32_set_top_value() argument
252 if (top_cfg->callback) { in counter_sam0_tc32_set_top_value()
253 data->top_cb = top_cfg->callback; in counter_sam0_tc32_set_top_value()
254 data->top_user_data = top_cfg->user_data; in counter_sam0_tc32_set_top_value()
260 tc->CC[0].reg = top_cfg->ticks; in counter_sam0_tc32_set_top_value()
262 if (top_cfg->flags & COUNTER_TOP_CFG_DONT_RESET) { in counter_sam0_tc32_set_top_value()
267 if (counter_sam0_tc32_read(dev) >= top_cfg->ticks) { in counter_sam0_tc32_set_top_value()
269 if (top_cfg->flags & COUNTER_TOP_CFG_RESET_WHEN_LATE) { in counter_sam0_tc32_set_top_value()
Dcounter_sam_tc.c219 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()
Dcounter_nrfx_rtc.c549 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/
Dtest_counter.c174 struct counter_top_cfg top_cfg = { in counter_tear_down_instance() local
180 top_cfg.ticks = counter_get_max_top_value(dev); in counter_tear_down_instance()
181 err = counter_set_top_value(dev, &top_cfg); in counter_tear_down_instance()
184 top_cfg.flags = COUNTER_TOP_CFG_DONT_RESET; in counter_tear_down_instance()
185 err = counter_set_top_value(dev, &top_cfg); in counter_tear_down_instance()
262 struct counter_top_cfg top_cfg = { in test_set_top_value_with_alarm_instance() local
272 top_cfg.ticks = counter_us_to_ticks(dev, counter_period_us); in test_set_top_value_with_alarm_instance()
289 err = counter_set_top_value(dev, &top_cfg); in test_set_top_value_with_alarm_instance()
314 struct counter_top_cfg top_cfg = { in test_set_top_value_without_alarm_instance() local
321 top_cfg.ticks = counter_us_to_ticks(dev, counter_period_us); in test_set_top_value_without_alarm_instance()
[all …]
/Zephyr-latest/drivers/timer/
Dmcux_os_timer.c88 struct counter_top_cfg top_cfg = { 0 }; in mcux_lpc_ostick_set_counter_timeout() local
95 top_cfg.ticks = ticks; in mcux_lpc_ostick_set_counter_timeout()
96 top_cfg.callback = NULL; in mcux_lpc_ostick_set_counter_timeout()
97 top_cfg.user_data = NULL; in mcux_lpc_ostick_set_counter_timeout()
98 top_cfg.flags = 0; in mcux_lpc_ostick_set_counter_timeout()
99 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/
Dtest_adc.c64 struct counter_top_cfg top_cfg = { .callback = NULL, in init_counter() local
71 top_cfg.ticks = counter_us_to_ticks(dev, CONFIG_ADC_API_SAMPLE_INTERVAL_US); in init_counter()
72 err = counter_set_top_value(dev, &top_cfg); in init_counter()
/Zephyr-latest/tests/drivers/uart/uart_mix_fifo_poll/src/
Dmain.c134 struct counter_top_cfg top_cfg = { in init_test() local
157 top_cfg.ticks = counter_us_to_ticks(counter_dev, 1000); in init_test()
159 err = counter_set_top_value(counter_dev, &top_cfg); in init_test()