pulse_counter: Use "clock" suffix instead of "time" in commands

The debugging code knows how to handle fields that end in "clock".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-04-29 20:46:57 -04:00
parent 8f76e53c0e
commit b611e72a19
2 changed files with 9 additions and 8 deletions

View file

@ -87,13 +87,13 @@ counter_task(void)
if (!(c->flags & CF_PENDING))
continue;
irq_disable();
uint32_t time = c->timer.waketime - c->poll_ticks;
uint32_t waketime = c->timer.waketime;
uint32_t count = c->count;
uint32_t count_time = c->last_count_time;
c->flags &= ~CF_PENDING;
irq_enable();
sendf("counter_state oid=%c time=%u count=%u count_time=%u",
oid, time, count, count_time);
sendf("counter_state oid=%c next_clock=%u count=%u count_clock=%u",
oid, waketime, count, count_time);
}
}
DECL_TASK(counter_task);