FreeRTOS Emulator with SDL2 Based Graphics and Input Library  1.0
A POSIX wrapper to run FreeRTOS on an x86 machine with some basic input and output libraries aimed at making teaching FreeRTOS simpler.
demo_tasks.c File Reference

Demo tasks created to illustrate the emulator's functionalities. More...

#include "gfx_event.h"
#include "gfx_ball.h"
#include "gfx_sound.h"
#include "gfx_utils.h"
#include "gfx_print.h"
#include "main.h"
#include "demo_tasks.h"
#include "async_message_queues.h"
#include "async_sockets.h"
#include "buttons.h"
#include "state_machine.h"
#include "draw.h"

Classes

struct  locked_ball
 

Macros

#define mainGENERIC_PRIORITY   (tskIDLE_PRIORITY)
 
#define mainGENERIC_STACK_SIZE   ((unsigned short)2560)
 

Functions

void vStateOneEnter (void)
 Enter function for state one of the state machine. More...
 
void vStateOneExit (void)
 Exit function for state one of the state machine. More...
 
void vDemoTask1 (void *pvParameters)
 
void vPlayBallSound (void *args)
 
void vResetBall (void)
 
void vStateTwoInit (void)
 Init function for state two of the state machine. More...
 
void vStateTwoEnter (void)
 Enter function for state two of the state machine. More...
 
void vStateTwoExit (void)
 Exit function for state two of the state machine. More...
 
void vDemoTask2 (void *pvParameters)
 
void vDemoSendTask (void *pvParameters)
 
int xCreateDemoTasks (void)
 Creates the demo tasks found in demo_tasks.c. More...
 
void vDeleteDemoTasks (void)
 Deletes the demo tasks found in demo_tasks.c. More...
 

Variables

TaskHandle_t DemoTask1 = NULL
 
TaskHandle_t DemoTask2 = NULL
 
TaskHandle_t DemoSendTask = NULL
 
struct locked_ball my_ball = { 0 }
 

Detailed Description

Demo tasks created to illustrate the emulator's functionalities.

Author
Alex Hoffman
Date
23 January 2023
----------------------------------------------------------------------
Copyright (C) Alexander Hoffman, 2023
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
----------------------------------------------------------------------

Macro Definition Documentation

◆ mainGENERIC_PRIORITY

#define mainGENERIC_PRIORITY   (tskIDLE_PRIORITY)

◆ mainGENERIC_STACK_SIZE

#define mainGENERIC_STACK_SIZE   ((unsigned short)2560)

Function Documentation

◆ vDeleteDemoTasks()

void vDeleteDemoTasks ( void  )

Deletes the demo tasks found in demo_tasks.c.

◆ vDemoSendTask()

void vDemoSendTask ( void *  pvParameters)

◆ vDemoTask1()

void vDemoTask1 ( void *  pvParameters)

◆ vDemoTask2()

void vDemoTask2 ( void *  pvParameters)

◆ vPlayBallSound()

void vPlayBallSound ( void *  args)

◆ vResetBall()

void vResetBall ( void  )

◆ vStateOneEnter()

void vStateOneEnter ( void  )

Enter function for state one of the state machine.

◆ vStateOneExit()

void vStateOneExit ( void  )

Exit function for state one of the state machine.

◆ vStateTwoEnter()

void vStateTwoEnter ( void  )

Enter function for state two of the state machine.

◆ vStateTwoExit()

void vStateTwoExit ( void  )

Exit function for state two of the state machine.

◆ vStateTwoInit()

void vStateTwoInit ( void  )

Init function for state two of the state machine.

◆ xCreateDemoTasks()

int xCreateDemoTasks ( void  )

Creates the demo tasks found in demo_tasks.c.

Returns
0 on success

Variable Documentation

◆ DemoSendTask

TaskHandle_t DemoSendTask = NULL

◆ DemoTask1

TaskHandle_t DemoTask1 = NULL

◆ DemoTask2

TaskHandle_t DemoTask2 = NULL

◆ my_ball

struct locked_ball my_ball = { 0 }