2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: BeginIO - Start up a timer.device request.
9 #include <aros/debug.h>
10 #include <aros/libcall.h>
15 AROS_LH1(void, BeginIO
,
16 AROS_LHA(struct timerequest
*, timereq
, A1
),
17 struct TimerBase
*, TimerBase
, 5, Timer
)
21 D(bug("[Timereq 0x%p] unit %ld, command %d\n", timereq
, timereq
->tr_node
.io_Unit
, timereq
->tr_node
.io_Command
));
24 if (timereq
->tr_node
.io_Command
== TR_ADDREQUEST
)
26 bug("[Timereq 0x%p] Request time %d sec %d usec\n", timereq
, timereq
->tr_time
.tv_secs
, timereq
->tr_time
.tv_micro
);
30 if (common_BeginIO(timereq
, TimerBase
))
32 D(bug("[Timereq 0x%p] Updating hardware interrupt request\n", timereq
));
35 Timer0Setup(TimerBase
);
40 if (timereq
->tr_node
.io_Command
== TR_ADDREQUEST
)
42 bug("[Timereq 0x%p] Request time %d sec %d usec\n", timereq
, timereq
->tr_time
.tv_secs
, timereq
->tr_time
.tv_micro
);
43 bug("[Timereq 0x%p] Elapsed time %d sec %d usec\n", timereq
, TimerBase
->tb_Elapsed
.tv_secs
, TimerBase
->tb_Elapsed
.tv_micro
);