Timer: add millis() for modbus

This commit is contained in:
Evgenii Meshcheriakov
2022-10-18 11:40:45 +03:00
parent e57564c3ea
commit 41672fbc38
2 changed files with 9 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ extern "C"
void
SysTick_Handler (void)
{
systicks++;
if (timer > 0)
timer--;
}
@@ -63,3 +64,7 @@ Timer::resetCounter ()
{
counter.store (0, std::memory_order_relaxed);
}
uint32_t millis() {
return systicks;
}