Kinetis SDK v.1.2 Demo Applications User's Guide  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
state_machine.h File Reference

State machine. More...

Go to the source code of this file.

Data Structures

struct  SM_APP_STATE_FCN_T
 User state machine functions structure. More...
 
struct  SM_APP_TRANS_FCN_T
 User state-transition functions structure. More...
 
struct  SM_APP_CTRL_T
 State machine control structure. More...
 

Macros

#define true
 
#define false
 
#define SM_CTRL_NONE
 State machine control command flags. More...
 
#define SM_CTRL_FAULT
 
#define SM_CTRL_FAULT_CLEAR
 
#define SM_CTRL_INIT_DONE
 
#define SM_CTRL_STOP
 
#define SM_CTRL_START
 
#define SM_CTRL_STOP_ACK
 
#define SM_CTRL_RUN_ACK
 

Typedefs

typedef unsigned short SM_APP_CTRL
 
typedef unsigned long SM_APP_FAULT
 
typedef void(* PFCN_VOID_VOID )(void)
 pointer to function More...
 
typedef void(* PFCN_VOID_PSM )(SM_APP_CTRL_T *sAppCtrl)
 Pointer to function with a pointer to state machine control structure. More...
 

Enumerations

enum  SM_APP_STATE_T {
  FAULT,
  INIT,
  STOP,
  RUN
}
 Application state identification enum. More...
 

Functions

void SM_StateMachine (SM_APP_CTRL_T *sAppCtrl)
 State machine function. More...
 

Variables

const PFCN_VOID_PSM gSM_STATE_TABLE [4]
 State machine function table (in pmem) More...
 

Detailed Description

Author
r63172
Version
1.0.1.0
Date
Sep-16-2013

State machine.


Data Structure Documentation

struct SM_APP_STATE_FCN_T
struct SM_APP_TRANS_FCN_T
Data Fields
PFCN_VOID_VOID FaultInit
PFCN_VOID_VOID InitFault
PFCN_VOID_VOID InitStop
PFCN_VOID_VOID RunFault
PFCN_VOID_VOID RunStop
PFCN_VOID_VOID StopFault
PFCN_VOID_VOID StopInit
PFCN_VOID_VOID StopRun
struct SM_APP_CTRL_T
Data Fields
SM_APP_STATE_T eState
SM_APP_STATE_FCN_T const * psState
SM_APP_TRANS_FCN_T const * psTrans
SM_APP_CTRL uiCtrl

Macro Definition Documentation

#define false
#define SM_CTRL_FAULT
#define SM_CTRL_FAULT_CLEAR
#define SM_CTRL_INIT_DONE
#define SM_CTRL_NONE
#define SM_CTRL_RUN_ACK
#define SM_CTRL_START
#define SM_CTRL_STOP
#define SM_CTRL_STOP_ACK
#define true

Typedef Documentation

typedef void(* PFCN_VOID_PSM)(SM_APP_CTRL_T *sAppCtrl)
typedef void(* PFCN_VOID_VOID)(void)
typedef unsigned short SM_APP_CTRL
typedef unsigned long SM_APP_FAULT

Enumeration Type Documentation

Enumerator
FAULT 
INIT 
STOP 
RUN 

Function Documentation

void SM_StateMachine ( SM_APP_CTRL_T sAppCtrl)

Variable Documentation

const PFCN_VOID_PSM gSM_STATE_TABLE[4]

State machine function table (in pmem)