Revision 63abda2c
| 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 |
} |
| apps/HelloWorld/helloworld.h | ||
|---|---|---|
| 21 | 21 |
|
| 22 | 22 |
#include <urtware.h> |
| 23 | 23 |
|
| 24 |
#pragma message "Hello World! (.h)" |
|
| 25 |
|
|
| 26 | 24 |
#if defined(__cplusplus) |
| 27 | 25 |
extern "C" {
|
| 28 | 26 |
#endif /* defined(__cplusplus) */ |
| middleware/uRtWare | ||
|---|---|---|
| 1 |
Subproject commit 60da7a2f70e424ba141749cfb4da4c6dd4797af8 |
|
| 1 |
Subproject commit fb72e91b1fcb99de893710031303ab33dc230d0d |
|
Also available in: Unified diff