53a50e16b31b14f5ca826a93d5c1fed1b67b8da9
[apps/agl-service-windowmanager-2017.git] / src / policy_manager / stm / zipc / src / StateTransitionor / OnScreenlayer / ZOSL_OslMain.c
1 /************************************************************/
2 /*     ZOSL_OslMain.c                                       */
3 /*     OslMain State transition model source file           */
4 /*     ZIPC Designer Version 1.2.0                          */
5 /************************************************************/
6 #include "../ZST_include.h"
7
8 /* State management variable */
9 static uint8_t ZOSL_OslMainState[ZOSL_OSLMAINSTATENOMAX];
10
11 static void ZOSL_OslMains0StateEntry( void );
12 static void ZOSL_OslMains1StateEntry( void );
13 static void ZOSL_OslMains0e1( void );
14 static void ZOSL_OslMains0e2( void );
15 static void ZOSL_OslMains1e0( void );
16 static void ZOSL_OslRestOffs0e0( void );
17 static void ZOSL_OslRestOffs0e1( void );
18 static void ZOSL_OslRestOffs0e4( void );
19 static void ZOSL_OslRestOffs1e0( void );
20 static void ZOSL_OslRestOffs1e2( void );
21 static void ZOSL_OslRestOffs2e1( void );
22 static void ZOSL_OslRestOns0e0( void );
23 static void ZOSL_OslRestOns0e2( void );
24 static void ZOSL_OslRestOns1e0( void );
25 static void ZOSL_OslRestOns1e1( void );
26 static void ZOSL_OslMains0Event( void );
27 static void ZOSL_OslRestOffs0Event( void );
28 static void ZOSL_OslRestOffs1Event( void );
29 static void ZOSL_OslRestOffs2Event( void );
30 static void ZOSL_OslMains1Event( void );
31 static void ZOSL_OslRestOns0Event( void );
32 static void ZOSL_OslRestOns1Event( void );
33
34 /****************************************/
35 /* State start activity function        */
36 /*   STM : OslMain                      */
37 /*   State : restriction_mode_off( No 0 ) */
38 /****************************************/
39 static void ZOSL_OslMains0StateEntry( void )
40 {
41     switch( ZOSL_OslMainState[ZOSL_OSLMAINS0F] )
42     {
43     case ZOSL_OSLRESTOFFS0:
44         stm_osl_start_activity_none();
45         break;
46     case ZOSL_OSLRESTOFFS1:
47         stm_osl_start_activity_pop_up();
48         break;
49     case ZOSL_OSLRESTOFFS2:
50         stm_osl_start_activity_system_alert();
51         break;
52     default:
53         /*Not accessible to this else (default).*/
54         break;
55     }
56 }
57
58 /****************************************/
59 /* State start activity function        */
60 /*   STM : OslMain                      */
61 /*   State : restriction_mode_2_on( No 1 ) */
62 /****************************************/
63 static void ZOSL_OslMains1StateEntry( void )
64 {
65     switch( ZOSL_OslMainState[ZOSL_OSLMAINS1F] )
66     {
67     case ZOSL_OSLRESTONS0:
68         stm_osl_start_activity_none();
69         break;
70     case ZOSL_OSLRESTONS1:
71         stm_osl_start_activity_system_alert();
72         break;
73     default:
74         /*Not accessible to this else (default).*/
75         break;
76     }
77 }
78
79 /****************************************/
80 /* Action function                      */
81 /*   STM : OslMain                      */
82 /*   State : restriction_mode_off( No 0 ) */
83 /*   Event : stt_crr_layer_on_screen_pop( No 1 ) */
84 /****************************************/
85 static void ZOSL_OslMains0e1( void )
86 {
87     ZOSL_OslMainState[ZOSL_OSLMAIN] = ( uint8_t )ZOSL_OSLMAINS1;
88     ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS0;
89     ZOSL_OslMains1StateEntry();
90 }
91
92 /****************************************/
93 /* Action function                      */
94 /*   STM : OslMain                      */
95 /*   State : restriction_mode_off( No 0 ) */
96 /*   Event : stt_crr_layer_on_screen_sys( No 2 ) */
97 /****************************************/
98 static void ZOSL_OslMains0e2( void )
99 {
100     ZOSL_OslMainState[ZOSL_OSLMAIN] = ( uint8_t )ZOSL_OSLMAINS1;
101     ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS1;
102     ZOSL_OslMains1StateEntry();
103 }
104
105 /****************************************/
106 /* Action function                      */
107 /*   STM : OslMain                      */
108 /*   State : restriction_mode_2_on( No 1 ) */
109 /*   Event : stt_restriction_mode_off( No 0 ) */
110 /****************************************/
111 static void ZOSL_OslMains1e0( void )
112 {
113     ZOSL_OslMainState[ZOSL_OSLMAIN] = ( uint8_t )ZOSL_OSLMAINS0;
114     ZOSL_OslMains0StateEntry();
115 }
116
117 /****************************************/
118 /* Action function                      */
119 /*   STM : OslRestOff                   */
120 /*   State : none( No 0 )               */
121 /*   Event : ara_onscreen( No 0 )       */
122 /****************************************/
123 static void ZOSL_OslRestOffs0e0( void )
124 {
125     ZOSL_OslMainState[ZOSL_OSLMAINS0F] = ( uint8_t )ZOSL_OSLRESTOFFS1;
126     stm_osl_start_activity_pop_up();
127 }
128
129 /****************************************/
130 /* Action function                      */
131 /*   STM : OslRestOff                   */
132 /*   State : none( No 0 )               */
133 /*   Event : ara_onscreen( No 1 )       */
134 /****************************************/
135 static void ZOSL_OslRestOffs0e1( void )
136 {
137     ZOSL_OslMainState[ZOSL_OSLMAINS0F] = ( uint8_t )ZOSL_OSLRESTOFFS2;
138     stm_osl_start_activity_system_alert();
139 }
140
141 /****************************************/
142 /* Action function                      */
143 /*   STM : OslRestOff                   */
144 /*   State : none( No 0 )               */
145 /*   Event : stt_prv_layer_on_screen_none( No 4 ) */
146 /****************************************/
147 static void ZOSL_OslRestOffs0e4( void )
148 {
149     stm_osl_start_activity_none();
150 }
151
152 /****************************************/
153 /* Action function                      */
154 /*   STM : OslRestOff                   */
155 /*   State : popup( No 1 )              */
156 /*   Event : ara_onscreen( No 0 )       */
157 /****************************************/
158 static void ZOSL_OslRestOffs1e0( void )
159 {
160     stm_osl_start_activity_pop_up();
161 }
162
163 /****************************************/
164 /* Action function                      */
165 /*   STM : OslRestOff                   */
166 /*   State : popup( No 1 )              */
167 /*   Event : ctg_popup( No 2 )          */
168 /****************************************/
169 static void ZOSL_OslRestOffs1e2( void )
170 {
171     ZOSL_OslMainState[ZOSL_OSLMAINS0F] = ( uint8_t )ZOSL_OSLRESTOFFS0;
172     stm_osl_start_activity_none();
173 }
174
175 /****************************************/
176 /* Action function                      */
177 /*   STM : OslRestOff                   */
178 /*   State : system_alert( No 2 )       */
179 /*   Event : ara_onscreen( No 1 )       */
180 /****************************************/
181 static void ZOSL_OslRestOffs2e1( void )
182 {
183     stm_osl_start_activity_system_alert();
184 }
185
186 /****************************************/
187 /* Action function                      */
188 /*   STM : OslRestOn                    */
189 /*   State : none( No 0 )               */
190 /*   Event : ara_onscreen( No 0 )       */
191 /****************************************/
192 static void ZOSL_OslRestOns0e0( void )
193 {
194     ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS1;
195     stm_osl_start_activity_system_alert();
196 }
197
198 /****************************************/
199 /* Action function                      */
200 /*   STM : OslRestOn                    */
201 /*   State : none( No 0 )               */
202 /*   Event : stt_prv_layer_on_screen_none( No 2 ) */
203 /****************************************/
204 static void ZOSL_OslRestOns0e2( void )
205 {
206     stm_osl_start_activity_none();
207 }
208
209 /****************************************/
210 /* Action function                      */
211 /*   STM : OslRestOn                    */
212 /*   State : system_alert( No 1 )       */
213 /*   Event : ara_onscreen( No 0 )       */
214 /****************************************/
215 static void ZOSL_OslRestOns1e0( void )
216 {
217     stm_osl_start_activity_system_alert();
218 }
219
220 /****************************************/
221 /* Action function                      */
222 /*   STM : OslRestOn                    */
223 /*   State : system_alert( No 1 )       */
224 /*   Event : ctg_systemalert( No 1 )    */
225 /****************************************/
226 static void ZOSL_OslRestOns1e1( void )
227 {
228     ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS0;
229     stm_osl_start_activity_none();
230 }
231
232 /****************************************/
233 /* Event appraisal function             */
234 /*   STM : OslMain                      */
235 /*   State : restriction_mode_off( No 0 ) */
236 /****************************************/
237 static void ZOSL_OslMains0Event( void )
238 {
239     /*stt_restriction_mode_2_on*/
240     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On )
241     {
242         stm_rel_event_restriction_mode_2_on();
243         /*stt_crr_layer_on_screen_pop*/
244         if( g_stm_crr_state.layer[StmLayerNoOnScreen].state == StmLayoutNoPopUp )
245         {
246             ZOSL_OslMains0e1();
247         }
248         /*stt_crr_layer_on_screen_sys*/
249         else if( g_stm_crr_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt )
250         {
251             ZOSL_OslMains0e2();
252         }
253         else
254         {
255             /*Else and default design have not done.*/
256             /*Please confirm the STM and design else and default.*/
257         }
258     }
259     else
260     {
261         /*Else and default design have not done.*/
262         /*Please confirm the STM and design else and default.*/
263     }
264 }
265
266 /****************************************/
267 /* Event appraisal function             */
268 /*   STM : OslRestOff                   */
269 /*   State : none( No 0 )               */
270 /****************************************/
271 static void ZOSL_OslRestOffs0Event( void )
272 {
273     /*stt_restriction_mode_off*/
274     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
275     {
276         /*evt_activate*/
277         if( g_stm_event == StmEvtNoActivate )
278         {
279             /*ctg_popup*/
280             if( g_stm_category == StmCtgNoPopUp )
281             {
282                 /*ara_onscreen*/
283                 if( g_stm_area == StmAreaNoOnScreen )
284                 {
285                     ZOSL_OslRestOffs0e0();
286                 }
287                 else
288                 {
289                     /*Else and default design have not done.*/
290                     /*Please confirm the STM and design else and default.*/
291                 }
292             }
293             /*ctg_systemalert*/
294             else if( g_stm_category == StmCtgNoSystemAlert )
295             {
296                 /*ara_onscreen*/
297                 if( g_stm_area == StmAreaNoOnScreen )
298                 {
299                     ZOSL_OslRestOffs0e1();
300                 }
301                 else
302                 {
303                     /*Else and default design have not done.*/
304                     /*Please confirm the STM and design else and default.*/
305                 }
306             }
307             else
308             {
309                 /*Else and default design have not done.*/
310                 /*Please confirm the STM and design else and default.*/
311             }
312         }
313         /*evt_undo*/
314         else if( g_stm_event == StmEvtNoUndo )
315         {
316             /*stt_prv_layer_on_screen_none*/
317             if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoNone )
318             {
319                 ZOSL_OslRestOffs0e4();
320             }
321             /*stt_prv_layer_on_screen_pop_up*/
322             else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoPopUp )
323             {
324                 ZOSL_OslRestOffs0e0();
325             }
326             /*stt_prv_layer_on_screen_sys_alt*/
327             else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt )
328             {
329                 ZOSL_OslRestOffs0e1();
330             }
331             else
332             {
333                 /*Else and default design have not done.*/
334                 /*Please confirm the STM and design else and default.*/
335             }
336         }
337         else
338         {
339             /*Else and default design have not done.*/
340             /*Please confirm the STM and design else and default.*/
341         }
342     }
343     else
344     {
345         /*Else and default design have not done.*/
346         /*Please confirm the STM and design else and default.*/
347     }
348 }
349
350 /****************************************/
351 /* Event appraisal function             */
352 /*   STM : OslRestOff                   */
353 /*   State : popup( No 1 )              */
354 /****************************************/
355 static void ZOSL_OslRestOffs1Event( void )
356 {
357     /*stt_restriction_mode_off*/
358     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
359     {
360         /*evt_activate*/
361         if( g_stm_event == StmEvtNoActivate )
362         {
363             /*ctg_popup*/
364             if( g_stm_category == StmCtgNoPopUp )
365             {
366                 /*ara_onscreen*/
367                 if( g_stm_area == StmAreaNoOnScreen )
368                 {
369                     ZOSL_OslRestOffs1e0();
370                 }
371                 else
372                 {
373                     /*Else and default design have not done.*/
374                     /*Please confirm the STM and design else and default.*/
375                 }
376             }
377             /*ctg_systemalert*/
378             else if( g_stm_category == StmCtgNoSystemAlert )
379             {
380                 /*ara_onscreen*/
381                 if( g_stm_area == StmAreaNoOnScreen )
382                 {
383                     ZOSL_OslRestOffs0e1();
384                 }
385                 else
386                 {
387                     /*Else and default design have not done.*/
388                     /*Please confirm the STM and design else and default.*/
389                 }
390             }
391             else
392             {
393                 /*Else and default design have not done.*/
394                 /*Please confirm the STM and design else and default.*/
395             }
396         }
397         /*evt_deactivate*/
398         else if( g_stm_event == StmEvtNoDeactivate )
399         {
400             /*ctg_popup*/
401             if( g_stm_category == StmCtgNoPopUp )
402             {
403                 ZOSL_OslRestOffs1e2();
404             }
405             else
406             {
407                 /*Else and default design have not done.*/
408                 /*Please confirm the STM and design else and default.*/
409             }
410         }
411         /*evt_undo*/
412         else if( g_stm_event == StmEvtNoUndo )
413         {
414             /*stt_prv_layer_on_screen_none*/
415             if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoNone )
416             {
417                 ZOSL_OslRestOffs1e2();
418             }
419             /*stt_prv_layer_on_screen_pop_up*/
420             else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoPopUp )
421             {
422                 ZOSL_OslRestOffs1e0();
423             }
424             /*stt_prv_layer_on_screen_sys_alt*/
425             else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt )
426             {
427                 ZOSL_OslRestOffs0e1();
428             }
429             else
430             {
431                 /*Else and default design have not done.*/
432                 /*Please confirm the STM and design else and default.*/
433             }
434         }
435         else
436         {
437             /*Else and default design have not done.*/
438             /*Please confirm the STM and design else and default.*/
439         }
440     }
441     else
442     {
443         /*Else and default design have not done.*/
444         /*Please confirm the STM and design else and default.*/
445     }
446 }
447
448 /****************************************/
449 /* Event appraisal function             */
450 /*   STM : OslRestOff                   */
451 /*   State : system_alert( No 2 )       */
452 /****************************************/
453 static void ZOSL_OslRestOffs2Event( void )
454 {
455     /*stt_restriction_mode_off*/
456     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
457     {
458         /*evt_activate*/
459         if( g_stm_event == StmEvtNoActivate )
460         {
461             /*ctg_systemalert*/
462             if( g_stm_category == StmCtgNoSystemAlert )
463             {
464                 /*ara_onscreen*/
465                 if( g_stm_area == StmAreaNoOnScreen )
466                 {
467                     ZOSL_OslRestOffs2e1();
468                 }
469                 else
470                 {
471                     /*Else and default design have not done.*/
472                     /*Please confirm the STM and design else and default.*/
473                 }
474             }
475             else
476             {
477                 /*Else and default design have not done.*/
478                 /*Please confirm the STM and design else and default.*/
479             }
480         }
481         /*evt_deactivate*/
482         else if( g_stm_event == StmEvtNoDeactivate )
483         {
484             /*ctg_systemalert*/
485             if( g_stm_category == StmCtgNoSystemAlert )
486             {
487                 ZOSL_OslRestOffs1e2();
488             }
489             else
490             {
491                 /*Else and default design have not done.*/
492                 /*Please confirm the STM and design else and default.*/
493             }
494         }
495         /*evt_undo*/
496         else if( g_stm_event == StmEvtNoUndo )
497         {
498             /*stt_prv_layer_on_screen_none*/
499             if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoNone )
500             {
501                 ZOSL_OslRestOffs1e2();
502             }
503             /*stt_prv_layer_on_screen_pop_up*/
504             else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoPopUp )
505             {
506                 ZOSL_OslRestOffs0e0();
507             }
508             /*stt_prv_layer_on_screen_sys_alt*/
509             else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt )
510             {
511                 ZOSL_OslRestOffs2e1();
512             }
513             else
514             {
515                 /*Else and default design have not done.*/
516                 /*Please confirm the STM and design else and default.*/
517             }
518         }
519         else
520         {
521             /*Else and default design have not done.*/
522             /*Please confirm the STM and design else and default.*/
523         }
524     }
525     else
526     {
527         /*Else and default design have not done.*/
528         /*Please confirm the STM and design else and default.*/
529     }
530 }
531
532 /****************************************/
533 /* Event appraisal function             */
534 /*   STM : OslMain                      */
535 /*   State : restriction_mode_2_on( No 1 ) */
536 /****************************************/
537 static void ZOSL_OslMains1Event( void )
538 {
539     /*stt_restriction_mode_off*/
540     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
541     {
542         stm_rel_event_restriction_mode_off();
543         ZOSL_OslMains1e0();
544     }
545     else
546     {
547         /*Else and default design have not done.*/
548         /*Please confirm the STM and design else and default.*/
549     }
550 }
551
552 /****************************************/
553 /* Event appraisal function             */
554 /*   STM : OslRestOn                    */
555 /*   State : none( No 0 )               */
556 /****************************************/
557 static void ZOSL_OslRestOns0Event( void )
558 {
559     /*stt_restriction_mode_2_on*/
560     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On )
561     {
562         /*evt_activate*/
563         if( g_stm_event == StmEvtNoActivate )
564         {
565             /*ctg_systemalert*/
566             if( g_stm_category == StmCtgNoSystemAlert )
567             {
568                 /*ara_onscreen*/
569                 if( g_stm_area == StmAreaNoOnScreen )
570                 {
571                     ZOSL_OslRestOns0e0();
572                 }
573                 else
574                 {
575                     /*Else and default design have not done.*/
576                     /*Please confirm the STM and design else and default.*/
577                 }
578             }
579             else
580             {
581                 /*Else and default design have not done.*/
582                 /*Please confirm the STM and design else and default.*/
583             }
584         }
585         /*evt_undo*/
586         else if( g_stm_event == StmEvtNoUndo )
587         {
588             /*stt_prv_layer_on_screen_none*/
589             if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoNone )
590             {
591                 ZOSL_OslRestOns0e2();
592             }
593             /*stt_prv_layer_on_screen_sys_alt*/
594             else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt )
595             {
596                 ZOSL_OslRestOns0e0();
597             }
598             else
599             {
600                 /*Else and default design have not done.*/
601                 /*Please confirm the STM and design else and default.*/
602             }
603         }
604         else
605         {
606             /*Else and default design have not done.*/
607             /*Please confirm the STM and design else and default.*/
608         }
609     }
610     else
611     {
612         /*Else and default design have not done.*/
613         /*Please confirm the STM and design else and default.*/
614     }
615 }
616
617 /****************************************/
618 /* Event appraisal function             */
619 /*   STM : OslRestOn                    */
620 /*   State : system_alert( No 1 )       */
621 /****************************************/
622 static void ZOSL_OslRestOns1Event( void )
623 {
624     /*stt_restriction_mode_2_on*/
625     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On )
626     {
627         /*evt_activate*/
628         if( g_stm_event == StmEvtNoActivate )
629         {
630             /*ctg_systemalert*/
631             if( g_stm_category == StmCtgNoSystemAlert )
632             {
633                 /*ara_onscreen*/
634                 if( g_stm_area == StmAreaNoOnScreen )
635                 {
636                     ZOSL_OslRestOns1e0();
637                 }
638                 else
639                 {
640                     /*Else and default design have not done.*/
641                     /*Please confirm the STM and design else and default.*/
642                 }
643             }
644             else
645             {
646                 /*Else and default design have not done.*/
647                 /*Please confirm the STM and design else and default.*/
648             }
649         }
650         /*evt_deactivate*/
651         else if( g_stm_event == StmEvtNoDeactivate )
652         {
653             /*ctg_systemalert*/
654             if( g_stm_category == StmCtgNoSystemAlert )
655             {
656                 ZOSL_OslRestOns1e1();
657             }
658             else
659             {
660                 /*Else and default design have not done.*/
661                 /*Please confirm the STM and design else and default.*/
662             }
663         }
664         /*evt_undo*/
665         else if( g_stm_event == StmEvtNoUndo )
666         {
667             /*stt_prv_layer_on_screen_none*/
668             if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoNone )
669             {
670                 ZOSL_OslRestOns1e1();
671             }
672             /*stt_prv_layer_on_screen_sys_alt*/
673             else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt )
674             {
675                 ZOSL_OslRestOns1e0();
676             }
677             else
678             {
679                 /*Else and default design have not done.*/
680                 /*Please confirm the STM and design else and default.*/
681             }
682         }
683         else
684         {
685             /*Else and default design have not done.*/
686             /*Please confirm the STM and design else and default.*/
687         }
688     }
689     else
690     {
691         /*Else and default design have not done.*/
692         /*Please confirm the STM and design else and default.*/
693     }
694 }
695
696 /****************************************/
697 /* Event call function                  */
698 /*   STM : OslMain                      */
699 /****************************************/
700 void stm_osl_event_call( void )
701 {
702     stm_osl_start_stm();
703     switch( ZOSL_OslMainState[ZOSL_OSLMAIN] )
704     {
705     case ZOSL_OSLMAINS0:
706         switch( ZOSL_OslMainState[ZOSL_OSLMAINS0F] )
707         {
708         case ZOSL_OSLRESTOFFS0:
709             ZOSL_OslRestOffs0Event();
710             break;
711         case ZOSL_OSLRESTOFFS1:
712             ZOSL_OslRestOffs1Event();
713             break;
714         case ZOSL_OSLRESTOFFS2:
715             ZOSL_OslRestOffs2Event();
716             break;
717         default:
718             /*Not accessible to this else (default).*/
719             break;
720         }
721         ZOSL_OslMains0Event();
722         break;
723     case ZOSL_OSLMAINS1:
724         switch( ZOSL_OslMainState[ZOSL_OSLMAINS1F] )
725         {
726         case ZOSL_OSLRESTONS0:
727             ZOSL_OslRestOns0Event();
728             break;
729         case ZOSL_OSLRESTONS1:
730             ZOSL_OslRestOns1Event();
731             break;
732         default:
733             /*Not accessible to this else (default).*/
734             break;
735         }
736         ZOSL_OslMains1Event();
737         break;
738     default:
739         /*Not accessible to this else (default).*/
740         break;
741     }
742 }
743
744 /****************************************/
745 /* Initial function                     */
746 /*   STM : OslMain                      */
747 /****************************************/
748 void stm_osl_initialize( void )
749 {
750     ZOSL_OslMainState[ZOSL_OSLMAIN] = ( uint8_t )ZOSL_OSLMAINS0;
751     ZOSL_OslMainState[ZOSL_OSLMAINS0F] = ( uint8_t )ZOSL_OSLRESTOFFS0;
752     ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS0;
753     ZOSL_OslMains0StateEntry();
754 }
755
756 /****************************************/
757 /* Terminate function                   */
758 /*   STM : OslMain                      */
759 /****************************************/
760 void ZOSL_OslMainTerminate( void )
761 {
762     ZOSL_OslMainState[ZOSL_OSLMAIN] = ( uint8_t )ZOSL_OSLMAINTERMINATE;
763 }
764