Gamesm

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

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

Header file for GameSM.c


based on the Gen 2 Events and Services Framework

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

#ifndef GameSM_H
#define GameSM_H

#include <stdint.h>
#include <stdbool.h>

#include "ES_Events.h" //to give definition on the states

#define PIPE_TIMER 1
#define WATER_FLOW_TIMER 4

// typedefs for the states


// State definitions for use with the query function
typedef enum
{
PseudoState_Game,
Uninitialized_Game,
SelectingPipe,
WaterFlowing,
IRRead,
WaitForReset
}GameSM_States_t;

// Public Function Prototypes

bool InitGameSM(uint8_t Priority);


bool PostGameSM(ES_Event_t ThisEvent);
ES_Event_t RunGameSM(ES_Event_t ThisEvent);
void ActivatePipeLED(uint8_t PipeNumber);
void SRPipe_Write(uint8_t NewValue);

#endif /* GameSM_H */

You might also like