/****************************************************************************/
/* Copyright 2016 MBARI.                                                    */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/

#include "typedefs.h"

#ifndef _TIMER1_H
#define _TIMER1_H


/* Frequency of oscillator*/
//  The following is used by the main application
#define SYS_FREQ		(8000000)
// Let compile time pre-processor calculate the PR1 (period)
#define PB_DIV         		1
#define PRESCALE       		1
#define TOGGLES_PER_SEC		1000
#define T1_MS_TICK       		(SYS_FREQ/PB_DIV/PRESCALE/TOGGLES_PER_SEC/2)
//#define T1_MS_TICK          (32768/TOGGLES_PER_SEC) //using 32khz crystal
#define SKEW                5 //tested on bench at room T

//function declarations
void vInitTimer1( void );
void msWait ( unsigned long ms );  //delay for ms millisecond
void DelaySecs ( int secs );  //delay for secs seconds








#endif
