Lines Matching full:rtc

9  * @file drivers/rtc.h
17 * @brief RTC Interface
18 * @defgroup rtc_interface RTC Interface
35 * @name RTC Alarm Time Mask
76 * @brief RTC update event callback
85 * @brief RTC alarm triggered callback
101 * @brief API for setting RTC time
107 * @brief API for getting RTC time
113 * @brief API for getting the supported fields of the RTC alarm time
120 * @brief API for setting RTC alarm time
127 * @brief API for getting RTC alarm time
134 * @brief API for testing if RTC alarm is pending
140 * @brief API for setting RTC alarm callback
147 * @brief API for setting RTC update callback
154 * @brief API for setting RTC calibration
160 * @brief API for getting RTC calibration
165 * @brief RTC driver API
189 * @brief API for setting RTC time.
195 * @return -EINVAL if RTC time is invalid or exceeds hardware capabilities
202 return DEVICE_API_GET(rtc, dev)->set_time(dev, timeptr); in z_impl_rtc_set_time()
206 * @brief API for getting RTC time.
212 * @return -ENODATA if RTC time has not been set
219 return DEVICE_API_GET(rtc, dev)->get_time(dev, timeptr); in z_impl_rtc_get_time()
223 * @name RTC Interface Alarm
229 * @brief API for getting the supported fields of the RTC alarm time.
248 if (DEVICE_API_GET(rtc, dev)->alarm_get_supported_fields == NULL) { in z_impl_rtc_alarm_get_supported_fields()
252 return DEVICE_API_GET(rtc, dev)->alarm_get_supported_fields(dev, id, mask); in z_impl_rtc_alarm_get_supported_fields()
256 * @brief API for setting RTC alarm time.
258 * @details To enable an RTC alarm, one or more fields of the RTC alarm time
259 * must be enabled. The mask designates which fields of the RTC alarm time to
260 * enable. If the mask parameter is 0, the alarm will be disabled. The RTC
261 * alarm will trigger when all enabled fields of the alarm time match the RTC
284 if (DEVICE_API_GET(rtc, dev)->alarm_set_time == NULL) { in z_impl_rtc_alarm_set_time()
288 return DEVICE_API_GET(rtc, dev)->alarm_set_time(dev, id, mask, timeptr); in z_impl_rtc_alarm_set_time()
292 * @brief API for getting RTC alarm time.
312 if (DEVICE_API_GET(rtc, dev)->alarm_get_time == NULL) { in z_impl_rtc_alarm_get_time()
316 return DEVICE_API_GET(rtc, dev)->alarm_get_time(dev, id, mask, timeptr); in z_impl_rtc_alarm_get_time()
320 * @brief API for testing if RTC alarm is pending.
338 if (DEVICE_API_GET(rtc, dev)->alarm_is_pending == NULL) { in z_impl_rtc_alarm_is_pending()
342 return DEVICE_API_GET(rtc, dev)->alarm_is_pending(dev, id); in z_impl_rtc_alarm_is_pending()
377 if (DEVICE_API_GET(rtc, dev)->alarm_set_callback == NULL) { in z_impl_rtc_alarm_set_callback()
381 return DEVICE_API_GET(rtc, dev)->alarm_set_callback(dev, id, callback, user_data); in z_impl_rtc_alarm_set_callback()
390 * @name RTC Interface Update
400 * RTC clock is updated by 1 second. It can be used to
401 * synchronize the RTC clock with other clock sources.
403 * To disable the update callback for the RTC clock, the
420 if (DEVICE_API_GET(rtc, dev)->update_set_callback == NULL) { in z_impl_rtc_update_set_callback()
424 return DEVICE_API_GET(rtc, dev)->update_set_callback(dev, callback, user_data); in z_impl_rtc_update_set_callback()
433 * @name RTC Interface Calibration
439 * @brief API for setting RTC calibration.
441 * @details Calibration is applied to the RTC clock input. A
443 * the RTC clock, a negative value will decrease the
444 * frequency of the RTC clock.
460 if (DEVICE_API_GET(rtc, dev)->set_calibration == NULL) { in z_impl_rtc_set_calibration()
464 return DEVICE_API_GET(rtc, dev)->set_calibration(dev, calibration); in z_impl_rtc_set_calibration()
468 * @brief API for getting RTC calibration.
481 if (DEVICE_API_GET(rtc, dev)->get_calibration == NULL) { in z_impl_rtc_get_calibration()
485 return DEVICE_API_GET(rtc, dev)->get_calibration(dev, calibration); in z_impl_rtc_get_calibration()
494 * @name RTC Interface Helpers
515 * @param frequency Frequency of the RTC in nano Hertz
538 #include <zephyr/syscalls/rtc.h>