use the soc family name, not specific chip name(s)
[AROS.git] / rom / isapnp / controller.h
blobc2bd5205a2925f74fbb7e0f18814e77a90f31a14
1 /* $Id$ */
3 /*
4 ISA-PnP -- A Plug And Play ISA software layer for AmigaOS.
5 Copyright (C) 2001 Martin Blom <martin@blom.org>
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
17 You should have received a copy of the GNU Library General Public
18 License along with this library; if not, write to the
19 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Cambridge,
20 MA 02139, USA.
23 #ifndef ISA_PNP_controller_h
24 #define ISA_PNP_controller_h
26 #include "CompilerSpecific.h"
28 #include <exec/types.h>
30 struct ISAPNPBase;
32 AROS_LD1(void, ISAC_SetMasterInt,
33 AROS_LHA(BOOL, on, D0),
34 struct ISAPNPBase *, res, 1, ISAPNP);
36 AROS_LD0(BOOL, ISAC_GetMasterInt,
37 struct ISAPNPBase *, res, 2, ISAPNP);
39 AROS_LD1(void, ISAC_SetWaitState,
40 AROS_LHA(BOOL, on, D0),
41 struct ISAPNPBase *, res, 3, ISAPNP);
43 AROS_LD0(BOOL, ISAC_GetWaitState,
44 struct ISAPNPBase *, res, 4, ISAPNP);
46 AROS_LD1(BOOL, ISAC_GetInterruptStatus,
47 AROS_LHA(UBYTE, interrupt, D0),
48 struct ISAPNPBase *, res, 5, ISAPNP);
50 AROS_LD1(UBYTE, ISAC_GetRegByte,
51 AROS_LHA(UWORD, reg, D0),
52 struct ISAPNPBase *, res, 6, ISAPNP);
54 AROS_LD2(void, ISAC_SetRegByte,
55 AROS_LHA(UWORD, reg, D0),
56 AROS_LHA(UBYTE, value, D1),
57 struct ISAPNPBase *, res, 7, ISAPNP);
59 AROS_LD1(UWORD, ISAC_GetRegWord,
60 AROS_LHA(UWORD, reg, D0),
61 struct ISAPNPBase *, res, 8, ISAPNP);
63 AROS_LD2(void, ISAC_SetRegWord,
64 AROS_LHA(UWORD, reg, D0),
65 AROS_LHA(UWORD, value, D1),
66 struct ISAPNPBase *, res, 9, ISAPNP);
68 AROS_LD1(ULONG, ISAC_GetRegLong,
69 AROS_LHA(UWORD, reg, D0),
70 struct ISAPNPBase *, res, 10, ISAPNP);
72 AROS_LD2(void, ISAC_SetRegLong,
73 AROS_LHA(UWORD, reg, D0),
74 AROS_LHA(ULONG, value, D1),
75 struct ISAPNPBase *, res, 11, ISAPNP);
77 AROS_LD1(UBYTE, ISAC_ReadByte,
78 AROS_LHA(ULONG, address, D0),
79 struct ISAPNPBase *, res, 12, ISAPNP);
81 AROS_LD2(void, ISAC_WriteByte,
82 AROS_LHA(ULONG, address, D0),
83 AROS_LHA(UBYTE, value, D1 ),
84 struct ISAPNPBase *, res, 13, ISAPNP);
86 AROS_LD1(UWORD, ISAC_ReadWord,
87 AROS_LHA(ULONG, address, D0),
88 struct ISAPNPBase *, res, 14, ISAPNP);
90 AROS_LD2(void, ISAC_WriteWord,
91 AROS_LHA(ULONG, address, D0),
92 AROS_LHA(UWORD, value, D1),
93 struct ISAPNPBase *, res, 15, ISAPNP);
95 AROS_LD1(UWORD, ISAC_ReadLong,
96 AROS_LHA(ULONG, address, D0),
97 struct ISAPNPBase *, res, 16, ISAPNP);
99 AROS_LD2(void, ISAC_WriteLong,
100 AROS_LHA(ULONG, address, D0),
101 AROS_LHA(ULONG, value, D1 ),
102 struct ISAPNPBase *, res, 17, ISAPNP);
104 static inline UBYTE ISAC_GetRegByte(UWORD reg, struct ISAPNPBase *res)
106 return AROS_LC1(UBYTE, ISAC_GetRegByte,
107 AROS_LHA(UWORD, reg, D0),
108 struct ISAPNPBase *, res, 6, ISAPNP);
111 static inline void ISAC_SetRegByte(UWORD reg, UBYTE value, struct ISAPNPBase *res)
113 return AROS_LC2(void, ISAC_SetRegByte,
114 AROS_LHA(UWORD, reg, D0),
115 AROS_LHA(UBYTE, value, D1),
116 struct ISAPNPBase *, res, 7, ISAPNP);
119 #endif /* ISA_PNP_controller_h */