2 Copyright © 1995-2017, The AROS Development Team. All rights reserved.
6 #include <resources/hpet.h>
7 #include <proto/arossupport.h>
9 #include "hpet_intern.h"
11 /*****************************************************************************
14 #include <proto/hpet.h>
16 AROS_LH2(BOOL
, GetUnitAttrsA
,
19 AROS_LHA(ULONG
, unit
, D0
),
20 AROS_LHA(const struct TagItem
*, tags
, A0
),
23 struct HPETBase
*, base
, 4, Hpet
)
26 Query attributes of HPET unit.
29 unit - a number of previously allocated HPET unit.
32 TRUE in case of success or FALSE if the given unit number is out of range.
44 ******************************************************************************/
48 struct TagItem
*tag
, *tstate
= (struct TagItem
*)tags
;
50 /* Owner is the only thing which can be modified, so we don't need a semaphore here */
52 if (unit
>= base
->unitCnt
)
55 while ((tag
= LibNextTagItem(&tstate
)))
60 *(IPTR
*)tag
->ti_Data
= base
->units
[unit
].base
;
64 *(IPTR
*)tag
->ti_Data
= base
->units
[unit
].block
;
68 *(const char **)tag
->ti_Data
= base
->units
[unit
].Owner
;