//
// defcon.h
//
// DEFCON 14 Circuit Board Badge
//
// This file contains code for the Microchip PIC10F202/206 for CCS PCM
//
// Copyright (c) 2006 Grand Idea Studio, Inc. (http://www.grandideastudio.com)
//

#ifndef __INC_DEFCON_H__
#define __INC_DEFCON_H__

#include <10F202.h>
#use delay(clock=4000000)

// Configuration Bits:
// Watchdog Timer (WDT) = DISABLED
// Master Clear Enable = DISABLED (Functions as GP3)
// Code Protect = DISABLED
#fuses NOWDT, NOMCLR, NOPROTECT

// port definitions
#define SW_MODE         PIN_B0		// mode select switch
#define LED_1        	PIN_B1
#define LED_2       	PIN_B2

typedef enum // define the modes for the state machine
{
   SLEEP,
   STEADY, 
   BLINK,
   ALT,
   RANDOM
} state_type;


// function prototypes
void all_off (void);
void all_on (void);
void led1_on (void);
void led2_on (void);
char rand (void);
void hardware_init (void);

#endif
