#ifndef SPIGOT_H
#define SPIGOT_H

// the common headers for C99 types 
#include <stdint.h>
#include <stdbool.h>
#include "ES_Configure.h"
#include "ES_Events.h"
#include "ES_Types.h"    /* gets bool type for returns */

#define ALL_BITS (0xff<<2)
#define FULL_REVOLUTION 24

// typedefs for the states in the spigot state machine
// State definitions for use with the query function
typedef enum {  InitialSpigot,
								WaitingForGameStartSpigots,
								NoSpigotsOn,
								OneSpigotOn,
								BothSpigotsOn} SpigotState_t ;

//Public function prototypes
bool InitSpigot (uint8_t Priority);
bool PostSpigot( ES_Event ThisEvent );
bool CheckSpigotEvents(void);
ES_Event RunSpigot(ES_Event ThisEvent);
#endif //SPIGOT_H
