/Zephyr-latest/tests/subsys/fs/common/ |
D | test_fs_open_flags.c | 55 static void ZOPEN(struct test_state *ts, int flags, int expected, int line) in ZOPEN() argument 57 TC_PRINT("# %d: OPEN %s with flags %x\n", line, ts->file_path, flags); in ZOPEN() 58 ZEQ(fs_open(&ts->file, ts->file_path, flags), expected); in ZOPEN() 62 static void ZCLOSE(struct test_state *ts, int line) in ZCLOSE() argument 64 TC_PRINT("# %d: CLOSE %s\n", line, ts->file_path); in ZCLOSE() 65 ZEQ(fs_close(&ts->file), 0); in ZCLOSE() 69 static void ZWRITE(struct test_state *ts, int expected, int line) in ZWRITE() argument 71 TC_PRINT("# %d: WRITE %s\n", line, ts->file_path); in ZWRITE() 72 ZEQ(fs_write(&ts->file, ts->write, ts->write_size), expected); in ZWRITE() 76 static void ZREAD(struct test_state *ts, int expected, int line) in ZREAD() argument [all …]
|
/Zephyr-latest/tests/posix/common/src/ |
D | clock.c | 31 static inline int64_t ts_to_ns(const struct timespec *ts) in ts_to_ns() argument 33 return ts->tv_sec * NSEC_PER_SEC + ts->tv_nsec; in ts_to_ns() 36 static inline void tv_to_ts(const struct timeval *tv, struct timespec *ts) in tv_to_ts() argument 38 ts->tv_sec = tv->tv_sec; in tv_to_ts() 39 ts->tv_nsec = tv->tv_usec * NSEC_PER_USEC; in tv_to_ts() 68 struct timespec ts; in ZTEST() local 72 zassert_equal(clock_gettime(CLOCK_INVALID, &ts), -1); in ZTEST() 85 ts = (struct timespec){-1, -1}; in ZTEST() 86 zassert_ok(clock_gettime(clocks[i], &ts)); in ZTEST() 87 zassert_not_equal(ts.tv_sec, -1); in ZTEST() [all …]
|
D | nanosleep.c | 226 struct timespec ts; in ZTEST() local 228 clock_gettime(CLOCK_MONOTONIC, &ts); in ZTEST() 234 ts.tv_sec + 1, 1); in ZTEST() 238 ts.tv_sec + 1, 1000); in ZTEST() 242 ts.tv_sec + 1, 500000000); in ZTEST() 246 ts.tv_sec + 2, 0); in ZTEST() 250 ts.tv_sec + 2, 1); in ZTEST() 254 ts.tv_sec + 2, 1001); in ZTEST() 256 clock_gettime(CLOCK_REALTIME, &ts); in ZTEST() 262 ts.tv_sec + 1, 1); in ZTEST() [all …]
|
/Zephyr-latest/include/zephyr/net/ |
D | ptp_time.h | 210 static inline net_time_t net_ptp_time_to_ns(struct net_ptp_time *ts) in net_ptp_time_to_ns() argument 212 if (!ts) { in net_ptp_time_to_ns() 216 if (ts->second >= NET_TIME_SEC_MAX) { in net_ptp_time_to_ns() 220 return ((int64_t)ts->second * NSEC_PER_SEC) + ts->nanosecond; in net_ptp_time_to_ns() 233 struct net_ptp_time ts; in ns_to_net_ptp_time() local 237 ts.second = nsec / NSEC_PER_SEC; in ns_to_net_ptp_time() 238 ts.nanosecond = nsec % NSEC_PER_SEC; in ns_to_net_ptp_time() 239 return ts; in ns_to_net_ptp_time()
|
D | sntp.h | 81 int sntp_query(struct sntp_ctx *ctx, uint32_t timeout, struct sntp_time *ts); 93 int sntp_recv_response(struct sntp_ctx *ctx, uint32_t timeout, struct sntp_time *ts); 116 struct sntp_time *ts); 134 struct sntp_time *ts);
|
/Zephyr-latest/subsys/debug/ |
D | mipi_stp_decoder.c | 82 typedef void (*stp_cb)(uint64_t data, uint64_t ts); 110 static void data4_cb(uint64_t data, uint64_t ts) in data4_cb() argument 112 ARG_UNUSED(ts); in data4_cb() 118 static void data8_cb(uint64_t data, uint64_t ts) in data8_cb() argument 120 ARG_UNUSED(ts); in data8_cb() 126 static void data16_cb(uint64_t data, uint64_t ts) in data16_cb() argument 128 ARG_UNUSED(ts); in data16_cb() 134 static void data32_cb(uint64_t data, uint64_t ts) in data32_cb() argument 136 ARG_UNUSED(ts); in data32_cb() 142 static void data64_cb(uint64_t data, uint64_t ts) in data64_cb() argument [all …]
|
/Zephyr-latest/tests/lib/c_lib/thrd/src/ |
D | thrd.h | 21 static inline void timespec_add_ms(struct timespec *ts, uint32_t ms) in timespec_add_ms() argument 25 ts->tv_nsec += ms * NSEC_PER_MSEC; in timespec_add_ms() 26 oflow = ts->tv_nsec >= NSEC_PER_SEC; in timespec_add_ms() 27 ts->tv_sec += oflow; in timespec_add_ms() 28 ts->tv_nsec -= oflow * NSEC_PER_SEC; in timespec_add_ms()
|
/Zephyr-latest/include/zephyr/drivers/misc/coresight/ |
D | stmesp.h | 56 static inline volatile void *_stmesp_get_data_reg(STMESP_Type *reg, bool ts, in _stmesp_get_data_reg() argument 59 if (ts) { in _stmesp_get_data_reg() 99 static inline void stmesp_flag(STMESP_Type *reg, uint32_t data, bool ts, bool guaranteed) in stmesp_flag() argument 101 if (ts) { in stmesp_flag() 124 static inline void stmesp_data8(STMESP_Type *reg, uint8_t data, bool ts, in stmesp_data8() argument 127 *(volatile uint8_t *)_stmesp_get_data_reg(reg, ts, marked, guaranteed) = data; in stmesp_data8() 138 static inline void stmesp_data16(STMESP_Type *reg, uint16_t data, bool ts, in stmesp_data16() argument 141 *(volatile uint16_t *)_stmesp_get_data_reg(reg, ts, marked, guaranteed) = data; in stmesp_data16() 152 static inline void stmesp_data32(STMESP_Type *reg, uint32_t data, bool ts, in stmesp_data32() argument 155 *(volatile uint32_t *)_stmesp_get_data_reg(reg, ts, marked, guaranteed) = data; in stmesp_data32()
|
/Zephyr-latest/lib/libc/common/source/time/ |
D | time.c | 14 struct timespec ts; in time() local 17 ret = clock_gettime(CLOCK_REALTIME, &ts); in time() 24 *tloc = ts.tv_sec; in time() 27 return ts.tv_sec; in time()
|
/Zephyr-latest/lib/posix/options/ |
D | clock.c | 56 int z_vrfy___posix_clock_get_base(clockid_t clock_id, struct timespec *ts) in z_vrfy___posix_clock_get_base() argument 58 K_OOPS(K_SYSCALL_MEMORY_WRITE(ts, sizeof(*ts))); in z_vrfy___posix_clock_get_base() 59 return z_impl___posix_clock_get_base(clock_id, ts); in z_vrfy___posix_clock_get_base() 64 int clock_gettime(clockid_t clock_id, struct timespec *ts) in clock_gettime() argument 87 ts->tv_sec = (time_t) elapsed_secs; in clock_gettime() 89 ts->tv_nsec = (int32_t) k_ticks_to_ns_floor32(nremainder); in clock_gettime() 91 ts->tv_sec += base.tv_sec; in clock_gettime() 92 ts->tv_nsec += base.tv_nsec; in clock_gettime() 93 if (ts->tv_nsec >= NSEC_PER_SEC) { in clock_gettime() 94 ts->tv_sec++; in clock_gettime() [all …]
|
/Zephyr-latest/scripts/pylib/twister/twisterlib/ |
D | testplan.py | 206 for _, ts in self.testsuites.items(): 207 self.scenarios.append(ts.id) 546 for _, ts in self.testsuites.items(): 547 for case in ts.testcases: 555 for _, ts in self.testsuites.items(): 556 if ts.tags.intersection(tag_filter): 557 for case in ts.testcases: 560 for _, ts in self.testsuites.items(): 561 for case in ts.testcases: 565 for _, ts in self.testsuites.items(): [all …]
|
/Zephyr-latest/subsys/testsuite/include/zephyr/ |
D | timestamp.h | 33 static inline uint32_t TIME_STAMP_DELTA_GET(uint32_t ts) in TIME_STAMP_DELTA_GET() argument 41 uint32_t res = (t >= ts) ? (t - ts) : (ULONG_MAX - ts + t); in TIME_STAMP_DELTA_GET() 43 if (ts > 0) { in TIME_STAMP_DELTA_GET()
|
/Zephyr-latest/subsys/net/lib/sntp/ |
D | sntp_simple.c | 13 struct sntp_time *ts) in sntp_simple_helper() argument 37 res = sntp_query(&sntp_ctx, iter_timeout, ts); in sntp_simple_helper() 48 res = sntp_recv_response(&sntp_ctx, iter_timeout, ts); in sntp_simple_helper() 75 struct sntp_time *ts) in sntp_simple_addr() argument 84 return sntp_simple_helper(addr, addr_len, timeout, ts); in sntp_simple_addr() 87 int sntp_simple(const char *server, uint32_t timeout, struct sntp_time *ts) in sntp_simple() argument 105 res = sntp_simple_helper(addr->ai_addr, addr->ai_addrlen, timeout, ts); in sntp_simple()
|
/Zephyr-latest/scripts/tests/twister_blackbox/ |
D | test_testplan.py | 78 (ts['platform'], ts['name'], tc['identifier']) \ 79 for ts in j['testsuites'] \ 80 for tc in ts['testcases'] if 'reason' not in tc 110 (ts['platform'], ts['name'], tc['identifier']) \ 111 for ts in j['testsuites'] \ 112 for tc in ts['testcases'] if 'reason' not in tc 143 (ts['platform'], ts['name'], tc['identifier']) \ 144 for ts in j['testsuites'] \ 145 for tc in ts['testcases'] if 'reason' not in tc
|
D | test_config.py | 52 (ts['platform'], ts['name'], tc['identifier']) \ 53 for ts in j['testsuites'] \ 54 for tc in ts['testcases'] if 'reason' not in tc 88 (ts['platform'], ts['name'], tc['identifier']) \ 89 for ts in j['testsuites'] \ 90 for tc in ts['testcases'] if 'reason' not in tc
|
D | test_filter.py | 117 (ts['platform'], ts['name'], tc['identifier']) \ 118 for ts in j['testsuites'] \ 119 for tc in ts['testcases'] if 'reason' not in tc 145 (ts['platform'], ts['name'], tc['identifier']) \ 146 for ts in j['testsuites'] \ 147 for tc in ts['testcases'] if 'reason' not in tc 173 (ts['platform'], ts['name'], tc['identifier']) \ 174 for ts in j['testsuites'] \ 175 for tc in ts['testcases'] if 'reason' not in tc 274 (ts['platform'], ts['name'], tc['identifier']) \ [all …]
|
D | test_footprint.py | 79 for ts in j['testsuites']: 80 if TwisterStatus(ts.get('status')) == TwisterStatus.NOTRUN: 82 ts[self.RAM_KEY] *= old_ram_multiplier 141 for ts in j['testsuites']: 142 if TwisterStatus(ts.get('status')) == TwisterStatus.NOTRUN: 143 assert self.RAM_KEY in ts 144 old_values += [ts[self.RAM_KEY]] 166 for ts in j['testsuites']: 167 if TwisterStatus(ts.get('status')) == TwisterStatus.NOTRUN: 168 assert self.RAM_KEY in ts [all …]
|
/Zephyr-latest/subsys/logging/frontends/ |
D | log_frontend_stmesp_demux.c | 41 uint32_t ts; member 262 static void store_turbo_log0(uint16_t m_id, uint16_t id, uint64_t *ts, uint16_t source_id) in store_turbo_log0() argument 269 .timestamp = ts ? *ts : 0, in store_turbo_log0() 279 static void store_turbo_log1(uint16_t m_id, uint16_t id, uint64_t *ts, uint32_t data) in store_turbo_log1() argument 286 .timestamp = ts ? *ts : 0, in store_turbo_log1() 296 static void store_tracepoint(uint16_t m_id, uint16_t id, uint64_t *ts, uint32_t *data) in store_tracepoint() argument 302 .timestamp = ts ? *ts : 0, in store_tracepoint() 311 static void log_frontend_stmesp_demux_hw_event(uint64_t *ts, uint8_t data) in log_frontend_stmesp_demux_hw_event() argument 316 .timestamp = ts ? *ts : 0, in log_frontend_stmesp_demux_hw_event() 336 if ((now - entry->ts) > CONFIG_LOG_FRONTEND_STMESP_DEMUX_GC_TIMEOUT) { in garbage_collector() [all …]
|
/Zephyr-latest/tests/subsys/logging/log_frontend_stmesp_demux/src/ |
D | main.c | 112 static int write_trace_point(uint16_t *m_id, uint16_t *c_id, uint32_t *data, uint64_t ts) in write_trace_point() argument 122 return log_frontend_stmesp_demux_packet_start(data, &ts); in write_trace_point() 125 static int write_hw_event(uint8_t evt, uint64_t ts) in write_hw_event() argument 131 return log_frontend_stmesp_demux_packet_start(&data, &ts); in write_hw_event() 134 static void packet_start(uint16_t *m_id, uint16_t *c_id, uint32_t data, uint64_t ts, int exp_rv, in packet_start() argument 147 rv = log_frontend_stmesp_demux_packet_start(&data, &ts); in packet_start() 188 static void write_packet(uint16_t m_id, uint16_t c_id, uint64_t ts, uint16_t len, uint8_t id) in write_packet() argument 195 log_frontend_stmesp_demux_timestamp(ts); in write_packet() 253 uint64_t ts = 0; in ZTEST() local 261 write_packet(M_ID0, 1, ts + i, len, i); in ZTEST() [all …]
|
/Zephyr-latest/subsys/net/lib/ptp/ |
D | tlv.c | 49 struct ptp_timestamp ts; in tlv_mgmt_post_recv() local 244 ts = *(struct ptp_timestamp *)mgmt_tlv->data; in tlv_mgmt_post_recv() 246 ts.seconds_high = ntohs(ts.seconds_high); in tlv_mgmt_post_recv() 247 ts.seconds_low = ntohl(ts.seconds_low); in tlv_mgmt_post_recv() 248 ts.nanoseconds = ntohl(ts.nanoseconds); in tlv_mgmt_post_recv() 250 memcpy(mgmt_tlv->data, &ts, sizeof(ts)); in tlv_mgmt_post_recv() 269 struct ptp_timestamp ts; in tlv_mgmt_pre_send() local 318 ts = *(struct ptp_timestamp *)mgmt_tlv->data; in tlv_mgmt_pre_send() 320 ts.seconds_high = htons(ts.seconds_high); in tlv_mgmt_pre_send() 321 ts.seconds_low = htonl(ts.seconds_low); in tlv_mgmt_pre_send() [all …]
|
/Zephyr-latest/dts/arm/st/f0/ |
D | stm32f031.dtsi | 46 ts-cal1-addr = <0x1FFFF7B8>; 47 ts-cal2-addr = <0x1FFFF7C2>; 48 ts-cal1-temp = <30>; 49 ts-cal2-temp = <110>; 50 ts-cal-vrefanalog = <3300>;
|
D | stm32f030.dtsi | 16 ts-cal1-addr = <0x1FFFF7B8>; 17 ts-cal1-temp = <30>; 18 ts-cal-vrefanalog = <3300>;
|
/Zephyr-latest/tests/lib/json/src/ |
D | main.c | 210 struct test_struct ts = { in ZTEST() local 279 len = json_calc_encoded_len(test_descr, ARRAY_SIZE(test_descr), &ts); in ZTEST() 283 &ts, buffer, sizeof(buffer)); in ZTEST() 292 struct test_struct ts; in ZTEST() local 327 ARRAY_SIZE(test_descr), &ts); in ZTEST() 332 zassert_str_equal(ts.some_string, "zephyr 123\\uABCD456", in ZTEST() 334 zassert_equal(ts.some_int, 42, "Positive integer not decoded correctly"); in ZTEST() 335 zassert_equal(ts.some_bool, true, "Boolean not decoded correctly"); in ZTEST() 336 zassert_equal(ts.some_int64, -4611686018427387904, in ZTEST() 338 zassert_equal(ts.another_int64, -2147483648, in ZTEST() [all …]
|
/Zephyr-latest/subsys/net/lib/config/ |
D | init_clock_sntp.c | 42 struct sntp_time ts; in net_init_clock_via_sntp() local 44 int res = sntp_init_helper(&ts); in net_init_clock_via_sntp() 51 tspec.tv_sec = ts.seconds; in net_init_clock_via_sntp() 52 tspec.tv_nsec = ((uint64_t)ts.fraction * (1000 * 1000 * 1000)) >> 32; in net_init_clock_via_sntp()
|
/Zephyr-latest/subsys/net/l2/ethernet/gptp/ |
D | gptp_private.h | 111 static inline uint64_t gptp_timestamp_to_nsec(struct net_ptp_time *ts) in gptp_timestamp_to_nsec() argument 113 if (!ts) { in gptp_timestamp_to_nsec() 117 return (ts->second * NSEC_PER_SEC) + ts->nanosecond; in gptp_timestamp_to_nsec()
|