add floating point timer and end address to bulk init

This commit is contained in:
David Voswinkel
2009-07-05 11:29:52 +02:00
parent c55a66f90d
commit 690bfd6502
6 changed files with 35 additions and 14 deletions

View File

@@ -1,7 +1,10 @@
#include <stdint.h>
#include <stdio.h>
#include <avr/io.h>
#include <avr/io.h>
#include <avr/interrupt.h> /* for sei() */
#include "debug.h"
#ifndef OCR1A
#define OCR1A OCR1 // 2313 support
@@ -53,10 +56,10 @@ void timer_start( void )
}
uint16_t timer_stop(void)
double timer_stop(void)
{
//cli();
return second;
double t = ((double)(DEBOUNCE - prescaler) / DEBOUNCE ) + second;
return t;
}