Revision 358e7de5 apps/HelloWorld/helloworld.c
apps/HelloWorld/helloworld.c | ||
---|---|---|
20 | 20 |
|
21 | 21 |
#pragma message "Hello World! (.c)" |
22 | 22 |
|
23 |
urt_osEventMask_t hello(urt_node_t* node, urt_osEventMask_t events, void* arg) |
|
23 |
//Parameter (und rückgabewert) immer anpassen an shutdown, loop, setup |
|
24 |
void helloShutdown(urt_node_t* node, urt_status_t cause, void* arg) |
|
24 | 25 |
{ |
25 |
urtPrintf("Hello World!\n"); |
|
26 |
return URT_EVENTMASK_ALL; |
|
26 |
urtPrintf("Hello World shutdown!\n"); |
|
27 |
return; |
|
28 |
} |
|
29 |
|
|
30 |
urt_osEventMask_t helloSetup(urt_node_t* node, void* arg) |
|
31 |
{ |
|
32 |
urtPrintf("Hello World setup!\n"); |
|
33 |
return URT_EVENTMASK_ALL; |
|
34 |
} |
|
35 |
|
|
36 |
urt_osEventMask_t helloLoop(urt_node_t* node, urt_osEventMask_t events, void* arg) |
|
37 |
{ |
|
38 |
urtPrintf("Hello World loop!\n"); |
|
39 |
return URT_EVENTMASK_ALL; |
|
27 | 40 |
} |
28 | 41 |
|
29 | 42 |
void helloWorldInit(urt_node_t* node, urt_osThread_t* thread) |
30 | 43 |
{ |
31 |
urtNodeInit(node, thread, URT_THREAD_PRIO_LOW_MIN, NULL, NULL, &hello, NULL, NULL, NULL);
|
|
44 |
urtNodeInit(node, thread, URT_THREAD_PRIO_LOW_MIN, &helloSetup, NULL, &helloLoop, NULL, &helloShutdown, NULL);
|
|
32 | 45 |
} |
Also available in: Unified diff