2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
5 Desc: CardMiscControl() function.
9 #include <proto/exec.h>
11 #include "card_intern.h"
13 #define STATUSMASK (GAYLE_CS_WR | GAYLE_CS_DAEN)
14 #define IRQMASK (GAYLE_INT_BVD1 | GAYLE_INT_BVD2 | GAYLE_INT_BSY)
16 AROS_LH2(UBYTE
, CardMiscControl
,
17 AROS_LHA(struct CardHandle
*, handle
, A1
),
18 AROS_LHA(UBYTE
, control_bits
, D1
),
19 struct CardResource
*, CardResource
, 8, Card
)
23 volatile struct GayleIO
*gio
= (struct GayleIO
*)GAYLE_BASE
;
26 CARDDEBUG(bug("CardMiscControl(%p,%02x)\n", handle
, control_bits
));
31 val
= control_bits
& IRQMASK
;
35 gio
->status
= control_bits
& STATUSMASK
;
38 control
= gio
->intena
;
39 if (control_bits
& CARD_INTF_SETCLR
)
43 gio
->intena
= control
;
48 return control_bits
& (STATUSMASK
| IRQMASK
| CARD_INTF_SETCLR
);