Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / arch / common / ata.device / timer.h
blob9f4ed250f52a81af4b6a77de57f2ec4d946ee1a4
1 /*
2 Copyright © 2009, The AROS Development Team. All rights reserved
3 $Id$
5 Desc:
6 Lang: English
7 */
8 /*
9 * PARTIAL CHANGELOG:
10 * DATE NAME ENTRY
11 * ---------- ------------------ -------------------------------------------------------------------
12 * 2005-03-05 T. Wiszkowski created file; initial benchmarked nanowait and timer-based micro/sec wait
16 * ata_OpenTimer
17 * create timerequest to manage timed operations
18 * result
19 * timerequest to be used with any of the calls below
20 * note
21 * only one task can use given timerequest
23 struct IORequest *ata_OpenTimer();
26 * ata_CloseTimer
27 * dispose timerequest; most likely never used ;)
28 * params
29 * tmr - obtained via ata_OpenTimer()
30 * result
31 * none
33 void ata_CloseTimer(struct IORequest *tmr);
36 * ata_Wait
37 * wait for a period of time or a signal
38 * params
39 * tmr - obtained via ata_OpenTimer()
40 * secs - number of seconds to wait
41 * micro - number of microseconds to wait
42 * sigs - additionally - signal to wait for
43 * result
44 * ULONG signals - if caught before timeout
46 ULONG ata_WaitTO(struct IORequest* tmr, ULONG secs, ULONG micro, ULONG sigs);
49 * ata_WaitNano
50 * waits for (pretty much) specified amount of time. benchmarked.
51 * params
52 * ns - amount of nanoseconds;
53 * result
54 * none
55 * note
56 * rounds up ns to nearest multiple of 100
58 void ata_WaitNano(ULONG ns);