0% found this document useful (0 votes)
56 views1 page

Trex

This C header file defines types and functions for a state machine controlling a TRex. It includes event definition headers, defines enum types for each state, and prototypes public functions for initializing and running the state machine as well as checking limits.

Uploaded by

api-385142684
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views1 page

Trex

This C header file defines types and functions for a state machine controlling a TRex. It includes event definition headers, defines enum types for each state, and prototypes public functions for initializing and running the state machine as well as checking limits.

Uploaded by

api-385142684
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

/****************************************************************************

Header file for TRex State Machine


based on the Gen2 Events and Services Framework

****************************************************************************/

#ifndef TRex_H
#define TRex_H

// Event Definitions
#include "ES_Configure.h" /* gets us event definitions */
#include "ES_Types.h" /* gets bool type for returns */

// typedefs for the states


// State definitions for use with the query function
typedef enum
{
InitializingTRex, WaitingForPlacementTRex, RisingTRex, LimitHitEarlyTRex,
LoweringTRex, ResetFullyTRex, WaitingForHeadphonesTRex
}TRexState_t;

// Public Function Prototypes

bool InitTRex(uint8_t Priority);


bool PostTRex(ES_Event ThisEvent);
ES_Event RunTRex(ES_Event ThisEvent);

bool CheckLimitUp(void);
bool CheckLimitDown(void);

#endif /* TRex_H */

You might also like