1 | /* |
---|
2 | * COPYRIGHT (c) 1989-2009. |
---|
3 | * On-Line Applications Research Corporation (OAR). |
---|
4 | * |
---|
5 | * The license and distribution terms for this file may be |
---|
6 | * found in the file LICENSE in this distribution or at |
---|
7 | * http://www.rtems.com/license/LICENSE. |
---|
8 | */ |
---|
9 | |
---|
10 | #ifdef HAVE_CONFIG_H |
---|
11 | #include "config.h" |
---|
12 | #endif |
---|
13 | |
---|
14 | #include <tmacros.h> |
---|
15 | |
---|
16 | rtems_task Init( |
---|
17 | rtems_task_argument ignored |
---|
18 | ) |
---|
19 | { |
---|
20 | bool is_set; |
---|
21 | |
---|
22 | puts( "\n\n*** TEST 10 ***" ); |
---|
23 | |
---|
24 | puts( "Init - clear debug level" ); |
---|
25 | _Debug_Level = 0; |
---|
26 | |
---|
27 | puts( "Init - rtems_debug_is_enabled - is 0x1 set? No" ); |
---|
28 | is_set = rtems_debug_is_enabled( 0x1 ); |
---|
29 | rtems_test_assert(is_set == false); |
---|
30 | |
---|
31 | puts( "Init - rtems_debug_enable - set 0x1" ); |
---|
32 | rtems_debug_enable(0x1); |
---|
33 | rtems_test_assert(_Debug_Level == 0x1); |
---|
34 | |
---|
35 | puts( "Init - rtems_debug_is_enabled - is 0x1 set? Yes" ); |
---|
36 | is_set = rtems_debug_is_enabled( 0x1 ); |
---|
37 | rtems_test_assert(is_set == true); |
---|
38 | |
---|
39 | puts( "Init - rtems_debug_disable - clear 0x1" ); |
---|
40 | rtems_debug_disable(0x1); |
---|
41 | rtems_test_assert(_Debug_Level == 0x0); |
---|
42 | |
---|
43 | puts( "Init - rtems_debug_is_enabled - is 0x1 set? No" ); |
---|
44 | is_set = rtems_debug_is_enabled( 0x1 ); |
---|
45 | rtems_test_assert(is_set == false); |
---|
46 | |
---|
47 | puts( "*** END OF TEST 10 ***" ); |
---|
48 | rtems_test_exit(0); |
---|
49 | } |
---|
50 | |
---|
51 | /* configuration information */ |
---|
52 | |
---|
53 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
54 | #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER |
---|
55 | |
---|
56 | #define CONFIGURE_MAXIMUM_TASKS 1 |
---|
57 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
58 | |
---|
59 | #define CONFIGURE_INIT |
---|
60 | #include <rtems/confdefs.h> |
---|
61 | |
---|
62 | /* global variables */ |
---|