2 Copyright © 2010, The AROS Development Team. All rights reserved.
5 Desc: AbleICR() function.
9 #include <exec/libraries.h>
10 #include <proto/cia.h>
11 #include <proto/exec.h>
12 #include <hardware/cia.h>
13 #include <hardware/custom.h>
14 #include <hardware/intbits.h>
16 #include "cia_intern.h"
18 AROS_LH1(WORD
, AbleICR
,
19 AROS_LHA(WORD
, mask
, D0
),
20 struct Library
*, resource
, 3, Cia
)
24 struct CIABase
*CiaBase
= (struct CIABase
*)resource
;
25 volatile struct Custom
*custom
= (struct Custom
*)0xdff000;
30 old
= CiaBase
->enable_mask
;
33 CiaBase
->enable_mask
|= mask
& 0x1f;
35 CiaBase
->enable_mask
&= ~mask
;
37 CiaBase
->hw
->ciaicr
= mask
;
38 // do we need to trigger the interrupt now?
39 if (CiaBase
->enable_mask
& CiaBase
->active_mask
)
40 custom
->intreq
= INTF_SETCLR
| CiaBase
->inten_mask
;