micro_delay in sysutil, used in ti1225, dp8390, fxp and
orinoco now. Uses a combination of tickdelay (where possible) and calibrated busywait (where necessary).
This commit is contained in:
@@ -46,24 +46,6 @@ int this_proc;
|
||||
|
||||
#define MICROS_TO_TICKS(m) (((m)*HZ/1000000)+1)
|
||||
|
||||
/*****************************************************************************
|
||||
* milli_delay *
|
||||
* *
|
||||
* Wait usecs micro seconds. Clearly needs revision *
|
||||
*****************************************************************************/
|
||||
static void micro_delay(unsigned long usecs)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
if(usecs >= 100) {
|
||||
/* If the delay is long, we might as well use ticks */
|
||||
tickdelay(MICROS_TO_TICKS(usecs));
|
||||
} else {
|
||||
/* use another type of hack :-), or a proper implementation */
|
||||
for(i=0; i < 1000 * usecs; i++){j+=1;}
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* milli_delay *
|
||||
* *
|
||||
|
||||
Reference in New Issue
Block a user