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

LEDMap.h

Team Firefox

ME 218A 11/20/09

This software module

  1) Controls the 15LED Map with a decoder

 

Inputs:

(none)

 

Outputs:

T4 T5 T6 T7 – 16 pin ouput decoder

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

 

/*---------------------------- Include Files ------------------------------*/

#ifndef LEDMap_h

#define LEDMap_h

 

#include <stdio.h>

#include <ME218_C32.h>

#include <timers12.h>

 

/*---------------------------- Module Defines ------------------------------*/

typedef enum {  LEDMap_OFF,

                LEDMap_RUNNING,

                LEDMap_GUARD_ARRIVED

  } LEDMap_Status_t;

 

/*---------------------------- Public Prototypes ------------------------------*/

void initLEDMap(void);            //To be once at flicker power up

void startLEDMap(void);           //Resert LED Map to start position with no LEDs on

void LEDMapGuardAlerted(void);    //Speed up guard’s progress on map

 

LEDMap_Status_t checkLEDMapEvents(void); //Will update the Guard’s position on the map

//Will return one of the following:

//     LEDMap_GUARD_ARRIVED – if the map was running and the guard made it to the computer room

//     LEDMap_RUNNING – if the map is running and the guard hasn’t made it to the computer room

//     LEDMap_OFF - otherwise

 

#endif