1
0
mirror of synced 2024-05-29 04:28:02 +02:00
avr_demo/button_debounce_shift/timer.h
2011-10-11 23:58:04 +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