Home
last modified time | relevance | path

Searched refs:tp (Results 1 – 25 of 36) sorted by relevance

12

/Zephyr-latest/tests/unit/timeutil/
Dmain.c11 void timeutil_check(const struct timeutil_test_data *tp, in timeutil_check() argument
14 const struct timeutil_test_data *tpe = tp + count; in timeutil_check()
16 while (tp < tpe) { in timeutil_check()
17 struct tm tm = *gmtime(&tp->ux); 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()
[all …]
Dtest_s64.c216 const struct timeutil_test_data *tp = &(const struct timeutil_test_data){ in test_time32_errno_clear() local
233 time_t ux = timeutil_timegm(&tp->tm); in test_time32_errno_clear()
235 zassert_equal(ux, tp->ux, in test_time32_errno_clear()
243 const struct timeutil_test_data *tp = &(const struct timeutil_test_data){ in test_time32_epochm1() local
260 time_t ux = timeutil_timegm(&tp->tm); in test_time32_epochm1()
262 zassert_equal(ux, tp->ux, in test_time32_epochm1()
271 const struct timeutil_test_data *tp = &(const struct timeutil_test_data){ in test_time32_underflow() local
285 zassert_equal(timeutil_timegm64(&tp->tm), unix64, in test_time32_underflow()
289 time_t ux = timeutil_timegm(&tp->tm); in test_time32_underflow()
300 const struct timeutil_test_data *tp = &(const struct timeutil_test_data){ in test_time32_overflow() local
[all …]
Dtest_gmtime.c24 struct tm *tp = gmtime(&time); in ZTEST() local
26 zassert_true(memcmp(&tm, tp, sizeof(tm)) == 0, in ZTEST()
Dtimeutil_test.h19 void timeutil_check(const struct timeutil_test_data *tp,
/Zephyr-latest/lib/libc/common/source/time/
Dasctime.c18 static char *asctime_impl(const struct tm *tp, char *buf) in asctime_impl() argument
27 if ((buf == NULL) || (tp == NULL) || ((unsigned int)tp->tm_wday >= DATE_WDAY_STRING_SZ) || in asctime_impl()
28 ((unsigned int)tp->tm_mon >= DATE_MON_STRING_SZ)) { in asctime_impl()
33 buf, DATE_STRING_BUF_SZ, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n", wday_str[tp->tm_wday], in asctime_impl()
34 mon_str[tp->tm_mon], tp->tm_mday, tp->tm_hour, tp->tm_min, tp->tm_sec, in asctime_impl()
35 DATE_TM_YEAR_BASE + tp->tm_year); in asctime_impl()
44 char *asctime(const struct tm *tp) in asctime() argument
48 return asctime_impl(tp, buf); in asctime()
52 char *asctime_r(const struct tm *tp, char *buf) in asctime_r() argument
54 return asctime_impl(tp, buf); in asctime_r()
Dgmtime_r.c36 struct tm *ZRESTRICT tp) in time_civil_from_days() argument
38 tp->tm_wday = (z >= -4) ? ((z + 4) % 7) : ((z + 5) % 7 + 6); in time_civil_from_days()
51 tp->tm_year = y + (m <= 2) - 1900; in time_civil_from_days()
52 tp->tm_mon = m - 1; in time_civil_from_days()
53 tp->tm_mday = d; in time_civil_from_days()
68 tp->tm_yday = doy - 306U; in time_civil_from_days()
70 tp->tm_yday = doy + 59U + (((yoe % 4U == 0U) && (yoe % 100U != 0U)) || (yoe == 0U)); in time_civil_from_days()
/Zephyr-latest/subsys/net/ip/
Dtp.h59 struct tp { struct
77 json_str(tp, msg), argument
78 json_str(tp, status),
79 json_str(tp, state),
80 json_num(tp, seq),
81 json_num(tp, ack),
82 json_str(tp, rcv),
83 json_str(tp, data),
84 json_str(tp, op),
153 struct tp *json_to_tp(void *data, size_t data_len);
[all …]
Dtp.c462 struct tp *json_to_tp(void *data, size_t data_len) in json_to_tp()
464 static struct tp tp; in json_to_tp() local
466 memset(&tp, 0, sizeof(tp)); in json_to_tp()
469 &tp) < 0) { in json_to_tp()
473 tp.type = tp_msg_to_type(tp.msg); in json_to_tp()
475 return &tp; in json_to_tp()
478 void tp_new_find_and_apply(struct tp_new *tp, const char *key, void *value, in tp_new_find_and_apply() argument
484 for (i = 0; i < tp->num_entries; i++) { in tp_new_find_and_apply()
485 if (is(key, tp->data[i].key)) { in tp_new_find_and_apply()
496 new_value = atoi(tp->data[i].value); in tp_new_find_and_apply()
[all …]
/Zephyr-latest/subsys/shell/modules/
Ddate_service.c143 struct timespec tp; in cmd_date_set() local
147 clock_gettime(CLOCK_REALTIME, &tp); in cmd_date_set()
149 gmtime_r(&tp.tv_sec, &tm); in cmd_date_set()
173 tp.tv_sec = timeutil_timegm(&tm); in cmd_date_set()
174 if (tp.tv_sec == -1) { in cmd_date_set()
178 tp.tv_nsec = 0; in cmd_date_set()
180 ret = clock_settime(CLOCK_REALTIME, &tp); in cmd_date_set()
193 struct timespec tp; in cmd_date_get() local
196 clock_gettime(CLOCK_REALTIME, &tp); in cmd_date_get()
198 gmtime_r(&tp.tv_sec, &tm); in cmd_date_get()
/Zephyr-latest/samples/boards/microchip/mec172xevb_assy6906/rom_api/src/
Dmain.c408 const struct hash_tp *tp = &htbl[n]; in test_zephyr_hash_chunk_block_size() local
409 const uint8_t *msgptr = tp->msg; in test_zephyr_hash_chunk_block_size()
410 const uint8_t *exp_digest = tp->digest; in test_zephyr_hash_chunk_block_size()
414 ret = pr_hash_algo_name(tp->hash_id); in test_zephyr_hash_chunk_block_size()
419 msgsz = tp->msgsz; in test_zephyr_hash_chunk_block_size()
420 blocksz = hash_block_size(tp->hash_id); in test_zephyr_hash_chunk_block_size()
421 digestsz = hash_digest_size(tp->hash_id); in test_zephyr_hash_chunk_block_size()
433 ret = hash_begin_session(symcr_dev, &zhash_ctx, tp->hash_id); in test_zephyr_hash_chunk_block_size()
501 const struct hash_tp *tp = &htbl[n]; in test_zephyr_hash_chunk() local
502 const uint8_t *msgptr = tp->msg; in test_zephyr_hash_chunk()
[all …]
/Zephyr-latest/drivers/ethernet/
Deth_native_posix_adapt.c121 struct timespec tp; in eth_clock_gettime() local
124 ret = clock_gettime(CLOCK_MONOTONIC_RAW, &tp); in eth_clock_gettime()
129 *second = (uint64_t)tp.tv_sec; in eth_clock_gettime()
130 *nanosecond = (uint32_t)tp.tv_nsec; in eth_clock_gettime()
/Zephyr-latest/drivers/tee/optee/
Doptee.c111 const struct tee_param *tp = param; in param_to_msg_param() local
118 for (i = 0; i < num_param; i++, tp++, mtp++) { in param_to_msg_param()
119 if (!tp || !mtp) { in param_to_msg_param()
124 switch (tp->attr) { in param_to_msg_param()
132 mtp->attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT + tp->attr - in param_to_msg_param()
134 mtp->u.value.a = tp->a; in param_to_msg_param()
135 mtp->u.value.b = tp->b; in param_to_msg_param()
136 mtp->u.value.c = tp->c; in param_to_msg_param()
141 mtp->attr = OPTEE_MSG_ATTR_TYPE_RMEM_INPUT + tp->attr - in param_to_msg_param()
143 mtp->u.rmem.shm_ref = tp->c; in param_to_msg_param()
[all …]
/Zephyr-latest/lib/posix/options/
Dclock.c131 int clock_settime(clockid_t clock_id, const struct timespec *tp) in clock_settime() argument
141 if (tp->tv_nsec < 0 || tp->tv_nsec >= NSEC_PER_SEC) { in clock_settime()
147 int64_t delta = (int64_t)NSEC_PER_SEC * tp->tv_sec + tp->tv_nsec in clock_settime()
/Zephyr-latest/samples/net/mqtt_sn_publisher/src/
Dudp.c32 static APP_BMEM struct mqtt_sn_transport_udp tp; variable
140 err = mqtt_sn_transport_udp_init(&tp, (struct sockaddr *)&bcaddr, sizeof((bcaddr))); in process_thread()
143 err = mqtt_sn_client_init(&mqtt_client, &client_id, &tp.tp, evt_cb, tx_buf, sizeof(tx_buf), in process_thread()
/Zephyr-latest/tests/lib/c_lib/common/src/
Dmain.c1084 struct tm tp; in ZTEST() local
1089 tp.tm_wday = -5; in ZTEST()
1090 zassert_not_null(gmtime_r(&tests3, &tp), "gmtime_r failed"); in ZTEST()
1091 zassert_not_null(gmtime_r(&tests4, &tp), "gmtime_r failed"); in ZTEST()
1102 struct tm tp = { in ZTEST() local
1112 zassert_not_null(asctime_r(&tp, buf)); in ZTEST()
1115 zassert_not_null(asctime(&tp)); in ZTEST()
1116 zassert_equal(strncmp("Fri Jun 1 14:30:10 2024\n", asctime(&tp), sizeof(buf)), 0); in ZTEST()
1119 tp.tm_wday = 8; in ZTEST()
1120 zassert_is_null(asctime_r(&tp, buf)); in ZTEST()
[all …]
/Zephyr-latest/lib/libc/arcmwdt/include/
Dtime.h16 extern char *asctime_r(const struct tm *tp, char *buf);
/Zephyr-latest/soc/nordic/common/vpr/
Dsoc_isr_stacking.h23 unsigned long tp; \
46 unsigned long tp; \
/Zephyr-latest/lib/libc/minimal/include/
Dtime.h61 char *asctime_r(const struct tm *ZRESTRICT tp, char *ZRESTRICT buf);
/Zephyr-latest/scripts/build/
Duf2conv.py180 tp = rec[3]
181 if tp == 4:
183 elif tp == 2:
185 elif tp == 1:
187 elif tp == 0:
/Zephyr-latest/arch/riscv/core/
Dcoredump.c21 uint64_t tp; member
42 uint32_t tp;
/Zephyr-latest/include/zephyr/net/
Dmqtt_sn.h227 struct mqtt_sn_transport tp; member
237 #define UDP_TRANSPORT(transport) CONTAINER_OF(transport, struct mqtt_sn_transport_udp, tp)
/Zephyr-latest/samples/drivers/counter/maxim_ds3231/src/
Dmain.c23 struct tm *tp = gmtime_r(&time, &tv); in format_time() local
25 bp += strftime(bp, bpe - bp, "%Y-%m-%d %H:%M:%S", tp); in format_time()
29 bp += strftime(bp, bpe - bp, " %a %j", tp); in format_time()
/Zephyr-latest/doc/connectivity/networking/api/
Dmqtt_sn.rst55 static struct mqtt_sn_transport tp;
83 mqtt_sn_transport_udp_init(&tp, (struct sockaddr*)&gateway, sizeof((gateway)));
85 …mqtt_sn_client_init(&client, &client_id, &tp.tp, evt_cb, tx_buf, sizeof(tx_buf), rx_buf, sizeof(rx…
/Zephyr-latest/drivers/counter/
Dmaxim_ds3231.c291 static const uint8_t *decode_time(struct tm *tp, in decode_time() argument
300 tp->tm_sec = bcd2bin(reg & 0x7F); in decode_time()
304 tp->tm_min = bcd2bin(reg & 0x7F); in decode_time()
307 tp->tm_hour = (reg & 0x0F); in decode_time()
311 tp->tm_hour += 10; in decode_time()
314 tp->tm_hour += 12; in decode_time()
318 tp->tm_hour += 10 * ((reg >> 4) & 0x03); in decode_time()
326 time_t *tp) in decode_alarm() argument
367 *tp = timeutil_timegm(&tm); in decode_alarm()
/Zephyr-latest/tests/kernel/threads/thread_apis/src/
Dmain.c41 static ZTEST_DMEM int tp = 10; variable
589 tp = 100; in tp_entry()
602 zassert_false(tp == 100); in ZTEST_USER()
606 zassert_true(tp == 100); in ZTEST_USER()

12