MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mv_delay

Function mv_delay

freebsd/arm/mv/timer.c:310–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308}
309
310static void
311mv_delay(int usec, void* arg)
312{
313 uint32_t val, val_temp;
314 int32_t nticks;
315
316 val = mv_get_timer(1);
317 nticks = ((timer_softc->config->clock_src / 1000000 + 1) * usec);
318
319 while (nticks > 0) {
320 val_temp = mv_get_timer(1);
321 if (val > val_temp)
322 nticks -= (val - val_temp);
323 else
324 nticks -= (val + (INITIAL_TIMECOUNTER - val_temp));
325
326 val = val_temp;
327 }
328}
329
330#ifndef PLATFORM
331void

Callers 1

DELAYFunction · 0.85

Calls 1

mv_get_timerFunction · 0.85

Tested by

no test coverage detected