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.
states.h File Reference

A basic state machine implementation. More...

Go to the source code of this file.

Functions

unsigned char uStatesInit (void)
 Initialized the states stored in the state machine by calling their probe functions, if set. More...
 
unsigned char uStatesRun (void)
 Ticks the state machine over. More...
 
int xStatesAdd (void(*probe)(void), void(*enter)(void), void(*run)(void), void(*exit)(void), int ID, char *name)
 Adds a state to the state machine. More...
 
void vStatesSetCallback (void(*callback)(void))
 Sets the callback function for the state machine. More...
 
void vStatesSetData (void *data)
 Sets the data of the current state. More...
 
void vStatesSetInput (unsigned char input)
 Sets the input variable stored in the state machine. More...
 
unsigned char uStatesSetState (unsigned int state_id)
 Sets the next state of the state machine using the state's ID. More...
 
void * pStatesGetData (void)
 Returns a pointer to the data stored in the current state. More...
 
char * pStatesGetStateName (void)
 Returns the string of the current state's name. More...
 
unsigned char uStatesGetInput (void)
 Retrieves the input vector stored within the state machine. More...
 
int xStatesGetStateID (void)
 Returns the ID of the current state. More...
 
int xStatesGetStateCount (void)
 Returns the number of states currently stored within the state machine. More...
 
int xStatesIncrementState (void)
 Increments the state to the next in the linked list of states. More...
 
int xStatesDecrementState (void)
 Decrements the state to the previous in the linked list of states. More...
 
void vStatesClearInput (void)
 Clears the 8 bit input vector stored in the state machine. More...
 

Detailed Description

A basic state machine implementation.

Author
Alex Hoffman