2015-09-07 20:57:04 +00:00
|
|
|
#include "ch.h"
|
|
|
|
|
|
|
|
#include "timer.h"
|
|
|
|
|
|
|
|
void timer_init(void) {}
|
|
|
|
|
|
|
|
void timer_clear(void) {}
|
|
|
|
|
|
|
|
uint16_t timer_read(void)
|
|
|
|
{
|
|
|
|
return (uint16_t)ST2MS(chVTGetSystemTime());
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t timer_read32(void)
|
|
|
|
{
|
|
|
|
return ST2MS(chVTGetSystemTime());
|
|
|
|
}
|
|
|
|
|
|
|
|
uint16_t timer_elapsed(uint16_t last)
|
|
|
|
{
|
|
|
|
return (uint16_t)(ST2MS(chVTTimeElapsedSinceX(MS2ST(last))));
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t timer_elapsed32(uint32_t last)
|
|
|
|
{
|
2015-09-10 09:31:19 +00:00
|
|
|
return ST2MS(chVTTimeElapsedSinceX(MS2ST(last)));
|
2015-09-07 20:57:04 +00:00
|
|
|
}
|