4 libbasetype struct PsdBase
5 libbasetypeextern struct Library
8 copyright Copyright 2002-2009 Chris Hodges
12 #include <exec/types.h>
13 #include <exec/lists.h>
14 #include <exec/interrupts.h>
15 #include <exec/semaphores.h>
16 #include <exec/devices.h>
18 #include <exec/ports.h>
19 #include <utility/utility.h>
20 #include <devices/timer.h>
21 #include <libraries/poseidon.h>
22 #include <proto/alib.h>
24 LONG psdGetAttrs(ULONG type, APTR psdstruct, Tag tag1, ...) __stackparm;
25 LONG psdSetAttrs(ULONG type, APTR psdstruct, Tag tag1, ...) __stackparm;
26 APTR psdAddErrorMsg(UWORD level, STRPTR origin, STRPTR fmtstr, ...);
27 VOID psdSafeRawDoFmt(STRPTR buf, ULONG len, STRPTR fmtstr, ...);
28 APTR psdFindDevice(APTR pd, Tag tag1, ...) __stackparm;
29 APTR psdClaimAppBinding(Tag tag1, ...) __stackparm;
30 APTR psdFindInterface(APTR pd, APTR pif, Tag tag1, ...) __stackparm;
31 APTR psdFindEndpoint(APTR pif, APTR pep, Tag tag1, ...) __stackparm;
32 STRPTR psdCopyStrFmt(CONST_STRPTR fmtstr, ...);
33 APTR psdOpenStream(APTR pep, Tag tag1, ...) __stackparm;
34 APTR psdHubClaimAppBinding(Tag tag1, ...) __stackparm;
35 APTR psdFindDescriptor(APTR pd, APTR pdd, Tag tag1, ...) __stackparm;
36 IPTR psdDoHubMethod(APTR pd, ULONG methodid, IPTR *methoddata1) __stackparm;
37 APTR psdAllocRTIsoHandler(APTR pep, Tag tag1, ...) __stackparm;
41 #include "poseidon_intern.h"
45 APTR psdAllocVec(ULONG size) (D0)
46 VOID psdFreeVec(APTR memptr) (A1)
47 VOID psdLockWritePBase() ()
48 VOID psdLockReadPBase() ()
49 VOID psdUnlockPBase() ()
50 STRPTR psdCopyStr(CONST_STRPTR name) (A0)
51 VOID psdDelayMS(ULONG milli) (D0)
52 APTR psdAddHardware(STRPTR name, ULONG unit) (A0,D0)
53 VOID psdRemHardware(APTR phw) (A0)
54 APTR psdEnumerateHardware(APTR phw) (A0)
55 APTR psdAllocDevice(APTR phw) (A0)
56 VOID psdFreeDevice(APTR pd) (A0)
57 VOID psdLockReadDevice(APTR pd) (A0)
58 VOID psdLockWriteDevice(APTR pd) (A0)
59 VOID psdUnlockDevice(APTR pd) (A0)
60 APTR psdEnumerateDevice(APTR pp) (A1)
61 APTR psdGetNextDevice(APTR pd) (A0)
62 LONG psdGetAttrsA(ULONG type, APTR psdstruct, struct TagItem *taglist) (D0,A0,A1)
63 LONG psdSetAttrsA(ULONG type, APTR psdstruct, struct TagItem *taglist) (D0,A0,A1)
64 APTR psdAllocPipe(APTR pd, struct MsgPort *mp, APTR pep) (A0,A1,A2)
65 APTR psdFreePipe(APTR pp) (A1)
66 VOID psdPipeSetup(APTR pp, UWORD rt, UWORD rq, UWORD val, UWORD idx) (A1,D0,D1,D2,D3)
67 LONG psdDoPipe(APTR pp, APTR data, ULONG len) (A1,A0,D0)
68 VOID psdSendPipe(APTR pp, APTR data, ULONG len) (A1,A0,D0)
69 VOID psdAbortPipe(APTR pp) (A1)
70 LONG psdWaitPipe(APTR pp) (A1)
71 ULONG psdGetPipeActual(APTR pp) (A1)
72 LONG psdGetPipeError(APTR pp) (A1)
73 STRPTR psdGetStringDescriptor(APTR pp, UWORD idx) (A1,D0)
74 BOOL psdSetDeviceConfig(APTR pp, UWORD cfgnum) (A1,D0)
75 APTR psdAddClass(STRPTR name, ULONG version) (A1,D0)
76 VOID psdRemClass(APTR puc) (A1)
77 VOID psdClassScan() ()
78 STRPTR psdNumToStr(UWORD type, LONG idx, STRPTR defstr) (D0,D1,A0)
79 struct Task * psdSpawnSubTask(STRPTR name, APTR initpc, APTR userdata) (A0,A1,A2)
80 APTR psdAddErrorMsgA(UWORD level, STRPTR origin, STRPTR fmtstr, RAWARG fmtdata) (D0,A0,A1,A2)
81 VOID psdRemErrorMsg(APTR pem) (A0)
82 VOID psdSafeRawDoFmtA(STRPTR buf, ULONG len, CONST_STRPTR fmtstr, RAWARG fmtdata) (A0,D0,A1,A2)
83 BOOL psdSetAltInterface(APTR pp, APTR pif) (A1,A0)
84 APTR psdFindDeviceA(APTR pd, struct TagItem *taglist) (A0,A1)
85 APTR psdClaimAppBindingA(struct TagItem *taglist) (A1)
86 APTR psdReleaseAppBinding(APTR pab) (A0)
87 APTR psdAddEventHandler(struct MsgPort *mp, ULONG msgmask) (A1,D0)
88 VOID psdRemEventHandler(APTR peh) (A0)
89 VOID psdSendEvent(ULONG ehmt, APTR param1, APTR param2) (D0,A0,A1)
90 VOID psdReleaseDevBinding(APTR pd) (A0)
91 VOID psdReleaseIfBinding(APTR pif) (A0)
92 BOOL psdReadCfg(APTR pic, APTR formdata) (A0,A1)
93 APTR psdWriteCfg(APTR pic) (A0)
94 APTR psdFindCfgForm(APTR pic, ULONG formid) (A0,D0)
95 APTR psdNextCfgForm(APTR pic) (A0)
96 BOOL psdRemCfgForm(APTR pic) (A0)
97 APTR psdAddCfgEntry(APTR pic, APTR formdata) (A0,A1)
98 BOOL psdRemCfgChunk(APTR pic, ULONG chnkid) (A0,D0)
99 APTR psdGetCfgChunk(APTR pic, ULONG chnkid) (A0,D0)
100 VOID psdParseCfg() ()
101 VOID psdUnbindAll() ()
102 BOOL psdSetClsCfg(STRPTR owner, APTR form) (A0,A1)
103 APTR psdGetClsCfg(STRPTR owner) (A0)
104 BOOL psdSetUsbDevCfg(STRPTR owner, STRPTR devid, STRPTR ifid, APTR form) (A0,A2,A3,A1)
105 APTR psdGetUsbDevCfg(STRPTR owner, STRPTR devid, STRPTR ifid) (A0,A2,A3)
106 APTR psdFindInterfaceA(APTR pd, APTR pif, struct TagItem *taglist) (A0,A2,A1)
107 APTR psdFindEndpointA(APTR pif, APTR pep, struct TagItem *taglist) (A0,A2,A1)
108 STRPTR psdCopyStrFmtA(CONST_STRPTR fmtstr, RAWARG fmtdata) (A0,A1)
109 BOOL psdSetForcedBinding(STRPTR owner, STRPTR devid, STRPTR ifid) (A2,A0,A1)
110 STRPTR psdGetForcedBinding(STRPTR devid, STRPTR ifid) (A0,A1)
111 APTR psdCheckPipe(APTR pp) (A1)
112 APTR psdOpenStreamA(APTR pep, struct TagItem *taglist) (A0,A1)
113 VOID psdCloseStream(APTR pps) (A1)
114 LONG psdStreamRead(APTR pps, APTR buffer, LONG length) (A1,A0,D0)
115 LONG psdStreamWrite(APTR pps, APTR buffer, LONG length) (A1,A0,D0)
116 LONG psdStreamFlush(APTR pps) (A1)
117 LONG psdGetStreamError(APTR pps) (A1)
118 VOID psdCalculatePower(APTR phw) (A0)
119 BOOL psdLoadCfgFromDisk(STRPTR filename) (A1)
120 BOOL psdSaveCfgToDisk(STRPTR filename, BOOL mode) (A1,D0)
121 VOID psdDebugSemaphores() ()
122 VOID psdHubClassScan(APTR pd) (A0)
123 APTR psdHubClaimAppBindingA(struct TagItem *taglist) (A1)
124 VOID psdHubReleaseDevBinding(APTR pd) (A0)
125 VOID psdHubReleaseIfBinding(APTR pif) (A0)
126 APTR psdAllocCfgForm(ULONG formid) (D0)
127 BOOL psdAddStringChunk(APTR pic, ULONG chunkid, CONST_STRPTR contents) (A0,D0,A1)
128 BOOL psdMatchStringChunk(APTR pic, ULONG chunkid, CONST_STRPTR contents) (A0,D0,A1)
129 STRPTR psdGetStringChunk(APTR pic, ULONG chunkid) (A0,D0)
131 APTR psdFindDescriptorA(APTR pd, APTR pdd, struct TagItem *taglist) (A0,A2,A1)
132 IPTR psdDoHubMethodA(APTR pd, ULONG methodid, IPTR *methoddata) (A0,D0,A1)
133 APTR psdAllocRTIsoHandlerA(APTR pep, struct TagItem *taglist) (A0,A1)
134 VOID psdFreeRTIsoHandler(APTR prt) (A1)
135 LONG psdStartRTIso(APTR prt) (A1)
136 LONG psdStopRTIso(APTR prt) (A1)
137 ULONG psdBorrowLocksWait(struct Task *task, ULONG signals) (A1,D0)
138 BOOL psdSuspendDevice(APTR pd) (A0)
139 BOOL psdResumeDevice(APTR pd) (A0)
140 BOOL psdSuspendBindings(APTR pd) (A0)
141 BOOL psdResumeBindings(APTR pd) (A0)