2 Copyright © 2009-2013, The AROS Development Team. All rights reserved
9 #include <aros/debug.h>
11 #include <proto/exec.h>
13 /* We want all other bases obtained from our base */
16 #include <proto/timer.h>
18 #include <exec/types.h>
19 #include <devices/timer.h>
25 struct IORequest
*ata_OpenTimer(struct ataBase
*base
)
27 struct MsgPort
*p
= CreateMsgPort();
30 struct IORequest
*io
= CreateIORequest(p
, sizeof(struct timerequest
));
35 * ok. ECLOCK does not have too great resolution, either.
36 * we will have to sacrifice our performance a little bit, meaning, the 400ns will turn into (worst case) 2us.
37 * hopefully we won't have to call that TOO often...
39 if (0 == OpenDevice("timer.device", UNIT_MICROHZ
, io
, 0))
45 bug("[ATA ] Failed to open timer.device, unit MICROHZ\n");
51 bug("[ATA ] Failed to create timerequest\n");
57 bug("[ATA ] Failed to create timer port\n");
63 void ata_CloseTimer(struct IORequest
*tmr
)
67 struct MsgPort
*p
= tmr
->io_Message
.mn_ReplyPort
;