Lines Matching refs:timer

6 The software timer is a software-simulated timer based on system tick interrupts. When the preset t…
8 …not meet users' requirements. The OpenHarmony LiteOS-A kernel provides the software timer function.
10 The software timer allows more timing services to be created, increasing the number of timers.
12 The software timer supports the following functions:
14 - Disabling the software timer using a macro
16 - Creating a software timer
18 - Starting a software timer
20 - Stopping a software timer
22 - Deleting a software timer
24 - Obtaining the number of remaining ticks of a software timer
29 The software timer is a system resource. When modules are initialized, a contiguous section of memo…
31 … the timers set at the same time, the timer with a shorter value is always closer to the queue hea…
33timer counts time in ticks. When a software timer is created and started, the OpenHarmony system d…
37 …lete, the software timer task (with the highest priority) will be woken up. In this task, the time…
39 A software timer can be in any of the following states:
43 …The timer is not in use. When the timer module is initialized, all timer resources in the system a…
47timer is created but not started or the timer is stopped. When **LOS_SwtmrCreate** is called for a…
51 …The timer is running (counting). When **LOS_SwtmrStart** is called for a newly created timer, the
55 - One-shot timer: Once started, the timer is automatically deleted after triggering only one time…
56 - Periodic timer: This type of timer periodically triggers timer events until it is manually stop…
57 - One-shot timer deleted by calling an API
65 The following table describes the APIs of the software timer module of the OpenHarmony LiteOS-A ker…
71 …reating or deleting a timer | **LOS_SwtmrCreate**: creates a software timer.<br>**LOS_SwtmrDe…
72 | Starting or stopping a timer | **LOS_SwtmrStart**: starts a software timer.<br>**LOS_SwtmrSt…
73 …taining remaining ticks of a software timer| **LOS_SwtmrTimeGet**: obtains the remaining ticks of …
80 1. Configure the software timer.
83 - Configure **OS_SWTMR_HANDLE_QUEUE_SIZE** (maximum length of the software timer queue).
85 2. Call **LOS_SwtmrCreate** to create a software timer.
86 …- Create a software timer with the specified timing duration, timeout handling function, and trigg…
89 3. Call **LOS_SwtmrStart** to start the software timer.
91 4. Call **LOS_SwtmrTimeGet** to obtain the remaining number of ticks of the software timer.
93 5. Call **LOS_SwtmrStop** to stop the software timer.
95 6. Call **LOS_SwtmrDelete** to delete the software timer.
99 > - Avoid too many operations in the callback of the software timer. Do not use APIs or perform ope…
101 …e a queue and a task resource of the system. The priority of the software timer tasks is set to **…
103timer resources that can be configured in the system is the total number of software timer resourc…
105 > - If a one-shot software timer is created, the system automatically deletes the timer and reclaim…
107 …software timer that will not be automatically deleted after expiration, you need to call **LOS_Swt…
116 - The maximum length of the software timer queue (**OS_SWTMR_HANDLE_QUEUE_SIZE**) is configured.
150 UINT16 id2; // timer id
153 …/* Create a one-shot software timer, with the number of ticks set to 1000. Callback 1 will be invo…
156 /* Create a periodic software timer and invoke callback 2 every 100 ticks. */
160 LOS_SwtmrStart(id1); // Start the one-shot software timer.
163 …wtmrTimeGet(id1, &uwTick); // Obtain the number of remaining ticks of the one-short software timer.
166 LOS_SwtmrStop(id1); // Stop the software timer.
171 LOS_SwtmrDelete(id1); // Delete the software timer.
174 LOS_SwtmrStart(id2); // Start the periodic software timer.