/nrf52832-nimble/packages/NimBLE-latest/porting/nimble/src/ |
H A D | os_cputime_pwr2.c | 38 * os cputime usecs to ticks 40 * Converts the given number of microseconds into cputime ticks. 42 * @param usecs The number of microseconds to convert to ticks 44 * @return uint32_t The number of ticks corresponding to 'usecs' 49 uint64_t ticks; in os_cputime_usecs_to_ticks() local 56 ticks = (1ULL << 32) * MYNEWT_VAL(OS_CPUTIME_FREQ) / 1000000 * usecs; in os_cputime_usecs_to_ticks() 59 //ticks += ((uint64_t)usecs * (1526122139+1)) >> 32; in os_cputime_usecs_to_ticks() 61 return ticks >> 32; in os_cputime_usecs_to_ticks() 65 * cputime ticks to usecs 67 * Convert the given number of ticks into microseconds. [all …]
|
H A D | os_cputime.c | 36 /* Set the ticks per microsecond. */ in os_cputime_init() 45 * Wait until the number of ticks has elapsed. This is a blocking delay. 47 * @param ticks The number of ticks to wait. 50 os_cputime_delay_ticks(uint32_t ticks) in os_cputime_delay_ticks() argument 54 until = os_cputime_get32() + ticks; in os_cputime_delay_ticks() 64 uint32_t ticks; in os_cputime_delay_nsecs() local 66 ticks = os_cputime_nsecs_to_ticks(nsecs); in os_cputime_delay_nsecs() 67 os_cputime_delay_ticks(ticks); in os_cputime_delay_nsecs() 74 uint32_t ticks; in os_cputime_delay_usecs() local 76 ticks = os_cputime_usecs_to_ticks(usecs); in os_cputime_delay_usecs() [all …]
|
H A D | hal_timer.c | 277 * If we are within 3 ticks of RTC, we wont be able to set compare. in hal_timer_chk_queue() 684 * Blocking delay for n ticks 687 * @param ticks 692 hal_timer_delay(int timer_num, uint32_t ticks) in hal_timer_delay() argument 696 until = hal_timer_read(timer_num) + ticks; in hal_timer_delay() 734 hal_timer_start(struct hal_timer *timer, uint32_t ticks) in hal_timer_start() argument 743 tick = hal_timer_read_bsptimer(bsptimer) + ticks; in hal_timer_start() 745 tick = nrf_read_timer_cntr(bsptimer->tmr_reg) + ticks; in hal_timer_start()
|
/nrf52832-nimble/packages/NimBLE-latest/porting/nimble/include/os/ |
H A D | os_cputime.h | 81 uint32_t ticks_per_usec; /* number of ticks per usec */ 116 * Converts the given number of nanoseconds into cputime ticks. 119 * @param usecs The number of nanoseconds to convert to ticks 121 * @return uint32_t The number of ticks corresponding to 'nsecs' 126 * Convert the given number of ticks into nanoseconds. 129 * @param ticks The number of ticks to convert to nanoseconds. 131 * @return uint32_t The number of nanoseconds corresponding to 'ticks' 133 uint32_t os_cputime_ticks_to_nsecs(uint32_t ticks); 151 * Converts the given number of microseconds into cputime ticks. 153 * @param usecs The number of microseconds to convert to ticks [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/porting/npl/rtthread/src/ |
H A D | npl_os_rtthread.c | 17 static ble_npl_error_t npl_rtthread_callout_reset(struct ble_npl_callout *co, ble_npl_time_t ticks); 20 static ble_npl_error_t npl_rtthread_time_ticks_to_ms(ble_npl_time_t ticks, uint32_t *out_ms); 238 ble_npl_error_t ble_npl_callout_reset(struct ble_npl_callout *co, ble_npl_time_t ticks) in ble_npl_callout_reset() argument 240 return npl_rtthread_callout_reset(co, ticks); in ble_npl_callout_reset() 280 ble_npl_error_t ble_npl_time_ticks_to_ms(ble_npl_time_t ticks, uint32_t *out_ms) in ble_npl_time_ticks_to_ms() argument 282 return npl_rtthread_time_ticks_to_ms(ticks, out_ms); in ble_npl_time_ticks_to_ms() 290 uint32_t ble_npl_time_ticks_to_ms32(ble_npl_time_t ticks) in ble_npl_time_ticks_to_ms32() argument 292 return ticks * 1000 / RT_TICK_PER_SECOND; in ble_npl_time_ticks_to_ms32() 295 void ble_npl_time_delay(ble_npl_time_t ticks) in ble_npl_time_delay() argument 297 rt_thread_delay(ticks); in ble_npl_time_delay() [all …]
|
/nrf52832-nimble/rt-thread/components/CMSIS/RTOS/ |
H A D | cmsis_rtthread.c | 109 rt_tick_t ticks; in osDelay() local 111 ticks = rt_tick_from_millisecond(millisec); in osDelay() 112 result = rt_thread_delay(ticks); in osDelay() 124 rt_tick_t ticks; in osWait() local 126 ticks = rt_tick_from_millisecond(millisec); in osWait() 127 result = rt_thread_delay(ticks); in osWait() 155 rt_tick_t ticks; in osTimerStart() local 157 ticks = rt_tick_from_millisecond(millisec); in osTimerStart() 158 rt_timer_control(timer_id, RT_TIMER_CTRL_SET_TIME, &ticks); in osTimerStart() 190 rt_tick_t ticks; in osMutexWait() local [all …]
|
/nrf52832-nimble/nordic/nrfx/drivers/src/ |
H A D | nrfx_systick.c | 37 * @brief Maximum number of ticks to delay 39 * The maximum number of ticks should be much lower than 80 * @brief Function that converts microseconds to ticks 82 * Function converts from microseconds to CPU ticks. 86 * @return Number of ticks 96 * @brief Function that converts milliseconds to ticks 98 * Function converts from milliseconds to CPU ticks. 102 * @return Number of ticks 133 void nrfx_systick_delay_ticks(uint32_t ticks) in nrfx_systick_delay_ticks() argument 135 NRFX_ASSERT(ticks <= NRFX_SYSTICK_TICKS_MAX); in nrfx_systick_delay_ticks() [all …]
|
H A D | nrfx_rtc.c | 61 … uint8_t tick_latency; /**< Maximum length of interrupt handler in ticks (max 7.7 ms). */ 266 uint32_t ticks; in nrfx_rtc_max_ticks_get() local 269 ticks = RTC_COUNTER_COUNTER_Msk - m_cb[p_instance->instance_id].tick_latency; in nrfx_rtc_max_ticks_get() 273 ticks = RTC_COUNTER_COUNTER_Msk; in nrfx_rtc_max_ticks_get() 275 return ticks; in nrfx_rtc_max_ticks_get()
|
/nrf52832-nimble/packages/NimBLE-latest/porting/npl/linux/src/ |
H A D | os_time.c | 30 * Return ticks [ms] since system start as uint32_t. 51 ble_npl_error_t ble_npl_time_ticks_to_ms(ble_npl_time_t ticks, uint32_t *out_ms) in ble_npl_time_ticks_to_ms() argument 53 *out_ms = ticks; in ble_npl_time_ticks_to_ms() 63 uint32_t ble_npl_time_ticks_to_ms32(ble_npl_time_t ticks) in ble_npl_time_ticks_to_ms32() argument 65 return ticks; in ble_npl_time_ticks_to_ms32() 69 ble_npl_time_delay(ble_npl_time_t ticks) in ble_npl_time_delay() argument 71 sleep(ble_npl_time_ticks_to_ms32(ticks)/1000); in ble_npl_time_delay()
|
H A D | os_callout.c | 78 ble_npl_time_t ticks) in ble_npl_callout_reset() argument 82 if (ticks < 0) { in ble_npl_callout_reset() 86 if (ticks == 0) { in ble_npl_callout_reset() 87 ticks = 1; in ble_npl_callout_reset() 90 c->c_ticks = ble_npl_time_get() + ticks; in ble_npl_callout_reset() 94 its.it_value.tv_sec = (ticks / 1000); in ble_npl_callout_reset() 95 its.it_value.tv_nsec = (ticks % 1000) * 1000000; // expiration in ble_npl_callout_reset()
|
/nrf52832-nimble/packages/NimBLE-latest/porting/nimble/include/hal/ |
H A D | hal_timer.h | 112 * Perform a blocking delay for a number of ticks. 115 * @param ticks The number of ticks to delay for 119 int hal_timer_delay(int timer_num, uint32_t ticks); 136 * Start a timer that will expire in 'ticks' ticks. Ticks cannot be 0 139 * @param ticks The number of ticks to expire the timer in 143 int hal_timer_start(struct hal_timer *tmr, uint32_t ticks);
|
/nrf52832-nimble/packages/NimBLE-latest/porting/npl/freertos/src/ |
H A D | npl_os_freertos.c | 278 npl_freertos_callout_reset(struct ble_npl_callout *co, ble_npl_time_t ticks) in npl_freertos_callout_reset() argument 282 if (ticks < 0) { in npl_freertos_callout_reset() 286 if (ticks == 0) { in npl_freertos_callout_reset() 287 ticks = 1; in npl_freertos_callout_reset() 292 xTimerChangePeriodFromISR(co->handle, ticks, &woken2); in npl_freertos_callout_reset() 298 xTimerChangePeriod(co->handle, ticks, portMAX_DELAY); in npl_freertos_callout_reset() 326 uint64_t ticks; in npl_freertos_time_ms_to_ticks() local 328 ticks = ((uint64_t)ms * configTICK_RATE_HZ) / 1000; in npl_freertos_time_ms_to_ticks() 329 if (ticks > UINT32_MAX) { in npl_freertos_time_ms_to_ticks() 333 *out_ticks = ticks; in npl_freertos_time_ms_to_ticks() [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/porting/npl/freertos/include/nimble/ |
H A D | nimble_npl_os.h | 201 ble_npl_callout_reset(struct ble_npl_callout *co, ble_npl_time_t ticks) in ble_npl_callout_reset() argument 203 return npl_freertos_callout_reset(co, ticks); in ble_npl_callout_reset() 250 ble_npl_time_ticks_to_ms(ble_npl_time_t ticks, uint32_t *out_ms) in ble_npl_time_ticks_to_ms() argument 252 return ble_npl_time_ticks_to_ms(ticks, out_ms); in ble_npl_time_ticks_to_ms() 262 ble_npl_time_ticks_to_ms32(ble_npl_time_t ticks) in ble_npl_time_ticks_to_ms32() argument 264 return ticks * 1000 / configTICK_RATE_HZ; in ble_npl_time_ticks_to_ms32() 268 ble_npl_time_delay(ble_npl_time_t ticks) in ble_npl_time_delay() argument 270 vTaskDelay(ticks); in ble_npl_time_delay()
|
/nrf52832-nimble/packages/NimBLE-latest/porting/npl/mynewt/include/nimble/ |
H A D | nimble_npl_os.h | 202 ble_npl_callout_reset(struct ble_npl_callout *co, ble_npl_time_t ticks) in ble_npl_callout_reset() argument 204 return os_callout_reset(&co->co, ticks); in ble_npl_callout_reset() 252 ble_npl_time_ticks_to_ms(ble_npl_time_t ticks, uint32_t *out_ms) in ble_npl_time_ticks_to_ms() argument 254 return os_time_ticks_to_ms(ticks, out_ms); in ble_npl_time_ticks_to_ms() 264 ble_npl_time_ticks_to_ms32(ble_npl_time_t ticks) in ble_npl_time_ticks_to_ms32() argument 266 return os_time_ticks_to_ms32(ticks); in ble_npl_time_ticks_to_ms32() 270 ble_npl_time_delay(ble_npl_time_t ticks) in ble_npl_time_delay() argument 272 return os_time_delay(ticks); in ble_npl_time_delay()
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/include/lwip/ |
H A D | dhcp.h | 82 u16_t request_timeout; /* #ticks with period DHCP_FINE_TIMER_SECS for request timeout */ 83 u16_t t1_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for renewal time */ 84 u16_t t2_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for rebind time */ 85 u16_t t1_renew_time; /* #ticks with period DHCP_COARSE_TIMER_SECS until next renew try */ 86 u16_t t2_rebind_time; /* #ticks with period DHCP_COARSE_TIMER_SECS until next rebind try */ 87 u16_t lease_used; /* #ticks with period DHCP_COARSE_TIMER_SECS since last received DHCP ack */ 88 u16_t t0_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for lease time */
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/include/lwip/ |
H A D | dhcp.h | 87 u16_t request_timeout; /* #ticks with period DHCP_FINE_TIMER_SECS for request timeout */ 88 u16_t t1_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for renewal time */ 89 u16_t t2_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for rebind time */ 90 u16_t t1_renew_time; /* #ticks with period DHCP_COARSE_TIMER_SECS until next renew try */ 91 u16_t t2_rebind_time; /* #ticks with period DHCP_COARSE_TIMER_SECS until next rebind try */ 92 u16_t lease_used; /* #ticks with period DHCP_COARSE_TIMER_SECS since last received DHCP ack */ 93 u16_t t0_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for lease time */
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/include/nimble/ |
H A D | nimble_npl.h | 123 ble_npl_time_t ticks); 144 ble_npl_error_t ble_npl_time_ticks_to_ms(ble_npl_time_t ticks, uint32_t *out_ms); 148 uint32_t ble_npl_time_ticks_to_ms32(ble_npl_time_t ticks); 150 void ble_npl_time_delay(ble_npl_time_t ticks);
|
/nrf52832-nimble/nordic/nrfx/drivers/include/ |
H A D | nrfx_systick.h | 98 * @brief Blocking delay in CPU ticks 100 * @param[in] ticks Number of CPU ticks to delay. 102 void nrfx_systick_delay_ticks(uint32_t ticks);
|
H A D | nrfx_rtc.h | 49 /**@brief Macro to convert microseconds into ticks. */ 99 uint8_t tick_latency; /**< Maximum length of interrupt handler in ticks (max 7.7 ms). */ 167 * - The maximum preemption time in ticks (8 - bit value) is known and is less than 7.7 ms 235 /**@brief Function for getting the maximum relative ticks value that can be set in the compare chan… 245 * @retval ticks Maximum ticks value.
|
/nrf52832-nimble/packages/NimBLE-latest/porting/npl/riot/src/ |
H A D | npl_os_riot.c | 60 ble_npl_callout_reset(struct ble_npl_callout *c, ble_npl_time_t ticks) in ble_npl_callout_reset() argument 63 c->target_ticks = (ble_npl_time_t)((now / 1000) + ticks); in ble_npl_callout_reset() 64 xtimer_set(&c->timer, ((ticks * 1000) - ((xtimer_now_usec() - now) / 1000))); in ble_npl_callout_reset()
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/controller/src/ |
H A D | ble_ll_sched.c | 39 /* Settling time of crystal, in ticks */ 340 * request. At 1 Mbps, this is 1752 usecs, or 57.41 ticks. Using 57 ticks in ble_ll_sched_master_new() 363 * start (the anchor point) is sched offset ticks from the schedule start in ble_ll_sched_master_new() 395 // 150 + 352 + 2500 = 3002us = 98.37 ticks in ble_ll_sched_master_new() 398 // 150 + 180 + 2500 = 2830us = 92.73 ticks in ble_ll_sched_master_new() 401 // 150 + 2896 + 3750 = 6796us = 222.69 ticks in ble_ll_sched_master_new() 424 * (tse = ticks since epoch) in ble_ll_sched_master_new() 503 * NOTE: we dont add sched offset ticks as we want to under-estimate in ble_ll_sched_master_new() 570 * request. At 1 Mbps, this is 1752 usecs, or 57.41 ticks. Using 57 ticks in ble_ll_sched_master_new() 593 * start (the anchor point) is sched offset ticks from the schedule start in ble_ll_sched_master_new() [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/porting/npl/riot/include/nimble/ |
H A D | nimble_npl_os.h | 229 ble_npl_time_ticks_to_ms(ble_npl_time_t ticks, uint32_t *out_ms) in ble_npl_time_ticks_to_ms() argument 231 *out_ms = ticks; in ble_npl_time_ticks_to_ms() 242 ble_npl_time_ticks_to_ms32(ble_npl_time_t ticks) in ble_npl_time_ticks_to_ms32() argument 244 return ticks; in ble_npl_time_ticks_to_ms32()
|
/nrf52832-nimble/packages/NimBLE-latest/porting/npl/dummy/src/ |
H A D | npl_os_dummy.c | 137 ble_npl_callout_reset(struct ble_npl_callout *c, ble_npl_time_t ticks) in ble_npl_callout_reset() argument 173 ble_npl_time_ticks_to_ms(ble_npl_time_t ticks, uint32_t *out_ms) in ble_npl_time_ticks_to_ms() argument 185 ble_npl_time_ticks_to_ms32(ble_npl_time_t ticks) in ble_npl_time_ticks_to_ms32() argument
|
/nrf52832-nimble/rt-thread/components/net/uip/apps/dhcpc/ |
H A D | dhcpc.c | 254 s.ticks = CLOCK_SECOND; in PT_THREAD() 258 timer_set(&s.timer, s.ticks); in PT_THREAD() 266 if(s.ticks < CLOCK_SECOND * 60) { in PT_THREAD() 267 s.ticks *= 2; in PT_THREAD() 271 s.ticks = CLOCK_SECOND; in PT_THREAD() 275 timer_set(&s.timer, s.ticks); in PT_THREAD() 283 if(s.ticks <= CLOCK_SECOND * 10) { in PT_THREAD() 284 s.ticks += CLOCK_SECOND; in PT_THREAD()
|
/nrf52832-nimble/nordic/nrfx/hal/ |
H A D | nrf_timer.h | 484 * @brief Function for calculating the number of timer ticks for a given time 490 * @return Number of timer ticks. 496 * @brief Function for calculating the number of timer ticks for a given time 502 * @return Number of timer ticks. 679 uint64_t ticks = ((time_us * 16ULL) >> prescaler); in nrf_timer_us_to_ticks() local 680 NRFX_ASSERT(ticks <= UINT32_MAX); in nrf_timer_us_to_ticks() 681 return (uint32_t)ticks; in nrf_timer_us_to_ticks() 690 uint64_t ticks = ((time_ms * 16000ULL) >> prescaler); in nrf_timer_ms_to_ticks() local 691 NRFX_ASSERT(ticks <= UINT32_MAX); in nrf_timer_ms_to_ticks() 692 return (uint32_t)ticks; in nrf_timer_ms_to_ticks()
|