FSM Lecture 35: Exercise-003 Implementing initial transition actions

  • Post author:
  • Post category:Blog

 

Exercise-003 Implementing initial transition actions

 

 

Implementing initial transition actions
Figure 1. Protimer_init function

 

The protimer_init function is an initial transition function. It is making a transition to IDLE state. But the IDLE state has its Entry action, the Entry activities there, that’s why, whenever you set the state as IDLE here, you have to call its ENTRY action.

Create one temporary variable, event_t ee; event entry action. 

And ee.sig = ENTRY; and you have to call protimer_state_machine. Because you have to send the entry event to the IDLE state. ‘mobj’ and send the address of the ee variable, as shown in Figure 1. This function is used only one time. 

 

FastBit Embedded Brain Academy Courses

Click here: https://fastbitlab.com/course1

 

FastBitLab

The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.