Home
last modified time | relevance | path

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

/Zephyr-Core-3.5.0/tests/drivers/counter/counter_nrf_rtc/fixed_top/src/
Dtest_counter_fixed_top.c71 struct counter_top_cfg top_cfg = { in test_set_custom_top_value_fails_on_instance() local
76 top_cfg.ticks = counter_get_max_top_value(dev) - 1; in test_set_custom_top_value_fails_on_instance()
78 err = counter_set_top_value(dev, &top_cfg); in test_set_custom_top_value_fails_on_instance()
98 struct counter_top_cfg top_cfg = { in test_top_handler_on_instance() local
103 top_cfg.ticks = counter_get_max_top_value(dev); in test_top_handler_on_instance()
105 err = counter_set_top_value(dev, &top_cfg); in test_top_handler_on_instance()
/Zephyr-Core-3.5.0/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-Core-3.5.0/drivers/counter/
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()
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()
Dcounter_timer_shell.c152 struct counter_top_cfg top_cfg; in cmd_timer_periodic() local
171 top_cfg.flags = 0; in cmd_timer_periodic()
172 top_cfg.ticks = counter_us_to_ticks(timer_dev, (uint64_t)delay); in cmd_timer_periodic()
174 top_cfg.callback = timer_top_handler; in cmd_timer_periodic()
175 top_cfg.user_data = NULL; in cmd_timer_periodic()
178 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.c539 struct counter_top_cfg top_cfg = { in init_rtc() local
554 err = set_top_value(dev, &top_cfg); in init_rtc()
/Zephyr-Core-3.5.0/tests/drivers/counter/counter_basic_api/src/
Dtest_counter.c140 struct counter_top_cfg top_cfg = { in counter_tear_down_instance() local
146 top_cfg.ticks = counter_get_max_top_value(dev); in counter_tear_down_instance()
147 err = counter_set_top_value(dev, &top_cfg); in counter_tear_down_instance()
150 top_cfg.flags = COUNTER_TOP_CFG_DONT_RESET; in counter_tear_down_instance()
151 err = counter_set_top_value(dev, &top_cfg); in counter_tear_down_instance()
222 struct counter_top_cfg top_cfg = { in test_set_top_value_with_alarm_instance() local
232 top_cfg.ticks = counter_us_to_ticks(dev, counter_period_us); in test_set_top_value_with_alarm_instance()
249 err = counter_set_top_value(dev, &top_cfg); in test_set_top_value_with_alarm_instance()
274 struct counter_top_cfg top_cfg = { in test_set_top_value_without_alarm_instance() local
281 top_cfg.ticks = counter_us_to_ticks(dev, counter_period_us); in test_set_top_value_without_alarm_instance()
[all …]
/Zephyr-Core-3.5.0/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()
/Zephyr-Core-3.5.0/tests/drivers/adc/adc_dma/src/
Dtest_adc.c127 struct counter_top_cfg top_cfg = { .callback = NULL, in init_counter() local
134 top_cfg.ticks = counter_us_to_ticks(dev, HW_TRIGGER_INTERVAL); in init_counter()
135 err = counter_set_top_value(dev, &top_cfg); in init_counter()