Revision a33cec74 apps/HelloWorld/helloworld.c

View differences:

apps/HelloWorld/helloworld.c
20 20

  
21 21
#pragma message "Hello World! (.c)"
22 22

  
23
//Parameter (und rückgabewert) immer anpassen an shutdown, loop, setup
24 23
void helloShutdown(urt_node_t* node, urt_status_t cause, void* arg)
25 24
{
26
    urtPrintf("Hello World shutdown!\n");
25
    urtPrintf("Hello %p shutdown!\n", arg);
27 26
    return;
28 27
}
29 28

  
30 29
urt_osEventMask_t helloSetup(urt_node_t* node, void* arg)
31 30
{
32
  urtPrintf("Hello World setup!\n");
31
  urtPrintf("Hello %p setup!\n", arg);
33 32
  return URT_EVENTMASK_ALL;
34 33
}
35 34

  
36 35
urt_osEventMask_t helloLoop(urt_node_t* node, urt_osEventMask_t events, void* arg)
37 36
{
38
  urtPrintf("Hello World loop!\n");
37
  urtPrintf("Hello %p loop!\n", arg);
39 38
  return URT_EVENTMASK_ALL;
40 39
}
41 40

  
42
void helloWorldInit(urt_node_t* node, urt_osThread_t* thread)
41
void helloWorldInit(urt_node_t* node, urt_osThread_t* thread, void* arg)
43 42
{
44
    urtNodeInit(node, thread, URT_THREAD_PRIO_LOW_MIN, &helloSetup, NULL, &helloLoop, NULL, &helloShutdown, NULL);
43
    urtNodeInit(node, thread, URT_THREAD_PRIO_LOW_MIN, &helloSetup, arg, &helloLoop, arg, &helloShutdown, arg);
44
    //urtNodeInit(node, thread, URT_THREAD_PRIO_LOW_MIN, NULL, NULL, NULL, NULL, NULL, NULL);
45 45
}

Also available in: Unified diff