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

Gamesm

This header file defines constants and data types used for a game state machine. It includes an events header file and defines enumerated state types for the game. It also prototypes public functions for initializing, posting events to, and running the state machine as well as functions for activating a pipe LED and writing to a pipe register.

Uploaded by

api-438010548
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)
25 views1 page

Gamesm

This header file defines constants and data types used for a game state machine. It includes an events header file and defines enumerated state types for the game. It also prototypes public functions for initializing, posting events to, and running the state machine as well as functions for activating a pipe LED and writing to a pipe register.

Uploaded by

api-438010548
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 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

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy