stubs for ARM processor resource
[AROS.git] / arch / all-pc / timer / beginio.c
blob330623a9ef4a31607dd6b56bb2fe4c42503b9806
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: BeginIO - Start up a timer.device request.
6 Lang: english
7 */
9 #include <aros/debug.h>
10 #include <aros/libcall.h>
11 #include <asm/io.h>
13 #include "ticks.h"
15 AROS_LH1(void, BeginIO,
16 AROS_LHA(struct timerequest *, timereq, A1),
17 struct TimerBase *, TimerBase, 5, Timer)
19 AROS_LIBFUNC_INIT
21 D(bug("[Timereq 0x%p] unit %ld, command %d\n", timereq, timereq->tr_node.io_Unit, timereq->tr_node.io_Command));
23 #if DEBUG
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);
28 #endif
30 if (common_BeginIO(timereq, TimerBase))
32 D(bug("[Timereq 0x%p] Updating hardware interrupt request\n", timereq));
34 Disable();
35 Timer0Setup(TimerBase);
36 Enable();
39 #if DEBUG
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);
45 #endif
47 AROS_USERFUNC_EXIT