mirror of
1
0
Fork 0
avr_demo/74hc165_piso/timer.h

26 lines
561 B
C
Raw Normal View History

2011-10-16 20:35:16 +02:00
#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