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.
state_machine.h
Go to the documentation of this file.
1 
25 #ifndef __STATE_MACHINE_H__
26 #define __STATE_MACHINE_H__
27 
28 #include "FreeRTOS.h"
29 #include "queue.h"
30 
31 #define STARTING_STATE STATE_ONE
32 #define STATE_DEBOUNCE_DELAY 300
33 #define STATE_QUEUE_LENGTH 1
34 
35 #define STATE_ONE 0
36 #define STATE_TWO 1
37 
38 #define STATE_MACHINE_PERIOD 10
39 
42 int vCheckStateInput(void);
43 
47 void vStateMachineTask(void *pvParameters);
48 
51 int xStateMachineInit(void);
52 
53 #endif // __STATE_MACHINE_H__
int xStateMachineInit(void)
Initialized the states for the state machine.
Definition: state_machine.c:34
void vStateMachineTask(void *pvParameters)
Function to be run as the state machine's task, orchestrates a periodic call to states run.
Definition: state_machine.c:26
int vCheckStateInput(void)
Checks if the button C was pressed and if so increments the system's state.
Definition: state_machine.c:11