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