FreeRTOS Tetris
game.h
Go to the documentation of this file.
1 
22 #ifndef GAME_H
23 #define GAME_H
24 
25 #include "tetrisConfig.h"
26 
31 #define PRINT_TASK_ERROR(task) PRINT_ERROR("Failed to print task ##task");
32 
34 // Task Handles *********************************************************************
36 extern TaskHandle_t GameTask;
37 extern TaskHandle_t PauseTask;
38 extern TaskHandle_t ScoreTask;
39 
40 // Queue Handles ********************************************************************
44 
45 // Semaphore Handles ****************************************************************
46 extern SemaphoreHandle_t ScreenLock;
47 extern SemaphoreHandle_t DrawSignal;
48 extern SemaphoreHandle_t ResetGameSignal;
49 extern SemaphoreHandle_t ResetUDPSignal;
50 extern SemaphoreHandle_t NoConnectionSignal;
51 
62 int iGameInit();
63 
64 #endif //GAME_H
ResetUDPSignal
SemaphoreHandle_t ResetUDPSignal
Signal for resetting the UDP socket
Definition: game.c:58
TaskHandle_t
void * TaskHandle_t
Type by which tasks are referenced.
Definition: task.h:132
GameModeQueue
QueueHandle_t GameModeQueue
Queue for the game mode
Definition: game.c:67
GameTask
TaskHandle_t GameTask
Task for the Game Task
Definition: game.c:35
ScoreTask
TaskHandle_t ScoreTask
Task for the Score Task
Definition: game.c:37
ResetGameSignal
SemaphoreHandle_t ResetGameSignal
Signal for resetting the game
Definition: game.c:57
QueueHandle_t
void * QueueHandle_t
Definition: queue.h:135
iGameInit
int iGameInit()
Initialize the game.
Definition: game.c:687
MainMenuTask
TaskHandle_t MainMenuTask
Task for the Main Menu Task
Definition: game.c:34
TetrominoQueue
QueueHandle_t TetrominoQueue
Queue for receiving tetromino types from opponent
Definition: opponent.c:29
tetrisConfig.h
File containing some game configurations.
NoConnectionSignal
SemaphoreHandle_t NoConnectionSignal
Signal if the binary is not connected
Definition: game.c:59
ConnectionQueue
QueueHandle_t ConnectionQueue
Queue for the connection status
Definition: game.c:66
ScreenLock
SemaphoreHandle_t ScreenLock
Semaphore for locking the screen
Definition: game.c:50
DrawSignal
SemaphoreHandle_t DrawSignal
Signal for drawing
Definition: game.c:51
PauseTask
TaskHandle_t PauseTask
Task for the Pause Task
Definition: game.c:36