/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 | 239 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()
|
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_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 | 174 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/ |
D | mcux_os_timer.c | 88 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/ |
D | test_adc.c | 64 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/ |
D | main.c | 134 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()
|