FreeRTOS Tetris
stateMachine.h
Go to the documentation of this file.
1 
21 #ifndef STATE_MACHINE_H
22 #define STATE_MACHINE_H
23 
24 #include "tetrisConfig.h"
25 
26 extern const uint8_t nextStateSignal;
27 extern const uint8_t prevStateSignal;
29 
48 int iCheckStateInput(player_mode_t playerMode, bool isConnected, rotation_t rotationMode, bool gameOver);
49 
55 int iStateMachineInit();
56 
57 #endif // STATE_MACHINE_H
StateQueue
QueueHandle_t StateQueue
Queue for the different states
Definition: stateMachine.c:26
iCheckStateInput
int iCheckStateInput(player_mode_t playerMode, bool isConnected, rotation_t rotationMode, bool gameOver)
Function that checks if the player switched to a different state, depending on different parameters.
Definition: stateMachine.c:123
QueueHandle_t
void * QueueHandle_t
Definition: queue.h:135
nextStateSignal
const uint8_t nextStateSignal
Signal to change to the next state.
Definition: stateMachine.c:23
prevStateSignal
const uint8_t prevStateSignal
Signal to change to the previous state.
Definition: stateMachine.c:24
tetrisConfig.h
File containing some game configurations.
rotation_t
enum rotation rotation_t
Rotations.
iStateMachineInit
int iStateMachineInit()
Initialize the state machine.
Definition: stateMachine.c:221
player_mode_t
enum player_mode player_mode_t
Player modes.