krnl 1
Loading...
Searching...
No Matches
krnlstaktstprint.ino
Go to the documentation of this file.
1#include <krnl.h>
2
3
4char s[150];
5struct k_t * e;
6void 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
19void 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
volatile int i
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
int k_unused_stak(struct k_t *t)
Definition krnl.c:493
int k_init(int nrTask, int nrSem, int nrMsg)
Definition krnl.c:1108
int k_start()
Definition krnl.c:1149
struct k_t * t1
Definition krnlgen.ino:3
void setup()
struct k_t * e
char s[150]
void t1()
void loop()
volatile int j
Definition simpleisr.ino:7
Definition krnl.h:323