/****************************************************************************


  Header file for template Flat Sate Machine

  based on the Gen2 Events and Services Framework


 ****************************************************************************/


#ifndef DebouncingService_H

#define DebouncingService_H


// Event Definitions

#include "ES_Configure.h" /* gets us event definitions */

#include "ES_Types.h"     /* gets bool type for returns */

#include "ES_Events.h"


// typedefs for the states

// State definitions for use with the query function


typedef enum

{

  Debounce_Waiting,

  Raw_Right_Down,

  Raw_Left_Down,

  Raw_Right_Up,

  Raw_Left_Up,

}DebouncingState_t;


// Public Function Prototypes


bool InitDebouncingService(uint8_t Priority);

bool PostDebouncingService(ES_Event_t ThisEvent);

ES_Event_t RunDebouncingService(ES_Event_t ThisEvent);


#endif /* DebouncingService_H */