2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: BeginIO - Start up a timer.device request, generic version for software timer emulation
9 #include <aros/libcall.h>
11 #include "timer_intern.h"
13 /*****************************************************************************
16 #include <devices/timer.h>
17 #include <proto/timer.h>
18 AROS_LH1(void, BeginIO
,
21 AROS_LHA(struct timerequest
*, timereq
, A1
),
24 struct TimerBase
*, TimerBase
, 5, Timer
)
27 BeginIO() will perform a timer.device command. It is normally
28 called from within DoIO() and SendIO().
31 timereq - The request to process.
34 The requested message will be processed.
37 This function is safe to call from interrupts.
44 exec.library/Abort(), exec.library/SendIO(), exec.library/DoIO()
49 23-01-1998 iaint Implemented again.
51 ******************************************************************************/
57 * common_BeginIO() is called in the middle of BeginIO() implementation
58 * to provide support for time base correction.
59 * If we query TBC hardware before starting doing anything here, we can
60 * calculate how much time it took to do all processing and take this
61 * into account when programming hardware.
62 * See PowerPC native versions for working example.
65 common_BeginIO(timereq
, TimerBase
);
68 * common_BeginIO() returns TRUE if it wants us to re-adjust
69 * our hardware (if the request was added to the head of a queue
70 * and elapsed time changes).
71 * Real hardware version of timer.device needs to do this here.