/*
 * $Id: timer.h 187 2005-09-30 18:04:41Z anders $
 * 
 * Copyright (C) 2005 Anders Dubgaard <anders@dubgaard.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

#ifndef _TIMER_H
#define _TIMER_H

#include <avr/io.h>
#include "common.h"

#if defined (__AVR_ATmega128__)
#  define OC2PIN  PB7 /* OC2 is PB7 on ATmega128 */
#elif defined(__AVR_ATmega8__)
#  define OC2PIN  PB3 /* OC2 is PB3 on ATmega8 */
#else
#  error  "Don't know your MCU's OC2 pin!"
#endif

void start_timer0(void);
void start_timer1(void);
void start_timer2(void);
void start_pwm_timer(void);

#endif  // _TIMER_H
