Home
last modified time | relevance | path

Searched refs:rtc_time (Results 1 – 25 of 46) sorted by relevance

12

/Zephyr-latest/tests/drivers/rtc/rtc_api_helpers/src/
Dtest_rtc_time_to_tm.c13 zassert_equal(offsetof(struct rtc_time, tm_sec), offsetof(struct tm, tm_sec), in ZTEST()
16 zassert_equal(offsetof(struct rtc_time, tm_min), offsetof(struct tm, tm_min), in ZTEST()
19 zassert_equal(offsetof(struct rtc_time, tm_hour), offsetof(struct tm, tm_hour), in ZTEST()
22 zassert_equal(offsetof(struct rtc_time, tm_mday), offsetof(struct tm, tm_mday), in ZTEST()
25 zassert_equal(offsetof(struct rtc_time, tm_mon), offsetof(struct tm, tm_mon), in ZTEST()
28 zassert_equal(offsetof(struct rtc_time, tm_year), offsetof(struct tm, tm_year), in ZTEST()
31 zassert_equal(offsetof(struct rtc_time, tm_wday), offsetof(struct tm, tm_wday), in ZTEST()
34 zassert_equal(offsetof(struct rtc_time, tm_yday), offsetof(struct tm, tm_yday), in ZTEST()
37 zassert_equal(offsetof(struct rtc_time, tm_isdst), offsetof(struct tm, tm_isdst), in ZTEST()
43 struct rtc_time rtc_datetime; in ZTEST()
/Zephyr-latest/drivers/rtc/
Drtc_handlers.c10 static inline int z_vrfy_rtc_set_time(const struct device *dev, const struct rtc_time *timeptr) in z_vrfy_rtc_set_time()
13 K_OOPS(K_SYSCALL_MEMORY_READ(timeptr, sizeof(struct rtc_time))); in z_vrfy_rtc_set_time()
18 static inline int z_vrfy_rtc_get_time(const struct device *dev, struct rtc_time *timeptr) in z_vrfy_rtc_get_time()
21 K_OOPS(K_SYSCALL_MEMORY_WRITE(timeptr, sizeof(struct rtc_time))); in z_vrfy_rtc_get_time()
37 const struct rtc_time *timeptr) in z_vrfy_rtc_alarm_set_time()
40 K_OOPS(K_SYSCALL_MEMORY_READ(timeptr, sizeof(struct rtc_time))); in z_vrfy_rtc_alarm_set_time()
46 struct rtc_time *timeptr) in z_vrfy_rtc_alarm_get_time()
50 K_OOPS(K_SYSCALL_MEMORY_WRITE(timeptr, sizeof(struct rtc_time))); in z_vrfy_rtc_alarm_get_time()
Drtc_fake.c18 DEFINE_FAKE_VALUE_FUNC(int, rtc_fake_set_time, const struct device *, const struct rtc_time *);
19 DEFINE_FAKE_VALUE_FUNC(int, rtc_fake_get_time, const struct device *, struct rtc_time *);
25 const struct rtc_time *);
27 struct rtc_time *);
Drtc_xmc4xxx.c36 static int rtc_xmc4xxx_set_time(const struct device *dev, const struct rtc_time *timeptr) in rtc_xmc4xxx_set_time()
46 stdtime = rtc_time_to_tm((struct rtc_time *)timeptr); in rtc_xmc4xxx_set_time()
54 static int rtc_xmc4xxx_get_time(const struct device *dev, struct rtc_time *timeptr) in rtc_xmc4xxx_get_time()
111 const struct rtc_time *timeptr) in rtc_xmc4xxx_alarm_set_time()
113 const struct tm *stdtime = rtc_time_to_tm((struct rtc_time *)timeptr); in rtc_xmc4xxx_alarm_set_time()
136 struct rtc_time *timeptr) in rtc_xmc4xxx_alarm_get_time()
Drtc_emul.c23 struct rtc_time datetime;
33 struct rtc_time datetime;
62 static bool rtc_emul_is_leap_year(struct rtc_time *datetime) in rtc_emul_is_leap_year()
72 static int rtc_emul_get_days_in_month(struct rtc_time *datetime) in rtc_emul_get_days_in_month()
81 static void rtc_emul_increment_tm(struct rtc_time *datetime) in rtc_emul_increment_tm()
234 static int rtc_emul_set_time(const struct device *dev, const struct rtc_time *timeptr) in rtc_emul_set_time()
255 static int rtc_emul_get_time(const struct device *dev, struct rtc_time *timeptr) in rtc_emul_get_time()
301 const struct rtc_time *timeptr) in rtc_emul_alarm_set_time()
332 struct rtc_time *timeptr) in rtc_emul_alarm_get_time()
Drtc_ll_stm32.c402 static int rtc_stm32_set_time(const struct device *dev, const struct rtc_time *timeptr) in rtc_stm32_set_time()
405 LL_RTC_TimeTypeDef rtc_time; in rtc_stm32_set_time() local
432 rtc_time.Hours = bin2bcd(timeptr->tm_hour); in rtc_stm32_set_time()
433 rtc_time.Minutes = bin2bcd(timeptr->tm_min); in rtc_stm32_set_time()
434 rtc_time.Seconds = bin2bcd(timeptr->tm_sec); in rtc_stm32_set_time()
435 LL_RTC_TIME_Init(RTC, LL_RTC_FORMAT_BCD, &rtc_time); in rtc_stm32_set_time()
475 static int rtc_stm32_get_time(const struct device *dev, struct rtc_time *timeptr) in rtc_stm32_get_time()
479 uint32_t rtc_date, rtc_time; in rtc_stm32_get_time() local
515 rtc_time = LL_RTC_TIME_Get(RTC); in rtc_stm32_get_time()
519 } while (rtc_time != LL_RTC_TIME_Get(RTC)); in rtc_stm32_get_time()
[all …]
Drtc_rpi_pico.c31 struct rtc_time *timeptr);
37 struct rtc_time alarm_time;
99 static int rtc_rpi_pico_set_time(const struct device *dev, const struct rtc_time *timeptr) in rtc_rpi_pico_set_time()
132 static int rtc_rpi_pico_get_time(const struct device *dev, struct rtc_time *timeptr) in rtc_rpi_pico_get_time()
177 const struct rtc_time *alarm) in rtc_rpi_pico_alarm_set_time()
255 struct rtc_time *timeptr) in rtc_rpi_pico_alarm_get_time()
Drtc_ambiq.c35 struct rtc_time alarm_time;
43 static void rtc_time_to_ambiq_time_set(const struct rtc_time *tm, am_hal_rtc_time_t *atm) in rtc_time_to_ambiq_time_set()
72 static void ambiq_time_to_rtc_time_set(const am_hal_rtc_time_t *atm, struct rtc_time *tm) in ambiq_time_to_rtc_time_set()
111 static int ambiq_rtc_set_time(const struct device *dev, const struct rtc_time *timeptr) in ambiq_rtc_set_time()
147 static int ambiq_rtc_get_time(const struct device *dev, struct rtc_time *timeptr) in ambiq_rtc_get_time()
193 struct rtc_time *timeptr) in ambiq_rtc_alarm_get_time()
225 const struct rtc_time *timeptr) in ambiq_rtc_alarm_set_time()
Drtc_smartbond.c155 static uint32_t rtc_time_to_bcd(const struct rtc_time *timeptr) in rtc_time_to_bcd()
166 static uint32_t rtc_calendar_to_bcd(const struct rtc_time *timeptr) in rtc_calendar_to_bcd()
185 static void bcd_to_rtc_time(struct rtc_time *timeptr) in bcd_to_rtc_time()
196 static void bcd_to_rtc_calendar(struct rtc_time *timeptr) in bcd_to_rtc_calendar()
209 static int rtc_smartbond_set_time(const struct device *dev, const struct rtc_time *timeptr) in rtc_smartbond_set_time()
260 static int rtc_smartbond_get_time(const struct device *dev, struct rtc_time *timeptr) in rtc_smartbond_get_time()
293 static uint32_t alarm_calendar_to_bcd(const struct rtc_time *timeptr, uint16_t mask) in alarm_calendar_to_bcd()
314 static inline uint32_t alarm_time_to_bcd(const struct rtc_time *timeptr, uint16_t mask) in alarm_time_to_bcd()
336 static void bcd_to_alarm_calendar(struct rtc_time *timeptr) in bcd_to_alarm_calendar()
346 static void bcd_to_alarm_time(struct rtc_time *timeptr) in bcd_to_alarm_time()
[all …]
Drtc_utils.h26 bool rtc_utils_validate_rtc_time(const struct rtc_time *timeptr, uint16_t mask);
Drtc_sam.c67 static uint32_t rtc_sam_timr_from_tm(const struct rtc_time *timeptr) in rtc_sam_timr_from_tm()
78 static uint32_t rtc_sam_calr_from_tm(const struct rtc_time *timeptr) in rtc_sam_calr_from_tm()
94 static int rtc_sam_set_time(const struct device *dev, const struct rtc_time *timeptr) in rtc_sam_set_time()
140 static int rtc_sam_get_time(const struct device *dev, struct rtc_time *timeptr) in rtc_sam_get_time()
228 static uint32_t rtc_atmel_timalr_from_tm(const struct rtc_time *timeptr, uint32_t mask) in rtc_atmel_timalr_from_tm()
250 static uint32_t rtc_atmel_calalr_from_tm(const struct rtc_time *timeptr, uint32_t mask) in rtc_atmel_calalr_from_tm()
301 static void rtc_sam_tm_from_timalr_calalr(struct rtc_time *timeptr, uint32_t mask, in rtc_sam_tm_from_timalr_calalr()
338 const struct rtc_time *timeptr) in rtc_sam_alarm_set_time()
389 struct rtc_time *timeptr) in rtc_sam_alarm_get_time()
Drtc_mc146818.c146 static bool rtc_mc146818_validate_time(const struct rtc_time *timeptr) in rtc_mc146818_validate_time()
172 static int rtc_mc146818_set_time(const struct device *dev, const struct rtc_time *timeptr) in rtc_mc146818_set_time()
216 static int rtc_mc146818_get_time(const struct device *dev, struct rtc_time *timeptr) in rtc_mc146818_get_time()
268 static bool rtc_mc146818_validate_alarm(const struct rtc_time *timeptr, uint32_t mask) in rtc_mc146818_validate_alarm()
305 const struct rtc_time *timeptr) in rtc_mc146818_alarm_set_time()
353 struct rtc_time *timeptr) in rtc_mc146818_alarm_get_time()
Drtc_utils.c15 bool rtc_utils_validate_rtc_time(const struct rtc_time *timeptr, uint16_t mask) in rtc_utils_validate_rtc_time()
/Zephyr-latest/include/zephyr/drivers/rtc/
Drtc_fake.h17 DECLARE_FAKE_VALUE_FUNC(int, rtc_fake_set_time, const struct device *, const struct rtc_time *);
18 DECLARE_FAKE_VALUE_FUNC(int, rtc_fake_get_time, const struct device *, struct rtc_time *);
24 const struct rtc_time *);
26 struct rtc_time *);
/Zephyr-latest/include/zephyr/drivers/
Drtc.h61 struct rtc_time { struct
103 typedef int (*rtc_api_set_time)(const struct device *dev, const struct rtc_time *timeptr);
109 typedef int (*rtc_api_get_time)(const struct device *dev, struct rtc_time *timeptr);
123 const struct rtc_time *timeptr);
130 struct rtc_time *timeptr);
198 __syscall int rtc_set_time(const struct device *dev, const struct rtc_time *timeptr);
200 static inline int z_impl_rtc_set_time(const struct device *dev, const struct rtc_time *timeptr) in z_impl_rtc_set_time()
215 __syscall int rtc_get_time(const struct device *dev, struct rtc_time *timeptr);
217 static inline int z_impl_rtc_get_time(const struct device *dev, struct rtc_time *timeptr) in z_impl_rtc_get_time()
279 const struct rtc_time *timeptr);
[all …]
/Zephyr-latest/tests/drivers/rtc/rtc_api/src/
Dtest_time_incrementing.c23 struct rtc_time datetime_set; in ZTEST()
24 struct rtc_time datetime_get; in ZTEST()
Dtest_time.c23 struct rtc_time datetime_set; in ZTEST()
24 struct rtc_time datetime_get; in ZTEST()
Dtest_alarm.c22 static const struct rtc_time test_rtc_time_set = {
36 static const struct rtc_time test_alarm_time_set = {
49 static const struct rtc_time test_alarm_time_invalid = {
73 struct rtc_time alarm_time_get; in ZTEST()
Dtest_alarm_callback.c26 static const struct rtc_time test_rtc_time_set = {
40 static const struct rtc_time test_alarm_time_set = {
/Zephyr-latest/samples/drivers/rtc/src/
Dmain.c17 struct rtc_time tm = { in set_date_time()
37 struct rtc_time tm; in get_date_time()
/Zephyr-latest/samples/boards/nuvoton/numaker/system_off/src/
Dmain.c24 struct rtc_time time_set; in set_alarm_10s()
25 struct rtc_time alarm_time_set; in set_alarm_10s()
/Zephyr-latest/tests/drivers/rtc/shell/src/
Dmain.c30 struct rtc_time rtc;
35 static int rtc_fake_get_time_mock(const struct device *dev, struct rtc_time *rtc) in rtc_fake_get_time_mock()
43 static int rtc_fake_set_time_mock(const struct device *dev, const struct rtc_time *rtc) in rtc_fake_set_time_mock()
73 const struct rtc_time *rtctime; in assert_set_time()
/Zephyr-latest/drivers/counter/
Dcounter_ll_stm32_rtc.c236 uint32_t rtc_date, rtc_time; in rtc_stm32_read() local
257 rtc_time = LL_RTC_TIME_Get(RTC); in rtc_stm32_read()
259 } while (rtc_time != LL_RTC_TIME_Get(RTC)); in rtc_stm32_read()
261 rtc_time = LL_RTC_TIME_Get(RTC); in rtc_stm32_read()
275 now.tm_hour = __LL_RTC_CONVERT_BCD2BIN(__LL_RTC_GET_HOUR(rtc_time)); in rtc_stm32_read()
276 now.tm_min = __LL_RTC_CONVERT_BCD2BIN(__LL_RTC_GET_MINUTE(rtc_time)); in rtc_stm32_read()
277 now.tm_sec = __LL_RTC_CONVERT_BCD2BIN(__LL_RTC_GET_SECOND(rtc_time)); in rtc_stm32_read()
300 uint32_t rtc_time, ticks; in rtc_stm32_read() local
310 rtc_time = LL_RTC_TIME_Get(RTC); in rtc_stm32_read()
312 ticks = rtc_time; in rtc_stm32_read()
/Zephyr-latest/tests/drivers/rtc/rtc_utils/src/
Dtest_rtc_utils.c14 const struct rtc_time alarm_time = { in ZTEST()
/Zephyr-latest/tests/subsys/mgmt/mcumgr/os_mgmt_datetime/src/
Dsmp_test_util.h31 bool create_mcumgr_datetime_set_packet(zcbor_state_t *zse, bool version2, struct rtc_time *a_time,

12