/Zephyr-latest/tests/unit/timeutil/ |
D | main.c | 17 struct tm tm = *gmtime(&tp->ux); in timeutil_check() local 18 time_t uxtime = timeutil_timegm(&tm); in timeutil_check() 20 zassert_equal(&tm, gmtime_r(&tp->ux, &tm), in timeutil_check() 23 zassert_equal(tm.tm_year, tp->tm.tm_year, in timeutil_check() 25 tp->civil, tm.tm_year, tp->tm.tm_year); in timeutil_check() 26 zassert_equal(tm.tm_mon, tp->tm.tm_mon, in timeutil_check() 28 tp->civil, tm.tm_mon, tp->tm.tm_mon); in timeutil_check() 29 zassert_equal(tm.tm_mday, tp->tm.tm_mday, in timeutil_check() 31 tp->civil, tm.tm_mday, tp->tm.tm_mday); in timeutil_check() 32 zassert_equal(tm.tm_hour, tp->tm.tm_hour, in timeutil_check() [all …]
|
D | test_s64.c | 17 .tm = { 29 .tm = { 41 .tm = { 53 .tm = { 65 .tm = { 78 .tm = { 90 .tm = { 102 .tm = { 114 .tm = { 126 .tm = { [all …]
|
D | test_gmtime.c | 15 struct tm tm = { in ZTEST() local 21 zassert_equal(&tm, gmtime_r(&time, &tm), in ZTEST() 24 struct tm *tp = gmtime(&time); in ZTEST() 26 zassert_true(memcmp(&tm, tp, sizeof(tm)) == 0, in ZTEST()
|
D | test_s32.c | 16 .tm = { 28 .tm = { 40 .tm = { 57 .tm = { 69 .tm = { 83 .tm = { 95 .tm = { 107 .tm = { 119 .tm = { 131 .tm = { [all …]
|
/Zephyr-latest/samples/drivers/rtc/src/ |
D | main.c | 17 struct rtc_time tm = { in set_date_time() local 26 ret = rtc_set_time(rtc, &tm); in set_date_time() 37 struct rtc_time tm; in get_date_time() local 39 ret = rtc_get_time(rtc, &tm); in get_date_time() 45 printk("RTC date and time: %04d-%02d-%02d %02d:%02d:%02d\n", tm.tm_year + 1900, in get_date_time() 46 tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); in get_date_time()
|
/Zephyr-latest/tests/drivers/rtc/rtc_api_helpers/src/ |
D | test_rtc_time_to_tm.c | 13 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() 44 struct tm *datetime = NULL; in ZTEST() [all …]
|
/Zephyr-latest/lib/libc/minimal/include/ |
D | time.h | 24 struct tm { struct 55 struct tm *gmtime(const time_t *timep); 56 struct tm *gmtime_r(const time_t *ZRESTRICT timep, 57 struct tm *ZRESTRICT result); 58 char *asctime(const struct tm *timeptr); 59 struct tm *localtime(const time_t *timer); 61 char *asctime_r(const struct tm *ZRESTRICT tp, char *ZRESTRICT buf); 63 struct tm *localtime_r(const time_t *ZRESTRICT timer, struct tm *ZRESTRICT result);
|
/Zephyr-latest/drivers/rtc/ |
D | rtc_ambiq.c | 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() argument 46 atm->ui32Century = ((tm->tm_year <= 99) || (tm->tm_year >= 200)); in rtc_time_to_ambiq_time_set() 48 atm->ui32CenturyBit = ((tm->tm_year > 99) && (tm->tm_year < 200)); in rtc_time_to_ambiq_time_set() 50 atm->ui32Year = tm->tm_year; in rtc_time_to_ambiq_time_set() 51 if (tm->tm_year > 99) { in rtc_time_to_ambiq_time_set() 52 atm->ui32Year = tm->tm_year % 100; in rtc_time_to_ambiq_time_set() 54 atm->ui32Weekday = tm->tm_wday; in rtc_time_to_ambiq_time_set() 55 atm->ui32Month = tm->tm_mon + 1; in rtc_time_to_ambiq_time_set() 56 atm->ui32DayOfMonth = tm->tm_mday; in rtc_time_to_ambiq_time_set() 57 atm->ui32Hour = tm->tm_hour; in rtc_time_to_ambiq_time_set() [all …]
|
D | rtc_ds1307.c | 45 static int ds1307_set_time(const struct device *dev, const struct rtc_time *tm) in ds1307_set_time() argument 57 tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_wday, tm->tm_hour, tm->tm_min, in ds1307_set_time() 58 tm->tm_sec); in ds1307_set_time() 60 regs[0] = bin2bcd(tm->tm_sec) & SECONDS_BITS; in ds1307_set_time() 61 regs[1] = bin2bcd(tm->tm_min); in ds1307_set_time() 62 regs[2] = bin2bcd(tm->tm_hour); in ds1307_set_time() 63 regs[3] = bin2bcd(tm->tm_wday); in ds1307_set_time() 64 regs[4] = bin2bcd(tm->tm_mday); in ds1307_set_time() 65 regs[5] = bin2bcd(tm->tm_mon); in ds1307_set_time() 66 regs[6] = bin2bcd((tm->tm_year % 100)); in ds1307_set_time()
|
/Zephyr-latest/subsys/shell/modules/ |
D | date_service.c | 25 static void date_print(const struct shell *sh, struct tm *t) in date_print() 38 static int get_y_m_d(const struct shell *sh, struct tm *t, char *date_str) in get_y_m_d() 87 static int get_h_m_s(const struct shell *sh, struct tm *t, char *time_str) in get_h_m_s() 144 struct tm tm; in cmd_date_set() local 149 gmtime_r(&tp.tv_sec, &tm); in cmd_date_set() 152 ret = get_y_m_d(sh, &tm, argv[1]); in cmd_date_set() 157 ret = get_h_m_s(sh, &tm, argv[2]); in cmd_date_set() 163 ret = get_h_m_s(sh, &tm, argv[1]); in cmd_date_set() 173 tp.tv_sec = timeutil_timegm(&tm); in cmd_date_set() 186 date_print(sh, &tm); in cmd_date_set() [all …]
|
/Zephyr-latest/lib/libc/arcmwdt/include/ |
D | time.h | 16 extern char *asctime_r(const struct tm *tp, char *buf); 18 extern struct tm *gmtime_r(const time_t *timep, struct tm *result); 19 extern struct tm *localtime_r(const time_t *timer, struct tm *result);
|
/Zephyr-latest/include/zephyr/drivers/ |
D | ptp_clock.h | 26 int (*set)(const struct device *dev, struct net_ptp_time *tm); 27 int (*get)(const struct device *dev, struct net_ptp_time *tm); 41 struct net_ptp_time *tm) in ptp_clock_set() argument 46 return api->set(dev, tm); in ptp_clock_set() 57 __syscall int ptp_clock_get(const struct device *dev, struct net_ptp_time *tm); 60 struct net_ptp_time *tm) in z_impl_ptp_clock_get() argument 65 return api->get(dev, tm); in z_impl_ptp_clock_get()
|
/Zephyr-latest/samples/drivers/misc/timeaware_gpio/src/ |
D | main.c | 30 uint64_t tm, ts, ec, ret; in main() local 42 tgpio_port_get_time(tgpio_dev, &tm); in main() 43 printk("[TGPIO] Time now: %016llx\n", tm); in main() 49 tm += cycles; in main() 50 printk("[TGPIO] Periodic pulses start at: %016llx\n", tm); in main() 53 tm, cycles, true); in main()
|
/Zephyr-latest/samples/posix/gettimeofday/src/ |
D | main.c | 23 struct tm tm; in main() local 24 localtime_r(&now, &tm); in main() 34 asctime(&tm)); in main()
|
/Zephyr-latest/lib/libc/common/source/time/ |
D | localtime_r_utc.c | 11 struct tm *localtime_r(const time_t *timer, struct tm *result) in localtime_r() 16 struct tm *localtime(const time_t *timer) in localtime()
|
D | gmtime_r.c | 36 struct tm *ZRESTRICT tp) in time_civil_from_days() 81 struct tm *gmtime_r(const time_t *ZRESTRICT timep, in gmtime_r() 82 struct tm *ZRESTRICT result) in gmtime_r() 88 *result = (struct tm){ 0 }; in gmtime_r()
|
D | asctime.c | 18 static char *asctime_impl(const struct tm *tp, char *buf) in asctime_impl() 44 char *asctime(const struct tm *tp) in asctime() 52 char *asctime_r(const struct tm *tp, char *buf) in asctime_r()
|
/Zephyr-latest/lib/utils/ |
D | timeutil.c | 45 int64_t timeutil_timegm64(const struct tm *tm) in timeutil_timegm64() argument 47 int64_t y = TIME_UTILS_BASE_YEAR + (int64_t)tm->tm_year; in timeutil_timegm64() 48 unsigned int m = tm->tm_mon + 1; in timeutil_timegm64() 49 unsigned int d = tm->tm_mday - 1; in timeutil_timegm64() 51 int64_t time = tm->tm_sec; in timeutil_timegm64() 53 time += 60LL * (tm->tm_min + 60LL * tm->tm_hour); in timeutil_timegm64() 59 time_t timeutil_timegm(const struct tm *tm) in timeutil_timegm() argument 61 int64_t time = timeutil_timegm64(tm); in timeutil_timegm()
|
/Zephyr-latest/include/zephyr/sys/ |
D | timeutil.h | 52 int64_t timeutil_timegm64(const struct tm *tm); 65 time_t timeutil_timegm(const struct tm *tm);
|
/Zephyr-latest/drivers/ptp_clock/ |
D | ptp_clock.c | 12 struct net_ptp_time *tm) in z_vrfy_ptp_clock_get() argument 18 K_OOPS(K_SYSCALL_MEMORY_WRITE(tm, sizeof(struct net_ptp_time))); in z_vrfy_ptp_clock_get() 25 if (k_usermode_to_copy((void *)tm, &ptp_time, sizeof(ptp_time)) != 0) { in z_vrfy_ptp_clock_get()
|
/Zephyr-latest/tests/kernel/timer/timer_behavior/src/ |
D | tick_timer_train.c | 18 struct k_timer tm; member 29 void tm_fn(struct k_timer *tm) in tm_fn() argument 32 CONTAINER_OF(tm, struct timer_wrapper, tm); in tm_fn() 46 k_timer_stop(tm); in tm_fn() 52 k_timer_start(tm, K_TIMEOUT_ABS_TICKS(next), K_NO_WAIT); in tm_fn() 73 k_timer_init(&timers[i].tm, tm_fn, NULL); in ZTEST() 82 k_timer_start(&timers[i].tm, K_TIMEOUT_ABS_TICKS(timers[i].last_scheduled), in ZTEST() 157 k_timer_stop(&timers[i].tm); in ZTEST()
|
/Zephyr-latest/drivers/adc/ |
D | Kconfig.smartbond | 7 bool "Renesas SmartBond(tm) ADC driver for ADC" 12 Enable support for ADC driver for Renesas SmartBond(tm) MCU series. 15 bool "Renesas SmartBond(tm) ADC driver for Sigma-Delta ADC" 20 Enable support for ADC driver for Renesas SmartBond(tm) MCU series.
|
/Zephyr-latest/tests/drivers/rtc/rtc_api/src/ |
D | test_y2k.c | 35 struct tm *const tm[2] = { in ZTEST() local 36 (struct tm *const)&rtm[0], in ZTEST() 37 (struct tm *const)&rtm[1], in ZTEST() 45 zassert_not_null(gmtime_r(&t[Y99], tm[Y99])); in ZTEST()
|
/Zephyr-latest/tests/net/ptp/clock/src/ |
D | main.c | 187 static int my_ptp_clock_set(const struct device *dev, struct net_ptp_time *tm) in my_ptp_clock_set() argument 196 memcpy(ð_ctx->time, tm, sizeof(struct net_ptp_time)); in my_ptp_clock_set() 201 static int my_ptp_clock_get(const struct device *dev, struct net_ptp_time *tm) in my_ptp_clock_get() argument 206 memcpy(tm, ð_ctx->time, sizeof(struct net_ptp_time)); in my_ptp_clock_get() 441 struct net_ptp_time tm = { in test_ptp_clock_iface() local 453 ptp_clock_set(clk, &tm); in test_ptp_clock_iface() 455 orig = timestamp_to_nsec(&tm); in test_ptp_clock_iface() 463 (void)memset(&tm, 0, sizeof(tm)); in test_ptp_clock_iface() 464 ptp_clock_get(clk, &tm); in test_ptp_clock_iface() 466 new_value = timestamp_to_nsec(&tm); in test_ptp_clock_iface() [all …]
|
/Zephyr-latest/lib/libc/minimal/source/time/ |
D | gmtime.c | 11 static Z_LIBC_DATA struct tm gmtime_result; 13 struct tm *gmtime(const time_t *timep) in gmtime()
|