3 Copyright (C) 2011 Neil Cafferkey
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23 #include <exec/types.h>
24 #include <exec/resident.h>
25 #include <aros/libcall.h>
26 #include "initializers.h"
30 #include "device_protos.h"
32 extern const APTR init_data
;
33 extern const struct Resident rom_tag
;
34 extern const TEXT device_name
[];
35 extern const TEXT version_string
[];
38 AROS_LH2(struct DevBase
*, DevInit
,
39 AROS_LHA(struct DevBase
*, dev_base
, D0
),
40 AROS_LHA(struct DevBase
*, seg_list
, A0
),
41 struct DevBase
*, base
, 0, S2
)
45 return DevInit(dev_base
, seg_list
, base
);
52 AROS_LH3(BYTE
, DevOpen
,
53 AROS_LHA(struct IOSana2Req
*, request
, A1
),
54 AROS_LHA(LONG
, unit_num
, D0
),
55 AROS_LHA(ULONG
, flags
, D1
),
56 struct DevBase
*, base
, 1, S2
)
60 return DevOpen(request
, unit_num
, flags
, base
);
67 AROS_LH1(APTR
, DevClose
,
68 AROS_LHA(struct IOSana2Req
*, request
, A1
),
69 struct DevBase
*, base
, 2, S2
)
73 return DevClose(request
, base
);
80 AROS_LH0(APTR
, DevExpunge
,
81 struct DevBase
*, base
, 3, S2
)
85 return DevExpunge(base
);
92 AROS_LH0(APTR
, DevReserved
,
93 struct DevBase
*, base
, 4, S2
)
97 return DevReserved(base
);
104 AROS_LH1(VOID
, DevBeginIO
,
105 AROS_LHA(struct IOSana2Req
*, request
, A1
),
106 struct DevBase
*, base
, 5, S2
)
110 DevBeginIO(request
, base
);
117 AROS_LH1(VOID
, DevAbortIO
,
118 AROS_LHA(struct IOSana2Req
*, request
, A1
),
119 struct DevBase
*, base
, 6, S2
)
123 DevAbortIO(request
, base
);
130 static const APTR vectors
[] =
132 (APTR
)AROS_SLIB_ENTRY(DevOpen
, S2
, 1),
133 (APTR
)AROS_SLIB_ENTRY(DevClose
, S2
, 2),
134 (APTR
)AROS_SLIB_ENTRY(DevExpunge
, S2
, 3),
135 (APTR
)AROS_SLIB_ENTRY(DevReserved
, S2
, 4),
136 (APTR
)AROS_SLIB_ENTRY(DevBeginIO
, S2
, 5),
137 (APTR
)AROS_SLIB_ENTRY(DevAbortIO
, S2
, 6),
142 static const APTR init_table
[] =
144 (APTR
)sizeof(struct DevBase
),
147 (APTR
)AROS_SLIB_ENTRY(DevInit
, S2
, 0),
151 const struct Resident aros_rom_tag
=
154 (struct Resident
*)&aros_rom_tag
,
155 (APTR
)(&rom_tag
+ 1),
161 (TEXT
*)version_string
,