avrinput/time.h

23 lines
346 B
C
Raw Normal View History

2019-01-01 15:48:54 +00:00
#ifndef _TIME_H_
#define _TIME_H_
#include "conf.h"
2019-04-07 18:35:05 +00:00
#define TIME_TENTH_MILLIS_PER_OVERFLOW (0xff * 10000UL * 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-04-07 18:35:05 +00:00
unsigned int tenth;
2019-01-17 18:39:21 +00:00
};
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