xref: /nrf52832-nimble/rt-thread/examples/kernel/tc_comm.h (revision 104654410c56c573564690304ae786df310c91fc)
1 #ifndef __TC_COMM_H__
2 #define __TC_COMM_H__
3 
4 /*
5  * RT-Thread TestCase
6  *
7  */
8 #include <rtthread.h>
9 #ifdef RT_USING_FINSH
10 #include <finsh.h>
11 #endif
12 
13 #if RT_THREAD_PRIORITY_MAX == 8
14 #define THREAD_PRIORITY        6
15 #elif RT_THREAD_PRIORITY_MAX == 32
16 #define THREAD_PRIORITY        25
17 #elif RT_THREAD_PRIORITY_MAX == 256
18 #define THREAD_PRIORITY        200
19 #endif
20 #define THREAD_STACK_SIZE    512
21 #define THREAD_TIMESLICE    5
22 
23 #define TC_STAT_END        0x00
24 #define TC_STAT_RUNNING    0x01
25 #define TC_STAT_FAILED    0x10
26 #define TC_STAT_PASSED    0x00
27 
28 #ifdef RT_USING_TC
29 void tc_start(const char* tc_prefix);
30 void tc_stop(void);
31 void tc_done(rt_uint8_t state);
32 void tc_stat(rt_uint8_t state);
33 void tc_cleanup(void (*cleanup)(void));
34 #else
35 #define tc_start(x)
36 #define tc_stop()
37 #define tc_done(s)
38 #define tc_stat(s)
39 #define tc_cleanup(c)
40 #endif
41 
42 #endif
43 
44