You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/rtos/Kernel.md
+15-2Lines changed: 15 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
## Kernel interface functions
2
2
3
-
The Kernel namespace implements functions to read RTOS information. Currently it implements one function to read the current RTOS kernel millisecond tick count.
3
+
The Kernel namespace implements interfaces to attach a function to some kernel events and also to read the kernel tick count.
Kernel implements one function named `get_ms_count()` to read the current RTOS kernel millisecond tick count. The below code snippet demonstrates use of the `get_ms_count()` function to calculate the elapsed time:
11
+
The function `get_ms_count()` can be used to read the current RTOS kernel millisecond tick count. The below code snippet demonstrates use of the `get_ms_count()` function to calculate the elapsed time:
12
12
13
13
```
14
14
void send_data()
@@ -23,4 +23,17 @@ void send_data()
23
23
//calculate millisecs elapsed
24
24
uint64_t elapsed_ms = later - now;
25
25
}
26
+
26
27
```
28
+
29
+
### `attach_idle_hook()` example
30
+
31
+
The function `attach_idle_hook()` can be used to attach a function to be called by the RTOS idle task. The below code snippet demostrates the usage.
0 commit comments