more dependencies resolved

This commit is contained in:
Markus Fröschle
2013-12-29 08:58:58 +00:00
parent cc48a7be12
commit c4772fa216
11 changed files with 191 additions and 249 deletions

View File

@@ -41,6 +41,7 @@ typedef bool (*checker_func)(void);
extern __inline__ void wait(uint32_t) __attribute__((always_inline));
extern __inline__ bool waitfor(uint32_t us, checker_func condition) __attribute__((always_inline));
/*
* wait for the specified number of us on slice timer 0. Replaces the original routines that had
* the number of useconds to wait for hardcoded in their name.
@@ -52,6 +53,13 @@ extern __inline__ void wait(uint32_t us)
while (MCF_SLT_SCNT(0) - target > 0);
}
/*
* same as above, but with milliseconds wait time
*/
extern __inline__ void wait_ms(uint32_t ms)
{
wait(ms * 1000);
}
/*
* the same as above, with a checker function which gets called while
* busy waiting and allows for an early return if it returns true