Please ASAP 1. include \"rims.h\" state BL Ledoft typedef struct task 80 int sta
ID: 3726242 • Letter: P
Question
Please ASAP
1. include "rims.h" state BL Ledoft typedef struct task 80 int state: state-1: I Transitions 6. nsigned long period: unsigned long elapsedTime int (TickFct) (int): 84 switch (state) case BI Ledoff: 11. task tasks [21 87 case BL Ledon: 13. const unsigned char tasksNum 2: 14. const unsigmed long periodB1inkted- 1500 15. const unsigned long periodThreeLeds 500: B0-1: break: 90 default 92 93 / State actions 94 return state 17. const unsigned long tasksPeriodGCD 500; 19. int TickFct BlinkLed(int state) 20. int rickFet ThreeLeds (int state): 96 97 98. enum TL_States TL TO, TL_Tl, TL_T2) TL State: 99. int TickFct Threeteds (int state) 22. unsigned char processingRdyTasks 0 23. void TimerISRO 24 unsigned char i 25. if (process ingRdytasks) VARIABLES MUST BE DECLARED STATIC/ se.g, static intx-0: /variables for state machine go here.* printf ("period too short In") 103. switch (state) case -1: 28. processingRdyTasks-1 29. for-0: iExplanation / Answer
If you have any problems with the answer or want me to edit the answer, just let me know in the comments and I will try to get on to it as soon as possible. Do give a positive rating if you think this answer helped.
We are required to do only 4 parts of a question.
1. The correct option is Line 4-9 as members of this struct are partially hidden via struct.
2. The correct option is Line 19 as it is the declaration of tick function.
3. The correct option is Line 11 as it creates array of task.
4. The correct option is Line 40-44, we have used variable instead of taking constant to dynamically initialise size of array which allocates size accordingly rather than pointing a fixed size.