comparison src/cs/services/lls/tests/lls_test_misc.c @ 0:4e78acac3d88

src/{condat,cs,gpf,nucleus}: import from Selenite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 16 Oct 2020 06:23:26 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4e78acac3d88
1 /********************************************************************************/
2 /* */
3 /* File Name: lls_test_misc.c */
4 /* */
5 /* Purpose: This file gathers miscellaneous tests fot LLS. */
6 /* */
7 /* Notes: None. */
8 /* */
9 /* Revision History: */
10 /* 03/12/2002 Laurent Sollier Create. */
11 /* */
12 /* (C) Copyright 2002 by Texas Instruments Incorporated, All Rights Reserved */
13 /* */
14 /********************************************************************************/
15
16 /********************************************************************************/
17 /* */
18 /* Include files used for LLS testing. */
19 /* */
20 /********************************************************************************/
21
22 #include "tests/rv/rv_test_filter.h"
23
24 #if (LLS_MISC == SW_COMPILED)
25
26 #include "lls/lls_api.h"
27 #include "tests/rv/rv_test_misc.h"
28 #include "lls/tests/lls_test.h"
29
30
31 /********************************************************************************/
32 /* */
33 /* Function Name: lls_test_misc1 */
34 /* */
35 /* Notes: This function executes lls misc test 1. */
36 /* */
37 /* Revision History: */
38 /* 03/12/2002 Laurent Sollier Create. */
39 /* */
40 /********************************************************************************/
41 T_RV_MISC_RET lls_test_misc1(void)
42 {
43 T_RV_MISC_RET test_verdict = TEST_PASSED;
44
45 lls_test_trace("*** LLS TEST MISC1: Switch ON LED A for 3 sec, then switch OFF LED A");
46 lls_test_trace("*** LLS TEST MISC1: Switch ON LED B for 3 sec, then switch OFF LED A");
47 lls_test_trace("*** LLS TEST MISC1: Switch ON LED C for 3 sec, then switch OFF LED A");
48 lls_test_trace("*** LLS TEST MISC1: Wait 3 sec");
49 lls_test_trace("*** LLS TEST MISC1: Switch ON LED A, LED B, LED C for 3 sec, then switch OFF all LEDs");
50
51 lls_switch_on(LLS_LED_A);
52 rvf_delay(RVF_MS_TO_TICKS(3000));
53 lls_switch_off(LLS_LED_A);
54
55 lls_switch_on(LLS_BACKLIGHT);
56 rvf_delay(RVF_MS_TO_TICKS(3000));
57 lls_switch_off(LLS_BACKLIGHT);
58
59 lls_switch_on(LLS_PRECHARGE_LED);
60 rvf_delay(RVF_MS_TO_TICKS(3000));
61 lls_switch_off(LLS_PRECHARGE_LED);
62
63 rvf_delay(RVF_MS_TO_TICKS(3000));
64
65 lls_switch_on(LLS_LED_A);
66 lls_switch_on(LLS_BACKLIGHT);
67 lls_switch_on(LLS_PRECHARGE_LED);
68 rvf_delay(RVF_MS_TO_TICKS(3000));
69 lls_switch_off(LLS_LED_A);
70 lls_switch_off(LLS_BACKLIGHT);
71 lls_switch_off(LLS_PRECHARGE_LED);
72
73
74 return test_verdict;
75 }
76
77
78 /********************************************************************************/
79 /* */
80 /* Function Name: lls_test_misc2 */
81 /* */
82 /* Notes: This function executes lls misc test 2. */
83 /* */
84 /* Revision History: */
85 /* 03/12/2002 Laurent Sollier Create. */
86 /* */
87 /********************************************************************************/
88 T_RV_MISC_RET lls_test_misc2(void)
89 {
90 T_RV_MISC_RET test_verdict = TEST_PASSED;
91
92 return test_verdict;
93 }
94
95
96 /********************************************************************************/
97 /* */
98 /* Function Name: lls_test_misc3 */
99 /* */
100 /* Notes: This function executes lls misc test 3. */
101 /* */
102 /* Revision History: */
103 /* 03/12/2002 Laurent Sollier Create. */
104 /* */
105 /********************************************************************************/
106 T_RV_MISC_RET lls_test_misc3(void)
107 {
108 T_RV_MISC_RET test_verdict = TEST_PASSED;
109
110 return test_verdict;
111 }
112
113
114 /********************************************************************************/
115 /* */
116 /* Function Name: lls_test_misc */
117 /* */
118 /* Notes: This function executes LLS misc tests. */
119 /* */
120 /* Revision History: */
121 /* 03/12/2002 Laurent Sollier Create. */
122 /* */
123 /********************************************************************************/
124
125 T_RV_MISC_RET lls_test_misc (T_RV_MISC_TEST_NBR test_number)
126 {
127 T_RV_MISC_RET test_verdict = TEST_PASSED;
128
129 rvf_dump_mem();
130 rvf_dump_tasks();
131
132 switch (test_number)
133 {
134 case 1:
135 test_verdict = lls_test_misc1();
136 break;
137
138 case 2:
139 test_verdict = lls_test_misc2();
140 break;
141
142 case 3:
143 test_verdict = lls_test_misc3();
144 break;
145
146 default:
147 lls_test_trace("Test not available");
148
149 }
150 rvf_dump_mem();
151 rvf_dump_tasks();
152
153 return (test_verdict);
154 }
155
156 /************************ Stop lls_test_misc function ***********************/
157
158 #endif /* #if (LLS_MISC == SW_COMPILED) */