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 | * $Id$ |
---|
10 | */ |
---|
11 | |
---|
12 | #include <tmacros.h> |
---|
13 | |
---|
14 | rtems_task Init( |
---|
15 | rtems_task_argument ignored |
---|
16 | ) |
---|
17 | { |
---|
18 | bool is_set; |
---|
19 | |
---|
20 | puts( "\n\n*** TEST 10 ***" ); |
---|
21 | |
---|
22 | puts( "Init - clear debug level" ); |
---|
23 | _Debug_Level = 0; |
---|
24 | |
---|
25 | puts( "Init - rtems_debug_is_enabled - is 0x1 set? No" ); |
---|
26 | is_set = rtems_debug_is_enabled( 0x1 ); |
---|
27 | rtems_test_assert(is_set == false); |
---|
28 | |
---|
29 | puts( "Init - rtems_debug_enable - set 0x1" ); |
---|
30 | rtems_debug_enable(0x1); |
---|
31 | rtems_test_assert(_Debug_Level == 0x1); |
---|
32 | |
---|
33 | puts( "Init - rtems_debug_is_enabled - is 0x1 set? Yes" ); |
---|
34 | is_set = rtems_debug_is_enabled( 0x1 ); |
---|
35 | rtems_test_assert(is_set == true); |
---|
36 | |
---|
37 | puts( "Init - rtems_debug_disable - clear 0x1" ); |
---|
38 | rtems_debug_disable(0x1); |
---|
39 | rtems_test_assert(_Debug_Level == 0x0); |
---|
40 | |
---|
41 | puts( "Init - rtems_debug_is_enabled - is 0x1 set? No" ); |
---|
42 | is_set = rtems_debug_is_enabled( 0x1 ); |
---|
43 | rtems_test_assert(is_set == false); |
---|
44 | |
---|
45 | puts( "*** END OF TEST 10 ***" ); |
---|
46 | rtems_test_exit(0); |
---|
47 | } |
---|
48 | |
---|
49 | /* configuration information */ |
---|
50 | |
---|
51 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
52 | #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER |
---|
53 | |
---|
54 | #define CONFIGURE_MAXIMUM_TASKS 1 |
---|
55 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
56 | |
---|
57 | #define CONFIGURE_INIT |
---|
58 | #include <rtems/confdefs.h> |
---|
59 | |
---|
60 | /* global variables */ |
---|