/nrf52832-nimble/rt-thread/components/drivers/hwtimer/ |
H A D | hwtimer.c | 14 rt_inline rt_uint32_t timeout_calc(rt_hwtimer_t *timer, rt_hwtimerval_t *tv) in timeout_calc() argument 25 overflow = timer->info->maxcnt/(float)timer->freq; in timeout_calc() 28 if (tv_sec < (1/(float)timer->freq)) in timeout_calc() 32 timeout = 1/(float)timer->freq; in timeout_calc() 42 counter = timeout*timer->freq; in timeout_calc() 43 devi = tv_sec - (counter/(float)timer->freq)*i; in timeout_calc() 64 timer->cycles = i; in timeout_calc() 65 timer->reload = i; in timeout_calc() 66 timer->period_sec = timeout; in timeout_calc() 67 counter = timeout*timer->freq; in timeout_calc() [all …]
|
H A D | README_CN.md | 31 void (*init)(struct rt_hwtimer_device *timer, rt_uint32_t state); 32 rt_err_t (*start)(struct rt_hwtimer_device *timer, rt_uint32_t cnt, rt_hwtimer_mode_t mode); 33 void (*stop)(struct rt_hwtimer_device *timer); 34 rt_uint32_t (*count_get)(struct rt_hwtimer_device *timer); 35 rt_err_t (*control)(struct rt_hwtimer_device *timer, rt_uint32_t cmd, void *args);
|
/nrf52832-nimble/rt-thread/src/ |
H A D | timer.c | 9 * 2006-04-29 Bernard implement thread timer 11 * 2006-08-10 Bernard fix the periodic timer bug 13 * 2009-11-11 LiJin add soft timer 14 * 2010-05-12 Bernard fix the timer check bug. 16 * 2012-12-15 Bernard fix the next timeout issue in soft timer 17 * 2014-07-12 Bernard does not lock scheduler when invoking soft-timer 24 /* hard timer list */ 36 /* soft timer list */ 46 static void (*rt_timer_enter_hook)(struct rt_timer *timer); 47 static void (*rt_timer_exit_hook)(struct rt_timer *timer); [all …]
|
H A D | Kconfig | 8 Each kernel object, such as thread, timer, semaphore etc, has a name, 93 bool "Enable software timer with a timer thread" 96 the timeout function context of soft-timer is under a high priority timer 101 int "The priority level value of timer thread" 105 int "The stack size of timer thread" 149 bool "Enable debugging of Timer"
|
/nrf52832-nimble/packages/NimBLE-latest/porting/nimble/include/hal/ |
H A D | hal_timer.h | 24 * @defgroup HALTimer HAL Timer 38 /* HAL timer callback */ 42 * The HAL timer structure. The user can declare as many of these structures 43 * as desired. They are enqueued on a particular HW timer queue when the user 46 * timer. 49 * structure; the hal timer API should be used. 58 /** Tick at which timer should expire */ 64 * Initialize a HW timer. 66 * @param timer_num The number of the HW timer to initialize 67 * @param cfg Hardware specific timer configuration. This is [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/porting/nimble/src/ |
H A D | hal_timer.c | 44 /* User CC 2 for reading counter, CC 3 for timer isr */ 54 /* Maximum timer frequency */ 121 /* Resolve timer number into timer structure */ 141 /* Force a capture of the timer into 'cntr' capture channel; read it */ in nrf_read_timer_cntr() 149 * nrf timer set ocmp 151 * Set the OCMP used by the timer to the desired expiration tick 155 * @param timer Pointer to timer. 201 /* Set output compare register to timer expiration */ in nrf_timer_set_ocmp() 217 /* Disable output compare used for timer */ 258 * hal timer chk queue [all …]
|
H A D | os_cputime.c | 81 os_cputime_timer_init(struct hal_timer *timer, hal_timer_cb fp, void *arg) in os_cputime_timer_init() argument 83 assert(timer != NULL); in os_cputime_timer_init() 86 hal_timer_set_cb(MYNEWT_VAL(OS_CPUTIME_TIMER_NUM), timer, fp, arg); in os_cputime_timer_init() 90 os_cputime_timer_start(struct hal_timer *timer, uint32_t cputime) in os_cputime_timer_start() argument 94 rc = hal_timer_start_at(timer, cputime); in os_cputime_timer_start() 99 os_cputime_timer_relative(struct hal_timer *timer, uint32_t usecs) in os_cputime_timer_relative() argument 104 assert(timer != NULL); in os_cputime_timer_relative() 107 rc = hal_timer_start_at(timer, cputime); in os_cputime_timer_relative() 113 os_cputime_timer_stop(struct hal_timer *timer) in os_cputime_timer_stop() argument 115 hal_timer_stop(timer); in os_cputime_timer_stop()
|
/nrf52832-nimble/nordic/nrfx/hal/ |
H A D | nrf_timer.h | 42 * @defgroup nrf_timer_hal TIMER HAL 45 * @brief Hardware access layer for managing the TIMER peripheral. 52 #define TIMER_MAX_SIZE(id) NRFX_CONCAT_3(TIMER, id, _MAX_SIZE) 85 * in a given timer instance. 87 #define NRF_TIMER_CC_CHANNEL_COUNT(id) NRFX_CONCAT_3(TIMER, id, _CC_NUM) 90 * @brief Timer tasks. 95 …TIMER_TASK_START = offsetof(NRF_TIMER_Type, TASKS_START), ///< Task for starting the timer. 96 …TIMER_TASK_STOP = offsetof(NRF_TIMER_Type, TASKS_STOP), ///< Task for stopping the timer. 97 …offsetof(NRF_TIMER_Type, TASKS_COUNT), ///< Task for incrementing the timer (in counter mode). 98 …ASK_CLEAR = offsetof(NRF_TIMER_Type, TASKS_CLEAR), ///< Task for resetting the timer value. [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/porting/nimble/include/os/ |
H A D | os_cputime.h | 98 * and before any other timer API are used. This should be called only once 99 * and should be called before the hardware timer is used. 184 * Initialize a CPU timer, using the given HAL timer. 186 * @param timer The timer to initialize. Cannot be NULL. 187 * @param fp The timer callback function. Cannot be NULL. 188 * @param arg Pointer to data object to pass to timer. 190 void os_cputime_timer_init(struct hal_timer *timer, hal_timer_cb fp, 195 * passed, the timer callback will still be called (at interrupt context). 197 * NOTE: This must be called when the timer is stopped. 199 * @param timer Pointer to timer to start. Cannot be NULL. [all …]
|
/nrf52832-nimble/nordic/nrfx/drivers/include/ |
H A D | nrfx_timer.h | 43 * @defgroup nrfx_timer Timer driver 46 * @brief TIMER peripheral driver. 50 * @brief Timer driver instance data structure. 54 …NRF_TIMER_Type * p_reg; ///< Pointer to the structure with TIMER peripheral instance re… 60 * @brief Macro for creating a timer driver instance. 89 * @brief Timer driver instance configuration structure. 101 * @brief Timer driver instance default configuration. 113 * @brief Timer driver event handler type. 115 * @param[in] event_type Timer event. 117 * the timer. This parameter can be used to pass [all …]
|
/nrf52832-nimble/rt-thread/components/net/uip/uip/ |
H A D | uip_timer.h | 2 * \defgroup timer Timer library 4 * The timer library provides functions for setting, resetting and 5 * restarting timers, and for checking if a timer has expired. An 9 * A timer is declared as a \c struct \c timer and all access to the 10 * timer is made by a pointer to the declared timer. 12 * \note The timer library uses the \ref clock "Clock library" to 22 * Timer library header file. 59 * $Id: timer.h,v 1.3 2006/06/11 21:46:39 adam Exp $ 67 * A timer. 69 * This structure is used for declaring a timer. The timer must be set [all …]
|
H A D | uip_timer.c | 2 * \addtogroup timer 8 * Timer library implementation. 45 * $Id: timer.c,v 1.2 2006/06/12 08:00:30 adam Exp $ 54 * Set a timer. 56 * This function is used to set a timer for a time sometime in the 58 * the timer has expired. 60 * \param t A pointer to the timer 61 * \param interval The interval before the timer expires. 65 timer_set(struct timer *t, clock_time_t interval) in timer_set() 72 * Reset the timer with the same interval. [all …]
|
H A D | uip_clock.h | 4 * The clock interface is the interface between the \ref timer "timer library" 7 * timer "timer library". 13 * \sa \ref timer "Timer library"
|
/nrf52832-nimble/rt-thread/components/net/uip/doc/html/ |
H A D | a00156.html | 3 <title>uIP 1.0: Timer library</title> 16 <h1>Timer library</h1><hr><a name="_details"></a><h2>Detailed Description</h2> 17 The timer library provides functions for setting, resetting and restarting timers, and for checking… 20 A timer is declared as a <code>struct</code> <code>timer</code> and all access to the timer is made… 21 <dl compact><dt><b>Note:</b></dt><dd>The timer library uses the <a class="el" href="a00157.html">Cl… 27 …/td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html">timer.h</a></td></tr> 29 <tr><td class="mdescLeft"> </td><td class="mdescRight">Timer library header file. <br></td></t… 32 …/td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html">timer.c</a></td></tr> 34 <tr><td class="mdescLeft"> </td><td class="mdescRight">Timer library implementation. <br></td>… 38 …;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html">timer</a></td></tr> [all …]
|
H A D | a00130.html | 3 <title>uIP 1.0: uip/timer.h File Reference</title> 21 <h1>uip/timer.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2> 22 Timer library header file. 27 Definition in file <a class="el" href="a00196.html">timer.h</a>. 35 …;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html">timer</a></td></tr> 37 <tr><td class="mdescLeft"> </td><td class="mdescRight">A timer. <a href="a00087.html#_details… 39 …95ec6e6f63071ff51">timer_set</a> (struct <a class="el" href="a00087.html">timer</a> *t, clock_time… 41 <tr><td class="mdescLeft"> </td><td class="mdescRight">Set a timer. <a href="a00156.html#g661… 42 …9b85455fb948468d6">timer_reset</a> (struct <a class="el" href="a00087.html">timer</a> *t)</td></tr> 44 <tr><td class="mdescLeft"> </td><td class="mdescRight">Reset the timer with the same interval.… [all …]
|
H A D | a00129.html | 3 <title>uIP 1.0: uip/timer.c File Reference</title> 21 <h1>uip/timer.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2> 22 Timer library implementation. 27 Definition in file <a class="el" href="a00195.html">timer.c</a>. 30 <code>#include "<a class="el" href="a00196.html">timer.h</a>"</code><br> 36 …95ec6e6f63071ff51">timer_set</a> (struct <a class="el" href="a00087.html">timer</a> *t, clock_time… 38 <tr><td class="mdescLeft"> </td><td class="mdescRight">Set a timer. <a href="a00156.html#g661… 39 …9b85455fb948468d6">timer_reset</a> (struct <a class="el" href="a00087.html">timer</a> *t)</td></tr> 41 <tr><td class="mdescLeft"> </td><td class="mdescRight">Reset the timer with the same interval.… 42 …6b876af5c1f163a">timer_restart</a> (struct <a class="el" href="a00087.html">timer</a> *t)</td></tr> [all …]
|
H A D | a00087.html | 3 <title>uIP 1.0: timer Struct Reference</title> 23 <h1>timer Struct Reference<br> 25 [<a class="el" href="a00156.html">Timer library</a>]</small> 26 </h1><!-- doxytag: class="timer" --><code>#include <<a class="el" href="a00196.html">timer.h</a>… 29 A timer. 31 This structure is used for declaring a timer. The timer must be set with <a class="el" href="a00156… 38 …href="a00196.html#l00074">74</a> of file <a class="el" href="a00196.html">timer.h</a>.<table borde… 41 …anchor" name="e8eb428c05bc1dee022246a3063d277c"></a><!-- doxytag: member="timer::start" ref="e8eb4… 44 …anchor" name="fe557d333c06cf65f52023f45f5b0a3a"></a><!-- doxytag: member="timer::interval" ref="fe…
|
H A D | a00195.html | 3 <title>uIP 1.0: uip/timer.c Source File</title> 21 <h1>uip/timer.c</h1><a href="a00129.html">Go to the documentation of this file.</a><div class="frag… 22 <a name="l00002"></a>00002 <span class="comment"> * \addtogroup timer</span> 28 <a name="l00008"></a>00008 <span class="comment"> * Timer library implementation.</span> 65 <a name="l00045"></a>00045 <span class="comment"> * $Id: timer.c,v 1.2 2006/06/12 08:00:30 adam Exp… 69 …a>00049 <span class="preprocessor">#include "<a class="code" href="a00130.html">timer.h</a>"</span> 73 <a name="l00053"></a>00053 <span class="comment"> * Set a timer.</span> 75 <a name="l00055"></a>00055 <span class="comment"> * This function is used to set a timer for a time… 77 <a name="l00057"></a>00057 <span class="comment"> * the timer has expired.</span> 79 <a name="l00059"></a>00059 <span class="comment"> * \param t A pointer to the timer</span> [all …]
|
H A D | a00196.html | 3 <title>uIP 1.0: uip/timer.h Source File</title> 21 <h1>uip/timer.h</h1><a href="a00130.html">Go to the documentation of this file.</a><div class="frag… 22 <a name="l00002"></a>00002 <span class="comment"> * \defgroup timer Timer library</span> 24 <a name="l00004"></a>00004 <span class="comment"> * The timer library provides functions for settin… 25 <a name="l00005"></a>00005 <span class="comment"> * restarting timers, and for checking if a timer … 29 <a name="l00009"></a>00009 <span class="comment"> * A timer is declared as a \c struct \c timer and… 30 <a name="l00010"></a>00010 <span class="comment"> * timer is made by a pointer to the declared time… 32 <a name="l00012"></a>00012 <span class="comment"> * \note The timer library uses the \ref clock "Cl… 42 <a name="l00022"></a>00022 <span class="comment"> * Timer library header file.</span> 79 <a name="l00059"></a>00059 <span class="comment"> * $Id: timer.h,v 1.3 2006/06/11 21:46:39 adam Exp… [all …]
|
/nrf52832-nimble/rt-thread/components/drivers/include/drivers/ |
H A D | hwtimer.h | 19 /* Timer Control Command */ 23 HWTIMER_CTRL_STOP, /* stop timer */ 24 HWTIMER_CTRL_INFO_GET, /* get a timer feature information */ 49 void (*init)(struct rt_hwtimer_device *timer, rt_uint32_t state); 50 rt_err_t (*start)(struct rt_hwtimer_device *timer, rt_uint32_t cnt, rt_hwtimer_mode_t mode); 51 void (*stop)(struct rt_hwtimer_device *timer); 52 rt_uint32_t (*count_get)(struct rt_hwtimer_device *timer); 53 rt_err_t (*control)(struct rt_hwtimer_device *timer, rt_uint32_t cmd, void *args); 56 /* Timer Feature Information */ 59 rt_int32_t maxfreq; /* the maximum count frequency timer support */ [all …]
|
/nrf52832-nimble/rt-thread/components/net/freemodbus/port/ |
H A D | porttimer_m.c | 33 static struct rt_timer timer; variable 46 rt_timer_init(&timer, "master timer", in xMBMasterPortTimersInit() 60 /* Set current timer mode, don't change it.*/ in vMBMasterPortTimersT35Enable() 63 rt_timer_control(&timer, RT_TIMER_CTRL_SET_TIME, &timer_tick); in vMBMasterPortTimersT35Enable() 65 rt_timer_start(&timer); in vMBMasterPortTimersT35Enable() 72 /* Set current timer mode, don't change it.*/ in vMBMasterPortTimersConvertDelayEnable() 75 rt_timer_control(&timer, RT_TIMER_CTRL_SET_TIME, &timer_tick); in vMBMasterPortTimersConvertDelayEnable() 77 rt_timer_start(&timer); in vMBMasterPortTimersConvertDelayEnable() 84 /* Set current timer mode, don't change it.*/ in vMBMasterPortTimersRespondTimeoutEnable() 87 rt_timer_control(&timer, RT_TIMER_CTRL_SET_TIME, &timer_tick); in vMBMasterPortTimersRespondTimeoutEnable() [all …]
|
/nrf52832-nimble/rt-thread/examples/test/ |
H A D | hwtimer_test.c | 7 #define TIMER "timer0" macro 11 rt_kprintf("enter hardware timer isr\n"); in timer_timeout_cb() 26 if ((dev = rt_device_find(TIMER)) == RT_NULL) in hwtimer() 28 rt_kprintf("No Device: %s\n", TIMER); in hwtimer() 34 rt_kprintf("Open %s Fail\n", TIMER); in hwtimer() 52 rt_kprintf("Start Timer> Tick: %d\n", tick); in hwtimer() 67 rt_kprintf("Timer Stoped\n"); in hwtimer() 95 rt_kprintf("Close %s\n", TIMER); in hwtimer() 100 MSH_CMD_EXPORT(hwtimer, "Test hardware timer");
|
/nrf52832-nimble/rt-thread/components/net/lwip-1.4.1/src/core/ |
H A D | timers.c | 4 * This file includes timer callbacks for stack-internal timers as well as 70 /** global variable that shows if the tcp timer is currently scheduled or not */ 74 * Timer callback function that calls tcp_tmr() and reschedules itself. 83 /* call TCP timer handler */ in tcpip_tcp_timer() 85 /* timer still needed? */ in tcpip_tcp_timer() 87 /* restart timer */ in tcpip_tcp_timer() 90 /* disable timer */ in tcpip_tcp_timer() 97 * the reason is to have the TCP timer only running when 103 /* timer is off but needed again? */ in tcp_timer_needed() 105 /* enable and start timer */ in tcp_timer_needed() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/core/ |
H A D | timeouts.c | 4 * This file includes timer callbacks for stack-internal timers as well as 72 /* Check if timer's expiry time is greater than time and care about u32_t wraparounds */ 79 /* The TCP timer is a special case: it does not have to run always and 135 /** global variable that shows if the tcp timer is currently scheduled or not */ 139 * Timer callback function that calls tcp_tmr() and reschedules itself. 148 /* call TCP timer handler */ in tcpip_tcp_timer() 150 /* timer still needed? */ in tcpip_tcp_timer() 152 /* restart timer */ in tcpip_tcp_timer() 155 /* disable timer */ in tcpip_tcp_timer() 162 * the reason is to have the TCP timer only running when [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/core/ |
H A D | timeouts.c | 4 * This file includes timer callbacks for stack-internal timers as well as 73 /* The TCP timer is a special case: it does not have to run always and 116 /** global variable that shows if the tcp timer is currently scheduled or not */ 120 * Timer callback function that calls tcp_tmr() and reschedules itself. 129 /* call TCP timer handler */ in tcpip_tcp_timer() 131 /* timer still needed? */ in tcpip_tcp_timer() 133 /* restart timer */ in tcpip_tcp_timer() 136 /* disable timer */ in tcpip_tcp_timer() 143 * the reason is to have the TCP timer only running when 149 /* timer is off but needed again? */ in tcp_timer_needed() [all …]
|