Refactor dds into dds and fgen
driver module started
This commit is contained in:
@@ -63,7 +63,8 @@ bool stimer_clearFired(int timer_id)
|
||||
}
|
||||
}
|
||||
|
||||
void stimer_update(void) {
|
||||
void stimer_update(void)
|
||||
{
|
||||
for (int i = 0; i < MAX_TIMERS; ++i) {
|
||||
if (timers[i].active && timers[i].remaining_ticks > 0) {
|
||||
timers[i].remaining_ticks--;
|
||||
@@ -83,8 +84,17 @@ void stimer_update(void) {
|
||||
else
|
||||
{
|
||||
timers[i].active = false;
|
||||
timers[i].inUse = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// blocking delay
|
||||
void stimer_delay(uint32_t ticks)
|
||||
{
|
||||
int handle = stimer_start(ticks, TIMER_MODE_ONE_SHOT, 0, 0);
|
||||
|
||||
while (!stimer_fired(handle));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user