Home
last modified time | relevance | path

Searched refs:USEC_PER_SEC (Results 1 – 25 of 66) sorted by relevance

123

/Zephyr-latest/tests/posix/timers/src/
Dsleep.c70 zassert_equal(0, usleep(USEC_PER_SEC - 1)); in ZTEST()
72 zassert_true(((now - then) * USEC_PER_MSEC) / (USEC_PER_SEC - 1) >= 1); in ZTEST()
75 zassert_equal(-1, usleep(USEC_PER_SEC)); in ZTEST()
85 zassert_equal(1, k_work_schedule(&wake_work.dwork, K_USEC(USEC_PER_SEC / 2))); in ZTEST()
86 zassert_equal(-1, usleep(USEC_PER_SEC - 1)); in ZTEST()
/Zephyr-latest/subsys/net/lib/sntp/
Dsntp.c51 return (int64_t)(t >> 16) * (int64_t)USEC_PER_SEC + in q16_16_s_to_ll_us()
52 (((int64_t)(t & 0xFFFF) * (int64_t)USEC_PER_SEC) >> 16); in q16_16_s_to_ll_us()
57 return (uint64_t)t_s * USEC_PER_SEC + (((uint64_t)t_f * (uint64_t)USEC_PER_SEC) >> 32); in q32_32_s_to_ll_us()
117 precision_us = (uint32_t)(USEC_PER_SEC + USEC_PER_SEC / 2) >> -pkt->precision; in parse_response()
119 precision_us = (uint32_t)(USEC_PER_SEC + USEC_PER_SEC / 2) << pkt->precision; in parse_response()
126 res->seconds = (res->uptime_us + clk_offset_us) / USEC_PER_SEC; in parse_response()
127 res->fraction = (res->uptime_us + clk_offset_us) % USEC_PER_SEC; in parse_response()
195 ctx->expected_orig_ts.seconds = ts_us / USEC_PER_SEC; in sntp_query_send()
196 ctx->expected_orig_ts.fraction = (ts_us % USEC_PER_SEC) * (UINT32_MAX / USEC_PER_SEC); in sntp_query_send()
/Zephyr-latest/drivers/watchdog/
Dwdt_iwdg_stm32.c36 * USEC_PER_SEC / LSI_VALUE)
41 USEC_PER_SEC / LSI_VALUE)
70 uint32_t ticks = (uint64_t)timeout * LSI_VALUE / USEC_PER_SEC; in iwdg_stm32_convert_timeout()
Dwdt_wwdg_stm32.c120 return USEC_PER_SEC * (((counter & 0x3F) + 1) / f_wwdg); in wwdg_stm32_get_timeout()
139 float timeout_s = (float)timeout / USEC_PER_SEC; in wwdg_stm32_convert_timeout()
/Zephyr-latest/samples/drivers/counter/alarm/src/
Dmain.c93 now_sec = (int)(now_usec / USEC_PER_SEC); in test_counter_interrupt_fn()
103 config->ticks) / USEC_PER_SEC), in test_counter_interrupt_fn()
136 alarm_cfg.ticks) / USEC_PER_SEC), in main()
/Zephyr-latest/samples/bluetooth/bap_broadcast_sink/src/
Dlc3.h41 ((LC3_MAX_FRAME_DURATION_US * LC3_MAX_SAMPLE_RATE_HZ) / USEC_PER_SEC)
/Zephyr-latest/samples/boards/nordic/clock_skew/src/
Dmain.c27 return z_tmcvt(local, sync_config.local_Hz, USEC_PER_SEC, false, in local_to_us()
34 return z_tmcvt(ref, sync_config.ref_Hz, USEC_PER_SEC, false, in ref_to_us()
49 us = rem % USEC_PER_SEC; in us_to_text_r()
50 rem /= USEC_PER_SEC; in us_to_text_r()
/Zephyr-latest/samples/boards/nxp/mimxrt595_evk/system_off/src/
Dmain.c30 alarm_cfg.ticks = counter_us_to_ticks(dev, 10 * USEC_PER_SEC); in main()
/Zephyr-latest/subsys/net/lib/zperf/
Dzperf_udp_uploader.c44 ntohl(UNALIGNED_GET(&stat->stop_sec)) * USEC_PER_SEC; in zperf_upload_decode_stat()
46 ntohl(UNALIGNED_GET(&stat->jitter1)) * USEC_PER_SEC; in zperf_upload_decode_stat()
61 uint32_t usecs = k_ticks_to_us_ceil32(end_time) - secs * USEC_PER_SEC; in zperf_upload_fin()
209 secs = usecs64 / USEC_PER_SEC; in udp_upload()
210 usecs = usecs64 - (uint64_t)secs * USEC_PER_SEC; in udp_upload()
Dzperf_udp_receiver.c167 session->stat.stop_sec = duration / USEC_PER_SEC; in udp_received()
168 session->stat.stop_usec = duration % USEC_PER_SEC; in udp_received()
200 ntohl(hdr->tv_sec) * USEC_PER_SEC + in udp_received()
/Zephyr-latest/samples/boards/nordic/battery/src/
Dmain.c79 k_busy_wait(5 * USEC_PER_SEC); in main()
/Zephyr-latest/samples/boards/ti/cc13x2_cc26x2/system_off/src/
Dmain.c48 k_busy_wait(BUSY_WAIT_S * USEC_PER_SEC); in main()
/Zephyr-latest/samples/bluetooth/bap_unicast_client/src/
Dstream_lc3.c31 #define LC3_MAX_NUM_SAMPLES ((LC3_MAX_FRAME_DURATION_US * LC3_MAX_SAMPLE_RATE) / USEC_PER_SEC)
45 (stream->lc3_tx.frame_duration_us * stream->lc3_tx.freq_hz) / USEC_PER_SEC; in fill_audio_buf_sin()
/Zephyr-latest/tests/lib/sys_util/src/
Dmain.c34 expected = 1000*(sys_clock_hw_cycles_per_sec()/USEC_PER_SEC); in ZTEST()
/Zephyr-latest/drivers/timer/
Dcortex_m_systick.c313 ((uint64_t)ticks * USEC_PER_SEC) / CONFIG_SYS_CLOCK_TICKS_PER_SEC; in sys_clock_set_timeout()
462 ((uint64_t)systick_diff * USEC_PER_SEC) / sys_clock_hw_cycles_per_sec(); in sys_clock_idle_exit()
488 USEC_PER_SEC; in sys_clock_idle_exit()
Dstm32_lptim_timer.c225 ((uint64_t)ticks * USEC_PER_SEC) / CONFIG_SYS_CLOCK_TICKS_PER_SEC; in sys_clock_set_timeout()
631 USEC_PER_SEC; in sys_clock_idle_exit()
Darm_arch_timer.c203 uint64_t cycles_to_wait = sys_clock_hw_cycles_per_sec() / USEC_PER_SEC * usec_to_wait; in arch_busy_wait()
/Zephyr-latest/drivers/counter/
Dcounter_sam_tc.c78 USEC_PER_SEC,
96 USEC_PER_SEC, USEC_PER_SEC, USEC_PER_SEC,
/Zephyr-latest/samples/boards/nordic/system_off/src/
Dmain.c75 int err = z_nrf_grtc_wakeup_prepare(DEEP_SLEEP_TIME_S * USEC_PER_SEC); in main()
/Zephyr-latest/samples/boards/nxp/mimxrt1060_evk/system_off/src/
Dmain.c61 k_busy_wait(BUSY_WAIT_S * USEC_PER_SEC); in main()
/Zephyr-latest/drivers/sensor/aosong/dht/
Ddht.c39 (uint64_t)USEC_PER_SEC in dht_measure_signal_duration()
55 (uint64_t)USEC_PER_SEC / in dht_measure_signal_duration()
/Zephyr-latest/samples/bluetooth/bap_broadcast_source/src/
Dmain.c71 #define MAX_NUM_SAMPLES ((MAX_FRAME_DURATION_US * MAX_SAMPLE_RATE) / USEC_PER_SEC)
87 #define USB_SAMPLE_CNT ((USB_FRAME_DURATION_US * USB_SAMPLE_RATE) / USEC_PER_SEC)
88 #define USB_DOWNSSAMPLE_CNT ((USB_FRAME_DURATION_US * USB_DOWNSAMPLE_RATE) / USEC_PER_SEC)
118 const unsigned int num_samples = (length_us * sample_rate_hz) / USEC_PER_SEC; in fill_audio_buf_sin()
/Zephyr-latest/include/zephyr/drivers/
Dcounter.h317 uint64_t ticks = (us * z_impl_counter_get_frequency(dev)) / USEC_PER_SEC; in z_impl_counter_us_to_ticks()
335 return ((uint64_t)ticks * USEC_PER_SEC) / z_impl_counter_get_frequency(dev); in z_impl_counter_ticks_to_us()
/Zephyr-latest/tests/bsim/bluetooth/audio/src/
Dcommon.h77 #define WAIT_TIME (WAIT_SECONDS * USEC_PER_SEC) /* microseconds*/
/Zephyr-latest/include/zephyr/
Dsys_clock.h110 #define USEC_PER_SEC ((USEC_PER_MSEC) * (MSEC_PER_SEC)) macro

123