/************************************************************************
*                                                                       *
*           Flash the LEDs on the DSLMU Microcontroller Board           *
*                              Header File                              *
*                                                                       *
************************************************************************/

/*  Author:   John Zaitseff <J.Zaitseff@unsw.edu.au>
    Date:     6th March, 2003
    Version:  1.5

    This file provides type definitions, constant declarations, global
    variables and function prototypes for the "Flash the LEDs" program.

    These declarations are provided in this separate file as an example of
    standard C programming techniques; otherwise, this particular program
    is so short that we might not have bothered.
*/


#ifndef __FLASH_H__
#define __FLASH_H__

/*  The above two lines (and the last one in this file) guard against this
    header file being included two (or more) times by accident. */


/*  ---------------------------------------------------------------------
    Type definitions
*/

typedef unsigned char byte;			/* 8-bit byte */


/*  ---------------------------------------------------------------------
    Constant declarations
*/

#define FALSE (0)				/* C value for FALSE */
#define TRUE  (! FALSE)				/* C value for TRUE */

#define LED_port_addr (0x10000000)		/* Address of LED port */

#define Value1  0xFF				/* Value to turn LEDs on */
#define Value2  0x00				/* Value to turn LEDs off */
#define WaitVal 10000				/* Number of loops to wait */


/*  ---------------------------------------------------------------------
    Function prototypes
*/

int main (void);
    /* Main program entry point, flashes the LEDs on and off */

void delay (int delayval);
    /* Delay program execution by wasting time in an idle loop */


#endif /* __FLASH_H__ */

