Revision 358e7de5

View differences:

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
}
apps/HelloWorld/helloworld.h
27 27
extern "C" {
28 28
#endif /* defined(__cplusplus) */
29 29

  
30
urt_osEventMask_t hello(urt_node_t* node, urt_osEventMask_t events, void* arg);
30
void helloShutdown(urt_node_t* node, urt_status_t cause, void* arg);
31
urt_osEventMask_t helloSetup(urt_node_t* node, void* arg);
32
urt_osEventMask_t helloLoop(urt_node_t* node, urt_osEventMask_t events, void* arg);
31 33
void helloWorldInit(urt_node_t* node, urt_osThread_t* thread);
32 34

  
33 35
#if defined(__cplusplus)
configurations/HelloWorld/modules/NUCLEO-F401RE/mainincludes.hpp
22 22
#include <urtware.h>
23 23
#include <helloworld.h>
24 24

  
25
static URT_THREAD_MEMORY(hellosvenja_thread, 256);
26
static URT_THREAD_MEMORY(hellothomas_thread, 256);
25
static URT_THREAD_MEMORY(hellosvenja_thread, 512);
26
//static URT_THREAD_MEMORY(hellothomas_thread, 256);
27 27
static urt_node_t hellosvenja_node;
28
static urt_node_t hellothomas_node;
28
//static urt_node_t hellothomas_node;
29 29

  
30
#define AMIROOS_CFG_MAIN_INIT_HOOK_4() {                                \
31
    urtCoreInit();                                                      \
30
#define AMIROOS_CFG_MAIN_INIT_HOOK_3() {                                                \
31
    urtCoreInit();                                                                      \
32 32
    helloWorldInit(&hellosvenja_node, (urt_osThread_t*)hellosvenja_thread);             \
33
    helloWorldInit(&hellothomas_node, (urt_osThread_t*)hellothomas_thread);             \
33
    urtCoreStartNodes();                                                                \
34 34
}
35 35

  
36 36

  
middleware/apps_urtosal.c
136 136
  }
137 137
}
138 138

  
139
bool urtThreadShouldTerminate(void)
140
{
141
    return true;
142
}
143

  
139 144
urt_osThreadState_t urtThreadGetState(urt_osThread_t* thread)
140 145
{
141 146
  aosDbgCheck(thread != NULL);
middleware/uRtWare
1
Subproject commit 4ea18a07d5e39ca20993e9b7ec61f20f1777757b
1
Subproject commit 408b49ced4cef056194315f3d612d1fd339bcccc

Also available in: Unified diff