krnl
1
Loading...
Searching...
No Matches
examples
oldexamples
old
krnlstaktstprint
krnlstaktstprint.ino
Go to the documentation of this file.
1
#include <
krnl.h
>
2
3
4
char
s
[150];
5
struct
k_t
*
e
;
6
void
t1
()
7
{
8
int
i
=0,
j
;
9
while
(1) {
10
i
++;
11
Serial.print(
i
);
12
j
=
k_unused_stak
(
e
);
13
Serial.print(
" "
);
14
Serial.println(
j
);
15
//delay(100);
16
}
17
}
18
19
void
setup
()
20
{
21
Serial.begin(9600);
22
int
i
=0;
23
k_init
(5,5,5);
24
e
=
k_crt_task
(
t1
,10,
s
,150);
25
k_start
(10);
26
}
27
void
loop
()
28
{
29
}
30
i
volatile int i
Definition
k02twotasks.ino:29
k_crt_task
struct k_t * k_crt_task(void(*pTask)(void), char prio, char *pStk, int stkSize)
create a task - only to be called before k_start creates a task and put it in the active Q
Definition
krnl.c:328
k_unused_stak
int k_unused_stak(struct k_t *t)
Definition
krnl.c:493
k_init
int k_init(int nrTask, int nrSem, int nrMsg)
Definition
krnl.c:1108
k_start
int k_start()
Definition
krnl.c:1149
krnl.h
t1
struct k_t * t1
Definition
krnlgen.ino:3
setup
void setup()
Definition
krnlstaktstprint.ino:19
e
struct k_t * e
Definition
krnlstaktstprint.ino:5
s
char s[150]
Definition
krnlstaktstprint.ino:4
t1
void t1()
Definition
krnlstaktstprint.ino:6
loop
void loop()
Definition
krnlstaktstprint.ino:27
j
volatile int j
Definition
simpleisr.ino:7
k_t
Definition
krnl.h:323
Generated by
1.15.0