Skip to content

Instantly share code, notes, and snippets.

View michaellin's full-sized avatar

Michael Lin michaellin

  • Stanford, CA
View GitHub Profile
/****************************************************************************
Module
ES_Configure.h
Description
This file contains macro definitions that are edited by the user to
adapt the Events and Services framework to a particular application.
Notes
History
When Who What/Why
#ifndef Pipe2ButtonService_H
#define Pipe2ButtonService_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
/***Service Module to debounce Pipe2 button***/
/*----------------------------- Include Files -----------------------------*/
#include "ES_Configure.h"
#include "ES_Framework.h"
#include "ES_DeferRecall.h"
#include "ES_ShortTimer.h"
#include "LCDService.h"
/***Service Module to debounce Pipe1 button***/
/*----------------------------- Include Files -----------------------------*/
#include "ES_Configure.h"
#include "ES_Framework.h"
#include "ES_DeferRecall.h"
#include "ES_ShortTimer.h"
#include "LCDService.h"
#ifndef Pipe1ButtonService_H
#define Pipe1ButtonService_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
/***Service Module to debounce start button***/
define All_BITS offset variable
initialize module level variables
/**************************************************************
Function: InitStartButtonDB
Takes: 8 bit integer (priority number)
Returns: true or false
/***Service Module to debounce start button***/
/*----------------------------- Include Files -----------------------------*/
#include "ES_Configure.h"
#include "ES_Framework.h"
#include "ES_DeferRecall.h"
#include "ES_ShortTimer.h"
#include "LCDService.h"
#ifndef StartButtonService_H
#define StartButtonService_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
/***Service module that implements a state machine for writing individual characters and commands to LCD***/
initialize module level variables
/**************************************************************
Function: InitLCDService
Takes: 8 bit integer (priority number)
Returns: true or false
Purpose: Stores priority number of this service inside the module and puts state machine into initial pseudo-state.
/*************************************************************/
#ifndef LCDService_H
#define LCDService_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