Home
last modified time | relevance | path

Searched refs:alarm (Results 1 – 25 of 49) sorted by relevance

12

/Zephyr-latest/samples/drivers/counter/alarm/
DREADME.rst1 .. zephyr:code-sample:: alarm
5 Implement an alarm application using the counter API.
9 This sample provides an example of alarm application using :ref:`counter API <counter_api>`.
10 It sets an alarm with an initial delay of 2 seconds. At each alarm
11 expiry, a new alarm is configured with a delay multiplied by 2.
20 This sample requires the support of a timer IP compatible with alarm setting.
31 :zephyr-app: samples/drivers/counter/alarm
42 Counter alarm sample
44 Set alarm in 2 sec
47 Set alarm in 4 sec
[all …]
DKconfig1 # Config for counter alarm sample
/Zephyr-latest/drivers/rtc/
Drtc_emul.c148 struct rtc_emul_alarm *alarm; in rtc_emul_test_alarms() local
151 alarm = &data->alarms[i]; in rtc_emul_test_alarms()
153 if (alarm->mask == 0) { in rtc_emul_test_alarms()
157 if ((alarm->mask & RTC_ALARM_TIME_MASK_SECOND) && in rtc_emul_test_alarms()
158 (alarm->datetime.tm_sec != data->datetime.tm_sec)) { in rtc_emul_test_alarms()
162 if ((alarm->mask & RTC_ALARM_TIME_MASK_MINUTE) && in rtc_emul_test_alarms()
163 (alarm->datetime.tm_min != data->datetime.tm_min)) { in rtc_emul_test_alarms()
167 if ((alarm->mask & RTC_ALARM_TIME_MASK_HOUR) && in rtc_emul_test_alarms()
168 (alarm->datetime.tm_hour != data->datetime.tm_hour)) { in rtc_emul_test_alarms()
172 if ((alarm->mask & RTC_ALARM_TIME_MASK_MONTHDAY) && in rtc_emul_test_alarms()
[all …]
Drtc_rpi_pico.c177 const struct rtc_time *alarm) in rtc_rpi_pico_alarm_set_time() argument
189 if (!rtc_utils_validate_rtc_time(alarm, mask)) { in rtc_rpi_pico_alarm_set_time()
210 ((alarm->tm_year + TM_YEAR_REF) << RTC_IRQ_SETUP_0_YEAR_LSB)); in rtc_rpi_pico_alarm_set_time()
215 (alarm->tm_mon << RTC_IRQ_SETUP_0_MONTH_LSB)); in rtc_rpi_pico_alarm_set_time()
220 ((alarm->tm_mday + 1) << RTC_IRQ_SETUP_0_DAY_LSB)); in rtc_rpi_pico_alarm_set_time()
225 (alarm->tm_wday << RTC_IRQ_SETUP_1_DOTW_LSB)); in rtc_rpi_pico_alarm_set_time()
230 (alarm->tm_hour << RTC_IRQ_SETUP_1_HOUR_LSB)); in rtc_rpi_pico_alarm_set_time()
235 (alarm->tm_min << RTC_IRQ_SETUP_1_MIN_LSB)); in rtc_rpi_pico_alarm_set_time()
240 (alarm->tm_sec << RTC_IRQ_SETUP_1_SEC_LSB)); in rtc_rpi_pico_alarm_set_time()
242 data->alarm_time = *alarm; in rtc_rpi_pico_alarm_set_time()
Drtc_xmc4xxx.c156 int alarm = 0; in rtc_xmc4xxx_alarm_is_pending() local
167 alarm = 1; in rtc_xmc4xxx_alarm_is_pending()
172 return alarm; in rtc_xmc4xxx_alarm_is_pending()
/Zephyr-latest/tests/kernel/sched/wraparound/src/
Dmain.c16 K_TIMER_DEFINE(alarm, alarm_callback, NULL);
31 k_timer_start(&alarm, K_TICKS(wakeup_ticks), K_FOREVER); in ZTEST()
38 k_timer_stop(&alarm); in ZTEST()
/Zephyr-latest/drivers/counter/
Dcounter_gecko_stimer.c59 struct counter_gecko_alarm_data alarm[STIMER_ALARM_NUM]; member
203 dev_data->alarm[chan_id].ticks = top_val + (alarm_cfg->ticks - now_ticks); in counter_gecko_set_alarm()
205 dev_data->alarm[chan_id].ticks = in counter_gecko_set_alarm()
211 dev_data->alarm[chan_id].ticks = alarm_cfg->ticks; in counter_gecko_set_alarm()
214 dev_data->alarm[chan_id].callback = alarm_cfg->callback; in counter_gecko_set_alarm()
215 dev_data->alarm[chan_id].chan_id = chan_id; in counter_gecko_set_alarm()
216 dev_data->alarm[chan_id].dev = (struct device *)dev; in counter_gecko_set_alarm()
217 dev_data->alarm[chan_id].user_data = (struct counter_alarm_cfg *)alarm_cfg; in counter_gecko_set_alarm()
220 sl_sleeptimer_start_timer(&alarm_timer[chan_id], dev_data->alarm[chan_id].ticks, in counter_gecko_set_alarm()
221 alarm_callback, (void *)&dev_data->alarm[chan_id], 0, 0); in counter_gecko_set_alarm()
[all …]
Dcounter_gecko_rtcc.c37 struct counter_gecko_alarm_data alarm[RTCC_ALARM_NUM]; member
109 if (dev_data->alarm[i].callback) { in counter_gecko_set_top_value()
161 if (dev_data->alarm[chan_id].callback != NULL) { in counter_gecko_set_alarm()
181 dev_data->alarm[chan_id].callback = alarm_cfg->callback; in counter_gecko_set_alarm()
182 dev_data->alarm[chan_id].user_data = alarm_cfg->user_data; in counter_gecko_set_alarm()
205 dev_data->alarm[chan_id].callback = NULL; in counter_gecko_cancel_alarm()
206 dev_data->alarm[chan_id].user_data = NULL; in counter_gecko_cancel_alarm()
340 if (dev_data->alarm[i].callback) { in ISR_DIRECT_DECLARE()
341 alarm_callback = dev_data->alarm[i].callback; in ISR_DIRECT_DECLARE()
342 dev_data->alarm[i].callback = NULL; in ISR_DIRECT_DECLARE()
[all …]
Dcounter_sam_tc.c73 struct counter_sam_alarm_data alarm[MAX_ALARMS_PER_TC_CHANNEL]; member
156 if (data->alarm[chan_id].callback != NULL) { in counter_sam_tc_set_alarm()
166 data->alarm[chan_id].callback = alarm_cfg->callback; in counter_sam_tc_set_alarm()
167 data->alarm[chan_id].user_data = alarm_cfg->user_data; in counter_sam_tc_set_alarm()
210 data->alarm[chan_id].callback = NULL; in counter_sam_tc_cancel_alarm()
211 data->alarm[chan_id].user_data = NULL; in counter_sam_tc_cancel_alarm()
228 if (data->alarm[i].callback) { in counter_sam_tc_set_top_value()
288 if (data->alarm[0].callback) { in counter_sam_tc_isr()
289 counter_alarm_callback_t cb = data->alarm[0].callback; in counter_sam_tc_isr()
291 data->alarm[0].callback = NULL; in counter_sam_tc_isr()
[all …]
Dcounter_renesas_ra_agt.c56 struct counter_ra_agt_alarm alarm; /* Counter alarm config struct */ member
174 struct counter_ra_agt_alarm *const alarm = &data->alarm; in counter_ra_agt_set_alarm() local
187 if (alarm->callback) { in counter_ra_agt_set_alarm()
191 alarm->callback = alarm_cfg->callback; in counter_ra_agt_set_alarm()
192 alarm->data = alarm_cfg->user_data; in counter_ra_agt_set_alarm()
243 alarm->callback = NULL; in counter_ra_agt_set_alarm()
244 alarm->data = NULL; in counter_ra_agt_set_alarm()
264 data->alarm.callback = NULL; in counter_ra_agt_cancel_alarm()
265 data->alarm.data = NULL; in counter_ra_agt_cancel_alarm()
321 struct counter_ra_agt_alarm *const alarm = &data->alarm; in counter_ra_agt_agtcmai_isr() local
[all …]
DKconfig.mcux_snvs21 bool "IMX SNVS wake-up on SRTC alarm"
25 Assert Wake-Up Interrupt on SRTC alarm
Dcounter_gd32_timer.c38 struct counter_gd32_ch_data alarm[]; member
269 data->alarm[chan].callback = NULL; in set_cc()
283 struct counter_gd32_ch_data *chdata = &data->alarm[chan]; in counter_gd32_timer_set_alarm()
305 data->alarm[chan].callback = NULL; in counter_gd32_timer_cancel_alarm()
321 if (data->alarm[i].callback) { in counter_gd32_timer_set_top_value()
397 struct counter_gd32_ch_data *alarm = &data->alarm[chan]; in alarm_irq_handle() local
407 cb = alarm->callback; in alarm_irq_handle()
408 alarm->callback = NULL; in alarm_irq_handle()
411 cb(dev, chan, get_counter(dev), alarm->user_data); in alarm_irq_handle()
509 struct counter_gd32_ch_data alarm[DT_INST_PROP(n, channels)]; \
/Zephyr-latest/samples/drivers/counter/maxim_ds3231/
DREADME.rst62 The alarm configuration is read from non-volatile memory and displayed.
70 representation displayed. The second-resolution alarm is configured to
72 alarm is configured to fire once per minute::
75 Set sec alarm 90 at 1563516007 ~ 2019-07-19 06:00:07 Fri 200: 5
76 Set min alarm flags f at 1563516007 ~ 2019-07-19 06:00:07 Fri 200: 7
83 Sec alarm flags 10 at 252914407 ~ 1978-01-06 06:00:07 Fri 006
84 Min alarm flags e at 252374400 ~ 1977-12-31 00:00:00 Sat 365
86 The second-resolution alarm was signalled, and processed by the
88 latency). The callback uses the counter alarm API to schedule a second
89 alarm in 10 seconds::
[all …]
/Zephyr-latest/drivers/sensor/st/stts751/
DKconfig63 int "High temperature threshold alarm"
66 HIGH temperature threshold to trigger an alarm
70 int "Low temperature threshold alarm"
73 LOW temperature threshold to trigger an alarm
/Zephyr-latest/samples/drivers/rtc/boards/
Dqemu_x86_64.overlay9 * IRQ bit is set. The IRQ is required for alarm
Dqemu_x86.overlay9 * IRQ bit is set. The IRQ is required for alarm
/Zephyr-latest/tests/drivers/rtc/rtc_api/boards/
Dqemu_x86.overlay9 * IRQ bit is set. The IRQ is required for alarm
Dqemu_x86_64.overlay9 * IRQ bit is set. The IRQ is required for alarm
/Zephyr-latest/samples/boards/nxp/mimxrt1060_evk/system_off/
DREADME.rst15 additionally set an alarm 10 seconds in the future to wake up the processor
41 alarm to fire and wake the device up automatically.
/Zephyr-latest/modules/openthread/platform/
DCMakeLists.txt5 alarm.c
/Zephyr-latest/drivers/timer/
Desp32_sys_timer.c45 systimer_counter_value_t alarm = {.val = time}; in set_systimer_alarm() local
48 systimer_ll_set_alarm_target(systimer_hal.dev, SYSTIMER_ALARM_OS_TICK_CORE0, alarm.val); in set_systimer_alarm()
/Zephyr-latest/include/zephyr/posix/
Dsignal.h121 unsigned int alarm(unsigned int seconds);
/Zephyr-latest/lib/posix/options/
Dsignal.c127 unsigned int alarm(unsigned int seconds) in alarm() function
/Zephyr-latest/drivers/entropy/
DKconfig.cc13xx_cc26xx39 The number of samples detected with repeating patterns before an alarm
/Zephyr-latest/tests/posix/headers/src/
Dsignal_h.c170 zassert_not_null(alarm); in ZTEST()

12