1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#![allow(unused)]
use crate::TaskInfo;
#[cfg(feature = "trace_impl")]
extern "Rust" {
fn _rtos_trace_task_new(id: u32);
fn _rtos_trace_task_terminate(id: u32);
fn _rtos_trace_task_exec_begin(id: u32);
fn _rtos_trace_task_exec_end();
fn _rtos_trace_task_ready_begin(id: u32);
fn _rtos_trace_task_ready_end(id: u32);
fn _rtos_trace_system_idle();
fn _rtos_trace_isr_enter();
fn _rtos_trace_isr_exit();
fn _rtos_trace_isr_exit_to_scheduler();
fn _rtos_trace_marker(id: u32);
fn _rtos_trace_marker_begin(id: u32);
fn _rtos_trace_marker_end(id: u32);
fn _rtos_trace_task_send_info(id: u32, info: TaskInfo);
fn _rtos_trace_time() -> u64;
fn _rtos_trace_system_description();
fn _rtos_trace_sysclock() -> u32;
}
#[inline]
pub fn task_new(id: u32) {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_task_new(id) }
}
#[inline]
pub fn task_terminate(id: u32) {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_task_terminate(id) }
}
#[inline]
pub fn task_exec_begin(id: u32) {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_task_exec_begin(id) }
}
#[inline]
pub fn task_exec_end() {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_task_exec_end() }
}
#[inline]
pub fn task_ready_begin(id: u32) {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_task_ready_begin(id) }
}
#[inline]
pub fn task_ready_end(id: u32) {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_task_ready_end(id) }
}
#[inline]
pub fn system_idle() {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_system_idle() }
}
#[inline]
pub fn isr_enter() {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_isr_enter() }
}
#[inline]
pub fn isr_exit() {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_isr_exit() }
}
#[inline]
pub fn isr_exit_to_scheduler() {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_isr_exit_to_scheduler() }
}
#[inline]
pub fn marker(id: u32) {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_marker(id) }
}
#[inline]
pub fn marker_begin(id: u32) {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_marker_begin(id) }
}
#[inline]
pub fn marker_end(id: u32) {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_marker_end(id) }
}
#[inline]
pub fn task_send_info(id: u32, info: TaskInfo) {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_task_send_info(id, info) }
}
#[inline]
pub fn time() -> u64 {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_time() }
#[cfg(not(feature = "trace_impl"))]
0
}
#[inline]
pub fn system_description() {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_system_description() }
}
#[inline]
pub fn sysclock() -> u32 {
#[cfg(feature = "trace_impl")]
unsafe { _rtos_trace_sysclock() }
#[cfg(not(feature = "trace_impl"))]
0
}