Revision 63abda2c apps/HelloWorld/helloworld.c
| apps/HelloWorld/helloworld.c | ||
|---|---|---|
| 18 | 18 |
|
| 19 | 19 |
#include <helloworld.h> |
| 20 | 20 |
|
| 21 |
#pragma message "Hello World! (.c)"
|
|
| 21 |
#define UNUSED(x) (void)(x)
|
|
| 22 | 22 |
|
| 23 | 23 |
void helloShutdown(urt_node_t* node, urt_status_t cause, void* arg) |
| 24 | 24 |
{
|
| 25 |
urtPrintf("Hello %c shutdown!\n", arg);
|
|
| 26 |
urtThreadSleep(10); |
|
| 27 |
return; |
|
| 25 |
UNUSED(node); |
|
| 26 |
UNUSED(cause); |
|
| 27 |
urtPrintf("Hello %c shutdown!\n", arg);
|
|
| 28 |
urtThreadSleep(10); |
|
| 29 |
return; |
|
| 28 | 30 |
} |
| 29 | 31 |
|
| 30 | 32 |
urt_osEventMask_t helloSetup(urt_node_t* node, void* arg) |
| 31 | 33 |
{
|
| 34 |
UNUSED(node); |
|
| 32 | 35 |
urtPrintf("Hello %c setup!\n", arg);
|
| 33 | 36 |
urtThreadSleep(10); |
| 34 | 37 |
return URT_EVENTMASK_ALL; |
| ... | ... | |
| 36 | 39 |
|
| 37 | 40 |
urt_osEventMask_t helloLoop(urt_node_t* node, urt_osEventMask_t events, void* arg) |
| 38 | 41 |
{
|
| 39 |
urtPrintf("Hello loop!\n");
|
|
| 42 |
UNUSED(node); |
|
| 43 |
UNUSED(events); |
|
| 44 |
urtPrintf("Hello %c loop!\n", arg);
|
|
| 40 | 45 |
urtThreadSleep(10); |
| 41 | 46 |
return URT_EVENTMASK_ALL; |
| 42 | 47 |
} |
Also available in: Unified diff