1
0
mirror of synced 2024-11-24 18:24:24 +01:00
avr_demo/button_debounce_timer/timer.h
2011-10-12 00:04:57 +03:00

26 lines
561 B
C

#ifndef TIMER_H
#define TIMER_H
#include <avr/io.h>
#include <avr/interrupt.h>
/*
* Initializes the timer, and resets the timer count to 0. Sets up the ISRs
* linked with timer1.
*/
void timer_init();
/*
* Returns the number of milliseconds which have elapsed since the
* last time timer_init() was called. Overflows after about 49 days.
*/
uint64_t timer_millis();
/*
* Returns the number of microseconds which have elapsed since the
* last time timer_init() was called. Overflows after about 71 minutes.
*/
uint64_t timer_micros();
#endif