/***************************************************************************
Flicker.h
Team Firefox
ME 218A
This software
module
1) Triggers the next FLICKER
2) Receives input to become activated by the
previous FLICKER or the Force Start Button
3) Controls the White Situation Indicator
LEDs (aka Active LEDs. These are the ultra bright white LEDs in the floor and
ceiling)
4) Controls the Red Situation Indicator LEDs
(aka Fail LEDs. These are the red LEDs in the floor and ceiling)
Inputs:
T0 - flicker start
(iso-opto || button)
Outputs:
T1 - trigger next
flicker
M3 - Active LEDs
M2 - Fail LEDs
****************************************************************************/
/*----------------------------
Include Files ------------------------------*/
#ifndef Flicker_h
#define Flicker_h
#include
<stdio.h>
#include
<ME218_C32.h>
#include
<timers12.h>
/*----------------------------
Module Defines -----------------------------*/
typedef enum {
FLICKER_NO_EVENT, //no
activation signal (iso-opto OR start button)
FLICKER_START //activation signal received
} FLICKER_EVENT_t;
/*----------------------------
Public Prototypes -----------------------------*/
void initFlicker(void); //To
be called once at flicker power up
void startNextFlicker(void); //Will
trigger next flicker to start (NOTE: this code will block
//for 75
[ms])
void turnOnActive(char); //Will turn on/off ultra-bright white LEDs in floor and
ceiling
void blinkActive(int); //Will
blink ultra-bright white LEDs in floor and ceiling with a
//blink
frequency of 1/(input int)
void turnOnFail(char); //Will
turn on/off red LEDs in floor and ceiling
void blinkFail(int); //Will
blink red LEDs in floor and ceiling with a blink frequency
//of 1/(input
int)
FLICKER_EVENT_t checkFlickerEvents(void); //Will
check for the flicker start command
// Will return one
of the following:
// FLICKER_START
– if an activation signal from iso-opto or start button has been received
// FLICKER_NO_EVENT
- otherwise
#endif