2019-01-01 15:48:54 +00:00
|
|
|
#ifndef _TIME_H_
|
|
|
|
#define _TIME_H_
|
|
|
|
#include "conf.h"
|
|
|
|
|
2019-01-17 18:39:21 +00:00
|
|
|
// This is 2.04 = 2ms
|
|
|
|
#define TIME_MILLIS_PER_OVERFLOW (0xff * 1000UL * 64) / F_CPU
|
2019-01-01 15:48:54 +00:00
|
|
|
|
2019-01-17 18:39:21 +00:00
|
|
|
// for 32bit eigentime
|
|
|
|
struct eigentime_s
|
|
|
|
{
|
|
|
|
unsigned int low, high;
|
|
|
|
};
|
2019-01-01 15:48:54 +00:00
|
|
|
|
2019-01-17 18:39:21 +00:00
|
|
|
extern volatile struct eigentime_s _eigentime_ms;
|
|
|
|
|
|
|
|
void
|
|
|
|
get_eigentime(struct eigentime_s * time);
|
2019-01-01 15:48:54 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
time_init(void);
|
|
|
|
|
|
|
|
#endif
|