avrinput/time.h
2019-01-17 19:39:21 +01:00

23 lines
340 B
C

#ifndef _TIME_H_
#define _TIME_H_
#include "conf.h"
// This is 2.04 = 2ms
#define TIME_MILLIS_PER_OVERFLOW (0xff * 1000UL * 64) / F_CPU
// for 32bit eigentime
struct eigentime_s
{
unsigned int low, high;
};
extern volatile struct eigentime_s _eigentime_ms;
void
get_eigentime(struct eigentime_s * time);
void
time_init(void);
#endif