more dependencies resolved
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user