Subversion Repositories freemyipod

Rev

Rev 10 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10 Rev 85
Line 30... Line 30...
30
#define TIME_AFTER(a,b)         ((long)(b) - (long)(a) < 0)
30
#define TIME_AFTER(a,b)         ((long)(b) - (long)(a) < 0)
31
#define TIME_BEFORE(a,b)        TIME_AFTER(b,a)
31
#define TIME_BEFORE(a,b)        TIME_AFTER(b,a)
32
#define TIMEOUT_EXPIRED(a,b)    TIME_AFTER(USEC_TIMER,a + b)
32
#define TIMEOUT_EXPIRED(a,b)    TIME_AFTER(USEC_TIMER,a + b)
33
 
33
 
34
 
34
 
-
 
35
uint32_t read_usec_timer();
-
 
36
#define USEC_TIMER (read_usec_timer())
-
 
37
 
-
 
38
 
35
static inline void sleep(long duration)  /* in usec steps */
39
static inline void udelay(long duration)  /* in usec steps */
36
{
40
{
37
    long timestamp = USEC_TIMER;
41
    long timestamp = USEC_TIMER;
38
    while (!TIMEOUT_EXPIRED(timestamp, duration));
42
    while (!TIMEOUT_EXPIRED(timestamp, duration));
39
}
43
}
40
 
44
 
41
 
45
 
-
 
46
void setup_tick() INITCODE_ATTR;
-
 
47
void INT_TIMERB() ICODE_ATTR;
-
 
48
 
-
 
49
 
42
#endif
50
#endif